For example, buffer overflow vulnerabilities in Flash are often discovered. Shouldn't a proper verification of all function parameters in Flash source code be enough to protect against buffer overflows?
The difficulty comes essentially from the fact that, in C language, you are in charge of the memory-sanity of your own program. Meaning that you have to a full access to the memory, which allow you to do extremely efficient program but, also, might end up in an unspeakable chaos.
In this context, checking that you write within the bounds of a memory area is already a challenge. Especially if these bounds are dynamically chosen at runtime.
But, this is not enough to make a security issue, you also have to control that the outer World cannot access to the ability to write outside of these bounds.
As you have noticed in your question, only certain types of programs and/or part of the code are involved in these two issues. Usually the part that import inputs from the outer World and process it. And, there is absolutely no way to ensure that:
There will be no writing outside of the proper bounds.
No external input will be able to tweak an illegal writing in order to control it.
Again, all these problems are caused by the fact that you want memory efficiency and, thus, a full access to it. This is the price to pay.
The problem lies at various fronts:
language in which the application is developed.
What platform it supports. Note that the platform plays an important role in BO exploits.
Associated applications it depends on.
lack of audit.