3 ms·
> Random-data memory: the ability to specify that a variable should be initialized at load time with random byte values (placed into a new ELF .openbsd.randomda
by eru 2y ago
> Random-data memory: the ability to specify that a variable should be initialized at load time with random byte values (placed into a new ELF .openbsd.randomdata section) was implemented in OpenBSD 5.3 by Matthew Dempsky.
What's the use case for this?
EDIT: further down is one example:
> RETGUARD is a replacement for the stack-protector which uses a per-function random cookie (located in the read-only ELF .openbsd.randomdata section) to consistency-check the return address on the stack. Implemented for amd64 and arm64 by Todd Mortimer in OpenBSD 6.4, for mips64 in OpenBSD 6.7, and powerpc/powerpc64 in OpenBSD 6.9. amd64 system call stubs also protected in OpenBSD 7.3.
- ephaeton 2y agoI suppose: Sometimes things work fine with the implicit default value that you end up with. So this will cause problems when you forget to initialize values to expected sane defaults.
- brynet 2y agohttps://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/libexec/ld.so/SPECS.randomdata https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/lib... Many things, retguard uses this for per-function random cookies, for instance. The bootloader uses this mechanism to pass data to the kernel. https://www.openbsd.org/papers/hackfest2014-arc4random/mgp00020.html https://www.openbsd.org/papers/hackfest2014-arc4random/mgp00...
- ndesaulniers 2y agoI would imagine that the use of uninitialized locals could no longer be deterministically used to exploit a program.