Live data from Hacker News

Try to make sudo less vulnerable to Rowhammer attacks

github.com

141–147 of 147 posts

Re: Try to make sudo less vulnerable to Rowhammer attacks

#141

Does anyone have any opinions on doas vs sudo? I've heard doas recommended as being more minimalistic, and various advantages that brings. What are the pros and cons between the two?

If your use of sudo featureset is minimal, it's true that doas can act as "reduced attack surface" replacement.

Cons: humans (and some software) expecting "sudo" will work while interacting with your system.

Re: Try to make sudo less vulnerable to Rowhammer attacks

#142

Earlier quoted context omitted.

"It always amazes me how people can be so confident yet so wrong" could apply to your post too. Yes it's a problem of physics and it's because they are trying to make DRAM too dense. It's a problem of physics - there's various ways to try to mitigate it but the only way to completely avoid it would probably be to use SRAM It's not some conspiracy by "Big RAM" Look at the evidence. This didn't start showing up until a…

You get a "choice". The choice just boils down to "buy pricey server boards/chipsets that have ECC RAM available" or "get bent".

Apparently ECC does not prevent this

https://www.vusec.net/projects/eccploit/

Re: Try to make sudo less vulnerable to Rowhammer attacks

#143

Earlier quoted context omitted.

You get a "choice". The choice just boils down to "buy pricey server boards/chipsets that have ECC RAM available" or "get bent".

Apparently ECC does not prevent this https://www.vusec.net/projects/eccploit/

Awesome link - the ECC side channel seems obvious in retrospect.

ECC still superior by a longshot, this information notwithstanding.

Re: Try to make sudo less vulnerable to Rowhammer attacks

#144
post #84
post #77

Earlier quoted context omitted.

It makes sense to put it in the DRAM controller for many reasons. One is that the DRAM silicon process is optimized for memory but terrible for logic. Also, a DRAM bank is several chips in parallel to get the data bus width, and they would all have to duplicate the logic. The disadvantage is that the controller and memory are made by different companies, so standards are required to agree on what access patterns are…

Agree. The extreme secrecy of DRAM manufacturers about the innards of their chips puts an additional obstacles in the way of memory controllers (MCs) implementing efficient Rowhammer defences. In particular, if the MC doesn't know which addresses are corresponding to neighbouring rows, how can an MC know with certainty that any concrete row is being attacked? (And, to the best of my knowledge, DRAM manufacturers don'…

It might be good enough to detect a large number of accesses to any single row and then initiate a complete refresh. This wouldn't be triggered often by normal software. Most exploits have to use cache flush instructions, and with modern several-way-associative caches it would be rare for normal code to trigger it accidentally. In that case, the DRAM maker just has to specify the maximum number of accesses to any row.

Re: Try to make sudo less vulnerable to Rowhammer attacks

#145
post #55

Earlier quoted context omitted.

Interesting. I did not expect that Rowhammer was architecture specific, only that the test I found was. I also did not expect that the various defenses, including ECC, could be bypassed.

It cannot be completely bypassed. The attacker cannot control precisely which bits will be erroneous. When much more than 2 bits become erroneous, in a small fraction of the cases no error will be detected but a wrong value will be read at the next access. However, in the majority of the cases an error will be detected, either non-correctable, or correctable in which case the corrected value will be wrong. Despite th…

Shouldn't an ECC non-correctable error trigger an immediate shutdown, because bad data could be committed to disk? (I guess unsafe shutdown could cause corruption elsewhere, but that seems like a reasonable risk) If attacks are a serious threat, then it would seem any alert that doesn't trigger immediate action would be risky (i.e. the attacker just erases alerts from logs).

Re: Try to make sudo less vulnerable to Rowhammer attacks

#146
post #134

Earlier quoted context omitted.

I think if you (row)hammer hard enough, every DRAM will eventually flip a bit.

Read the original Rowhammer paper where they tested various manufacturers and years --- this only started showing up around 2009, and DRAM from before that time was entirely immune to it.

Sorry, I should have said: ... (row)hammer hard enough, every sufficiently dense/modern DRAM ...

Re: Try to make sudo less vulnerable to Rowhammer attacks

#147
This software mitigation technique for Rowhammer could also be useful for improving the reliability of programs running on microcontrollers in high radiation environments, e.g. satellite in Earth orbit.

By maximising the Hamming distance between binary values used in enumerations (enum variables) and boolean variables, one could detect if the code has entered an invalid execution path and then trigger a watchdog reset, e.g. an else statement or a switch statement with a fall through case that would not normally be reachable.

Post reply on HN