Linked by Thom Holwerda on Wed 3rd Jan 2007 17:51 UTC, submitted by netpython
Privacy, Security, Encryption A US computer scientist and a Microsoft researcher have devised a program that drastically reduces application crashes and can prevent some types attack 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.
Order by: Score:
Address Space Randomization
by DigitalAxis on Wed 3rd Jan 2007 18:33 UTC
DigitalAxis
Member since:
2005-08-28

I'm curious, is this anything like the Address Space Randomization that's new to Vista, only for regular applications as well as system files?

Or do I have this all wrong?

I do see some mentions of extra features like protecting against dangling pointers and uninitialized reads, but short of DieHard knowing where the pointers are supposed to point and what the reads are supposed to read... well, I guess I'm not really qualified to understand how all this works.

Anyway, it doesn't look like it will protect against all bugs, but it still sounds rather useful. I do wonder whether the performance hit from running multiple versions of the program (in 'replicated' mode) would really make it worthwhile. Maybe for a few important and buggy applications... I see it works on Linux; I might have to try it sometime

Reply Score: 4

Hmm
by ma_d on Wed 3rd Jan 2007 18:35 UTC
ma_d
Member since:
2005-06-29

It says they eliminate double free's and invalid free's. This makes me suspicious that they've just attached garbage collection with random allocation addresses.

It also says they're running multiple concurrent copies of the process (interesting, if not totally ridiculous) so that when one crashes they can just throw another one up (not sure how they're making sure the second one doesn't crash in the same way...).

Edit:
Nevermind, there powerpoint shows they're not doing this. They're just marking each allocation and then checking on a free if the allocation is valid and if it's really still allocated.

Edited 2007-01-03 18:41

Reply Score: 3

RE: Hmm
by sukru on Wed 3rd Jan 2007 19:32 UTC in reply to "Hmm"
sukru Member since:
2006-11-19

So it does what ElectronicFence and similar memory allocation debuggers to on Linux. (Mark freed blocks as invalid pages, pad beginning and end of allocated block with invalid pages, etc)

After looking at their page they also do some more:

* Allocating memory randomly
* Running simultaneous copies and comparing results.

So it's interesting. Microsoft is really trying to fix their image. I hope they can make this kind of technologies stable and open to general use soon.

Reply Score: 1

RE[2]: Hmm
by ma_d on Wed 3rd Jan 2007 20:59 UTC in reply to "RE: Hmm"
ma_d Member since:
2005-06-29

The simultaneous results part seems to only work for command line unix programs... Which doesn't help Windows out much (those processes would be vastly too expensive to run multiple copies in most cases) or OS X or most Linux programs people use (I'm not saying they don't use CLI, just that they don't have much problem with CLI programs anyway, it's firefox and the like that break often).

Reply Score: 4

Memory consumption
by Tom K on Wed 3rd Jan 2007 18:44 UTC
Tom K
Member since:
2005-07-06

Apparently it increases Firefox's memory consumption by 50-75% (according to the website).

