« One in 10 web pages laced with malware - Google | Main | Engineer guilty in plot to give data to China »

Halvar Flake vs. Michael Howard on memcpy

"Halvar�s reaction to Microsoft�s Michael Howard hinting that memcpy may soon be verboten in Redmond code:

This is an excellent idea - and along with memcpy, malloc() should be banned. While we are at it, the addition and multiplication operators have caused so much grief over the last years, I think it would make total sense to ban them. Oh, and if we ban the memory dereference, I am quite sure we�d be safe.

Get it? He thinks banning memcpy is a bad idea!

Here�s why Michael Howard thinks memcpy is a bad idea in secure code: it copies memory from one location to another, with an unsigned (�can�t be negative�) count parameter. If you screw the count up, or use a bad offset to find the copy target, you (or your attacker) have corrupted memory."

Article Link: http://www.securityfocus.com/blogs/105

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.


All Comments are Moderated and will be delayed!



"If you screw the count up, or use a bad offset to find the copy target, you (or your attacker) have corrupted memory."

If I screw the count up, my attacker has corrupted memory?

Post a comment







Remember personal info?