Posted on 01/03/2007 5:13:04 PM PST by ShadowAce
A U.S. computer scientist and a Microsoft researcher have devised a program that drastically reduces application crashes and can prevent some types of attacks by altering the way applications use memory.
The program, called DieHard, officially launched over the holidays, following development that was funded by large grants from Microsoft, Intel and the US' National Science Foundation.
Developers Emery Berger, a computer scientist from the University of Massachusetts Amherst, and Microsoft's Ben Zorn, have made DieHard freely available for noncommercial use at their Web site.
The problems Berger wanted to address were caused by the fact that despite the huge amount of memory installed in today's PCs, "programmers are still writing code as if memory is in short supply".
That leads to errors such as double-frees, invalid frees, and various types of overflow. Berger said DieHard eliminates or makes less dangerous many of these problems by making chunks of memory available at various locations, and assigning addresses randomly.
Address-space randomization is a technique used in some versions of Linux and in Windows Vista, but Berger said DieHard is a much more thorough application of the idea. Without randomization, attackers can easily locate where applications store sensitive data such as passwords. Attackers also commonly use memory errors to execute malicious code and take control of systems.
DieHard also secretly launches multiple copies of some applications, so that when one application is about to crash it can be shut down, while the others continue to run.
He said DieHard completely prevents double-free and invalid-free errors from having any effect, reduces the likelihood of dangling pointer errors and moderate buffer overflows. It prevents certain library-based heap overflows and all but eliminates heap corruption.
The program is available for Windows XP, Windows Vista and Linux, but the Windows versions only protect the Firefox browser so far. The Linux version protects any application launched once DieHard is running.
Programmers on either Windows or Linux can use DieHard to protect any application they are developing.
One caveat is that DieHard noticeably increases memory usage -- a rise of 50 to 75 percent, according to Berger. Application performance shouldn't be noticeably altered, though, as long as the system has sufficient memory.
Has anyone downloaded this?
I don't use Firefox so I guess I'll wait.
Probably MicroSoft will keep putting it off until the next OS upgrade. Or SP2 for Vista or something like that.
bookmark for later
I wouldn't think we have many C and C++ programmers here.
If we do, they'll probably stick to malloc/free and new/delete. They're too proud that they never make mistakes to use something like this.
Just get an iMAC...it just works.
I converted from PC to iMAC back in August.
This is the most fun I've had on a computer in a long time...
I don't like probabalistic computing. Any properly-written program should know what memory pointers and handles are valid, and what ones aren't. Reducing the likelihood that careless memory accesses will cause damage will also tend to reduce the likelihood of them being found and fixed.
One thing I've been thinking I might like to see would be an eight-byte handle-plus-offset type, with both compiler support and hardware support for efficient access. I believe languages such as PostScript already implicitly use such types; if memory accesses using such types are validated, many types of memory corruption become impossible since access beyond the end (or before the beginning) of any allocated item will be trapped.
After reading how this works, my first reaction is to stand back and let other people be the guinea pigs for a good long while before venturing to try it.
I enjoy playing around with betas, but I steer clear of messing with the basic operating system.
"Yippe kai yea, mother ....."
You first!
Like hell they are. Programmers are writing code and using memory like socialists spend other peoples' money.
Bookmark to have the wife explain to me later what this means.
Ok, I'll try it!
Ain't that the dammed truth!
If a program isn't written right, it should be fixed. While allocation randomization is good for protecting against certain potential security weaknesses, programmers seem to be way too lazy at fixing memory-allocation bugs; allowing such bugs to exist silently doesn't seem like it will improve things. One thing I would think might be useful would be if programs and threads could give the operating system a "justify_memory" callback which would instruct them to notify the OS of all memory they knew about that they owned. Use of such a feature in development would make it possible for programmers to identify memory objects that were left stranded.
I don't use Firefox...Oh well!
Bingo! Let's be enablers of lazy and sloppy coders... NOT!
Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.