With Firefox already eating gobs of memory (hell, it's why I switched away from it), that's just ridiculous.

Reply Score: 5

RE: Memory consumption
by tspears on Wed 3rd Jan 2007 19:17 UTC in reply to "Memory consumption"
tspears Member since:
2006-05-22

I just tried Installing it for firefox on WinXP and it's taking about 50,000K just to have this page open... ridiculous!

Reply Score: 4

"Mozilla crash when loading this page"
by laclasse on Wed 3rd Jan 2007 18:47 UTC
laclasse
Member since:
2007-01-03

Well maybe making the web page compliant for a start will avoid it crashing ? W3C html validator finds 10 errors on the page and particularly the "This page is not Valid (no Doctype found)!".

Next we will have an app that avoids 'DieHard' to die ?

Reply Score: 4

arielb Member since:
2006-11-15

I think the point is some bad guy will make something that will crash your browser and then exploit your computer.

Reply Score: 1

You are forewarned
by joshv on Wed 3rd Jan 2007 18:50 UTC
joshv
Member since:
2006-03-18

I downloaded and installed Die Hard for Firefox. I then ran Firefox. It immediately crashed, twice in a row. Then it ran for a bit, with Die Hard active (I could tell because Die Hard inserted "[Die Hard]" into the title bar), until I tried to load osnews.com, and it crashed again. Currently Firefox crashes immediately on launching.

This is with Firefox 2.0.0.1 - now, granted I've not found this version to be particularly stable on my machine, but it was running fine until I launched Die Hard. There doesn't appear to be any exe I can kill to remove Die Hard, so it appears I will have to reboot to fix it.

Reply Score: 5

RE: You are forewarned
by arielb on Wed 3rd Jan 2007 21:03 UTC in reply to "You are forewarned"
arielb Member since:
2006-11-15

worksforme

Reply Score: 1

Here we go...
by ameasures on Wed 3rd Jan 2007 18:56 UTC
ameasures
Member since:
2006-01-09

Is it just me or does this look like a fresh implementation of technologies that OpenBSD has had for quite a while?

It sounds a good piece of development but not perhaps totally novel research.

Also appears to back up the notion that reliability and security are a function of engineered quality rather than how long your track record is at CERT.

The canard that (say) OpenBSD only appears secure because fewer people use it and therefore it gets attacked less is part of nonsensical viewpoint that still believes in security by obscurity.

Reply Score: 4

End-of-the pipe solution
by Abacus_ on Wed 3rd Jan 2007 19:00 UTC
Abacus_
Member since:
2006-12-08

This is an end-of-the-pipe solution: instead of ensuring that software is written according to a high enough standard, DieHard increases the chance that buggy software works. Why doesn't it surprise me that this kind of research was sponsored by Microsoft ?

Reply Score: 5

RE: End-of-the pipe solution
by Payton on Wed 3rd Jan 2007 19:08 UTC in reply to "End-of-the pipe solution"
Payton Member since:
2006-09-10

Yeah, it's the wrong way, unless it is tracking the errors and can send a report back to the developer with their stack traces of their buggy code.

It reminds me of bowling with bumper lanes.

Reply Score: 3

RE: End-of-the pipe solution
by ma_d on Wed 3rd Jan 2007 21:02 UTC in reply to "End-of-the pipe solution"
ma_d Member since:
2005-06-29

I agree to some extent. It seems like a valid thing to do with programs like Apache where they may be written to the highest possible standard but you add these features in during actual use to protect yourself.

Well, at least some of this stuff. Some of it just sounds silly to me.

Now if it gets to where it's hard to setup a development machine with these features off then we'll have a problem.

Reply Score: 2

Awful idea
by MORB on Wed 3rd Jan 2007 19:26 UTC
MORB
Member since:
2005-07-06

The basic premise is wrong: "programmers are still writing code as if memory is in short supply"

If you use less memory to store your data, more data fits in the cache. So for performance's sake, it's always a good idea not to waste space.
Anyway, you still want to save memory so that memory consumption scale reasonably when your application handle a lot of data.

And then, randomizing addresses... It sounds horrible when it comes to heap fragmentation, plus if a lot of small objects are allocated, it will waste a lot of physical memory because each allocated block will get its own 4kb memory page.

Edited 2007-01-03 19:26

Reply Score: 5

re: how different from OpenBSD, etc.
by victory on Wed 3rd Jan 2007 19:41 UTC
victory
Member since:
2007-01-03

This appears to be addressed in the FAQ on the DieHard site:

"How does DieHard differ from Vista's, OpenBSD's, and Linux's "address space randomization"?

http://prisms.cs.umass.edu/emery/index.php?page=frequently-asked-qu...

Reply Score: 2

Janizary Member since:
2006-03-12

The guy's FAQ is even wrong, that ruxcon paper he links to was out of date three days after it's release. He should look into how OpenBSD works now, rather than how it did in the past.

The fact of the matter is that this guy is a whack job, DieHard is a bloated tool that does nothing because it isn't intergrated into anything. Without systems integration it can easily be worked around, because it only protects that which starts after it does, while the Vista, OpenBSD and grsecurity stuff is actually worth a damn, since it's in the system and thus it is not possible to avoid the effects they have on the system.

Reply Score: 3

Emery Berger
by arielb on Wed 3rd Jan 2007 19:55 UTC
arielb
Member since:
2006-11-15

I thought the name Emery berger rung a bell. of course! I remember...the same guy who made Hoard. http://www.hoard.org/

Reply Score: 0

An interesting read...
by tomcat on Wed 3rd Jan 2007 21:01 UTC
tomcat
Member since:
2006-01-06

It still remains to be seen how useful it is (since the memory tradeoff is pretty steep), but kudos to Microsoft, Intel, and the US National Science Foundation for making the work available.

Reply Score: 1

What a couple of morons
by umccullough on Wed 3rd Jan 2007 21:03 UTC
umccullough
Member since:
2006-01-26

Ok, the article says this:

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".

No, the problem is that "researchers" like THIS enable bad developers to continue writing bad software:

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.

So, HIDE the problem from the user - nice... the user will continue using "bad" software and developers will continue being lazy.

and

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.

It appears the reason this works is because it basically DOESN'T free the memory, even when the developer asks for it. This is a great way to take the power of C/C++ to write tight, memory-efficient, fast code and flush it down the drain.

What a crock of shit. I use Firefox, and certainly don't need this crap to use it. Afterall, Firefox is just an app, it's not my whole OS.

Reply Score: 5

RE: What a couple of morons
by arielb on Wed 3rd Jan 2007 21:10 UTC in reply to "What a couple of morons"
arielb Member since:
2006-11-15

I was actually going to ask you about this. The reason why i remembered Emery Berger is because he made this for BeOS: http://www.bebits.com/app/717

Reply Score: 1

RE[2]: What a couple of morons
by umccullough on Wed 3rd Jan 2007 21:18 UTC in reply to "RE: What a couple of morons"
umccullough Member since:
2006-01-26

I'm not familiar with it - but I notice there's no talkback on that bebits entry! I just can't see any good reason to allocate more memory than is needed.

I know someone to ask what British Telecom might be using it for (since it's listed on Emery Berger's Hoard page).

All-in-all, it almost appears that this DieHard software is another way to advertise this guys technology.

Edit: Oh, I see it's LGPL - well maybe he's not selling it afterall ;)

