News for hackers. Stuff that matters.
Re:OpenBSD Innovations by eru on Saturday February 22, 2025 @07:10PM (#43144724)
> 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.

Re:OpenBSD Innovations by brynet on Saturday February 22, 2025 @07:16PM (#43144773)
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/mgp00...

Re:OpenBSD Innovations by ephaeton on Saturday February 22, 2025 @07:12PM (#43144741)
I 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.
Re:OpenBSD Innovations by ndesaulniers on Sunday February 23, 2025 @02:56PM (#43152625)
I would imagine that the use of uninitialized locals could no longer be deterministically used to exploit a program.