Re:KARL – kernel address randomized link (OpenBSD)
by adrianN on Tuesday June 13, 2017 @06:57AM
(#14543933)
That's a good idea. I wonder how difficult it would be to teach GCC's linker to do that.
[ Parent
| on HN ]
Re:KARL – kernel address randomized link (OpenBSD)
by vtsingaras on Tuesday June 13, 2017 @07:41AM
(#14544072)
```within a compilation unit```
It's the compiler that needs to do the job.
Re:KARL – kernel address randomized link (OpenBSD)
by willvarfar on Tuesday June 13, 2017 @08:47AM
(#14544331)
I think both can do it.
The compiler can do it within the compilation unit, randomizing the order of the blocks and globals.
The basic linker just quickly concatenates compilation units, but randomizes the order that it concatenates the units and randomizing the GOT and PLT order.
A link-time-optimizing linker can actually randomize the order of the blocks and globals and the compiler wouldn't need to be involved.
On the Mill CPU project we plan to randomize the order of everything each time we 'specialize'; kernels and user-space will have randomized GOT and block order on every installation, and it also helps smoke out bugs :)