Edited 2007-01-03 21:19

Reply Score: 4

RE[3]: What a couple of morons
by arielb on Wed 3rd Jan 2007 21:42 UTC in reply to "RE[2]: What a couple of morons"
arielb Member since:
2006-11-15

well the real hoard talkback is http://groups.yahoo.com/group/hoard/
because unlike beOS, hoard is alive and well on other platforms.

This was interesting:
http://tech.groups.yahoo.com/group/hoard/message/709

Reply Score: 2

RE[3]: What a couple of morons
by umccullough on Thu 4th Jan 2007 23:47 UTC in reply to "RE[2]: What a couple of morons"
umccullough Member since:
2006-01-26

Well, I found Emery Berger's hoard allocator is part of the Haiku malloc implementation - so I guess it's not all that bad ;)

Anyhow, had to post this for posterity.

Reply Score: 2

and people complain...
by Soulbender on Thu 4th Jan 2007 01:04 UTC
Soulbender
Member since:
2005-08-18

...that OSS/Linux projects has lame and "unprofessional" names...

Edited 2007-01-04 01:06

Reply Score: 3

RE: and people complain...
by arielb on Thu 4th Jan 2007 01:51 UTC in reply to "and people complain..."
arielb Member since:
2006-11-15

like PySBIG, MQ4CPP and SpadFS ? ;)

Reply Score: 1

Wehnus
by whendrik on Thu 4th Jan 2007 01:41 UTC
whendrik
Member since:
2006-12-16

When i read this i immitiatly thoughed of whenthrust:

http://www.wehnus.com/index.pl

Reply Score: 1

dah bate -cracked pot
by jango on Thu 4th Jan 2007 05:28 UTC
jango
Member since:
2006-11-22

ill believe i see it, and test test test it

omg windoze fans are braindead


notice how i didnt say windoze users- that would be hypocrisy- i am a windows user (i have to be at work- thanks to a braindead stupid IT admin) but i prefer Linux specifically debian (for its stability)


my favourite icebreaker to girls- computers are like airconditioners- they're useless when you open windows

Reply Score: 2

RE: dah bate -cracked pot
by netpython on Thu 4th Jan 2007 08:22 UTC in reply to "dah bate -cracked pot"
netpython Member since:
2005-07-06

roflmao

Reply Score: 2

50-75% more memory usage?
by tristan on Thu 4th Jan 2007 16:08 UTC
tristan
Member since:
2006-02-01

Yippie kay yay!

Reply Score: 1

The real value to Microsoft
by KenJackson on Thu 4th Jan 2007 20:17 UTC
KenJackson
Member since:
2005-07-18

One caveat is that DieHard noticeably increases memory usage - a rise of 50 to 75 percent

Microsoft's standard operating procedure (SOP) for years has been to release software that uses more hardware resources than previous versions. This is hugely advantageous for them because of the following scenario.

You buy an upgrade to your Microsoft software and install it on your existing hardware. Then you notice your computer seems slow, so you conclude that you need a new computer and you buy one. But you just bought a new copy of the software, so you don't need to buy yet another one with the new computer, right? Too bad! Microsoft demands that you buy another copy.

By forcing a hardware upgrade, they caused you to buy TWO copies of their new version instead of only the one that you needed.

Reply Score: 3

Allocate More Memory
by Yamin on Thu 4th Jan 2007 20:31 UTC
Yamin
Member since:
2006-01-10

Seems like plenty of folks seem to think you shouldn't allocate more memory than needed.

I am personally tired of seeing code like:
char name[7];
strcpy(name, "bob rob");

Especially if its on the stack. Why would you ever allocate exactly 7 chars? Is this case, its a bug. But even if it weren't, why not just allocate a reasonable large buffer. char name[64] or even 128.

Programmers micromanaging memory is a huge problem. Yes, for large arrays/collections of data, you should optimize it, but in general...allocate more. For arrays, allocate 1 or 2 more than your predetermined size.

I'd be nervous using a bridge that would only hold exactly my weight. People using arrayd should feel the same way ;)

Reply Score: 1