Thursday, November 09, 2006

Buffer Overflows and Security

Buffer overflows and security are very common topics these days and Dr Dobb's just ran an article on it Illusion of Safety. They also ran a follow up article on The Unsecured Integer. The first article presents two options which can be used to prevent buffer overflows brute force and prevention by design. Brute force requires some form of verifying that all incoming data is verified for length before copying with problematic functions. Prevention by design pushes the responsibility to verify that the data doesn't overflow to the edges of the system and has the possibilities to make applications simpler, smaller and run faster, but it requires that each data flow be traced and verified. Preventions is harder to enforce than the brute force method but provides possible efficiency improvements.