Earlier quoted context omitted.
Rust makes a particular class of bugs harder to write. That’s it. It doesn’t magically eliminate all bugs. “Susceptible to rowhammer” is not in the class of bugs that Rust helps with. No experienced Rust programmer actually believes it magically prevents all bugs or magically makes security-sensitive code immune to side channel attacks, so I don’t think anyone is being lulled into a false sense of security, no.
What about the Non-experienced Rust programmer? A lot of open source code are written by inexperienced people who understand the nuances of computer science primarily through hype. I think those are the kinds of people OP was asking about.
Try to make sudo less vulnerable to Rowhammer attacks
21–30 of 147 posts
Re: Try to make sudo less vulnerable to Rowhammer attacks
#22Earlier quoted context omitted.
Yes it's possible, but it's not desirable. It wouldn't be backwards compatible, and not safe for shared libraries. It's better suited for a linter-type error/warning.
It's not plausible in C, for the reasons you mention, but it might be more possible in other languages -- Rust, for example, only guarantees specific representations when instructed and doesn't allow for shared libraries without a specified representation, so it wouldn't have either issue for most application code. Dynamically-typed languages similarly should be able to choose enum values at runtime in many cases.
I wonder, is choosing random enum values at runtime more secure against Rowhammer than just having fixed values that were chosen randomly once and compiled in, since presumably the attacking code now has no way to know which bits it needs to flip? If so, it might even be desirable to implement this as a "secure enum" in a compiled language.
Re: Try to make sudo less vulnerable to Rowhammer attacks
#23 #define AUTH_SUCCESS 0x52a2925 /\* 0101001010100010100100100101 */
#define AUTH_FAILURE 0xad5d6da /* 1010110101011101011011011010 */
#define AUTH_INTR 0x69d61fc8 /* 1101001110101100001111111001000 */
#define AUTH_ERROR 0x1629e037 /* 0010110001010011110000000110111 */
#define AUTH_NONINTERACTIVE 0x1fc8d3ac /* 11111110010001101001110101100 \*/
going to see how i can work this into a project :)Re: Try to make sudo less vulnerable to Rowhammer attacks
#24i enjoyed this part: #define AUTH_SUCCESS 0x52a2925 /\* 0101001010100010100100100101 */ #define AUTH_FAILURE 0xad5d6da /* 1010110101011101011011011010 */ #define AUTH_INTR 0x69d61fc8 /* 1101001110101100001111111001000 */ #define AUTH_ERROR 0x1629e037 /* 0010110001010011110000000110111 */ #define AUTH_NONINTERACTIVE 0x1fc8d3ac /* 11111110010001101001110101100 \*/ going to see how i can work this into a project :)
Re: Try to make sudo less vulnerable to Rowhammer attacks
#25Earlier quoted context omitted.
What about the Non-experienced Rust programmer? A lot of open source code are written by inexperienced people who understand the nuances of computer science primarily through hype. I think those are the kinds of people OP was asking about.
I don't think there are going to be a large number of inexperienced Rust programmers. Inexperienced programmers write Javascript or Python, not Rust.
Re: Try to make sudo less vulnerable to Rowhammer attacks
#26This is deeply interesting. I've sometimes contemplated the possibility of doing things like this to guard against memory errors causing mis-entry to particularly critical control flow paths - this is certainly an example of that. But never heard of anyone actually trying to do this until now. A "how to write rowhammer-resistant code" writeup would definitely be useful here - even if it is definitely something people…
Re: Try to make sudo less vulnerable to Rowhammer attacks
#27I thought that Rowhammer was a thing of the past. Out of curiosity I found code to test for this and ran it on some of my hosts. My old desktop - I7-4770K/DDR3 - was susceptible. My old server - Xeon X3460/DDR3+ECC - was not. I upgraded the desktop with components based on a Ryzen 7 7700X/DDR5. It tested not susceptible. I'm not sure if that's a result of RAM designed not to be susceptible or that (I think) DDR5 RAM…
Re: Try to make sudo less vulnerable to Rowhammer attacks
#28Is there any reason for the void cast here? Theres no return value in use. (void)strlcpy(des_pass, pass,sizeof(des_pass));
strlcpy returns a size_t, so just to silence the discarded return value warning https://linux.die.net/man/3/strlcpy
Re: Try to make sudo less vulnerable to Rowhammer attacks
#29This wikipedia article must surely be inaccurate: https://en.wikipedia.org/wiki/Row_hammer The initial research into the row hammer effect, published in June 2014, described the nature of disturbance errors and indicated the potential for constructing an attack, but did not provide any examples of a working security exploit. [1] [1] (June 24, 2014). "Flipping Bits in Memory Without Accessing Them: An Experimental Stu…
Re: Try to make sudo less vulnerable to Rowhammer attacks
#30[flagged]