News for hackers. Stuff that matters.
Re:OpenBSD Will Get Unique Kernels on Each Reboot by danesparza on Thursday July 06, 2017 @09:35AM (#14710259)
Any ideas how these are randomized? Just wondering if these are still vulnerable to a timing attack...
Re:OpenBSD Will Get Unique Kernels on Each Reboot by brynet on Thursday July 06, 2017 @09:53AM (#14710400)
What part? At least for the library randomization, a special libc.so.X.Y.a is part of the base install, objects are extracted with ar(1), and then re-linked in a random order (sort -R/arc4random(3)) to create a working shared library.

The kernel has a similar reordering stage, best explained by Theo de Raadt: https://marc.info/?l=openbsd-tech&m=149887978201230&w=2

The full implementation is in the tree.

Re:OpenBSD Will Get Unique Kernels on Each Reboot by wlesieutre on Thursday July 06, 2017 @11:04AM (#14710930)
Isn't secure random number generation a problem immediately after boot? Curious what arc4random is using as an entropy source.
Re:OpenBSD Will Get Unique Kernels on Each Reboot by brynet on Thursday July 06, 2017 @11:21AM (#14711068)
OpenBSD's bootloader seeds the kernel, mixing in other entropy sources. High quality random numbers are available very early compared to other operating systems.

See Theo's talk from Hackfest 2014, an updated talk originally given at EuroBSDcon 2014:

https://www.openbsd.org/papers/hackfest2014-arc4random/index...

Page 19 and beyond explain this in detail: https://www.openbsd.org/papers/hackfest2014-arc4random/mgp00...

Re:OpenBSD Will Get Unique Kernels on Each Reboot by joosters on Thursday July 06, 2017 @05:09PM (#14713986)
Does it actually do the randomisation at boot time? It's unclear from the article, but OpenBSD could be randomising the next kernel to boot after the current one has been loaded. This could be performed some time after the boot process, allowing more randomness, and minimising the boot-time workload/code complexity.
Re:OpenBSD Will Get Unique Kernels on Each Reboot by campuscodi on Thursday July 06, 2017 @05:46PM (#14714223)
No. After boot time. As you said.
Re:OpenBSD Will Get Unique Kernels on Each Reboot by problems on Thursday July 06, 2017 @11:21AM (#14711066)
Many modern systems have hardware RNGs, but they may also be using stored seeds.
Re:OpenBSD Will Get Unique Kernels on Each Reboot by Gracana on Thursday July 06, 2017 @11:58AM (#14711331)
Yep, there's a stored seed (/etc/random.seed) that gets added to the mix at boot.
Re:OpenBSD Will Get Unique Kernels on Each Reboot by excaliboor on Thursday July 06, 2017 @04:53PM (#14713864)
> Many

^[which?] ^[citation needed]

Re:OpenBSD Will Get Unique Kernels on Each Reboot by problems on Thursday July 06, 2017 @05:27PM (#14714109)
On desktops, Intel Ivy Bridge and newer and everything AMD since June 2015.

On mobile, most mobile SoCs include security stuff, Qualcomm seems to have had them since at least the Snapdragon 805. See here for the addition of the RNG to the linux kernel in 2013: https://lwn.net/Articles/570158/

Even common embedded SoCs like those used in the ESP8266 include hardware RNGs.

Really, there's no excuse for not using it as at least one factor. If you're concerned about possible backdoors, xor it with your own CSPRNG in software like the Linux kernel does.

Re:OpenBSD Will Get Unique Kernels on Each Reboot by zurn on Wednesday July 12, 2017 @09:06AM (#14752144)
TPM has one too.
Re:OpenBSD Will Get Unique Kernels on Each Reboot by awordnot on Thursday July 06, 2017 @05:00PM (#14713914)
Recent AMD and Intel systems with AES-NI provide a hardware RNG. Although as far as I was aware this is not used on OpenBSD for fear of hardware backdoors.
Re:OpenBSD Will Get Unique Kernels on Each Reboot by Someone on Thursday July 06, 2017 @05:03PM (#14713941)
See https://en.wikipedia.org/wiki/RdRand and (same page) https://en.wikipedia.org/wiki/RdRand#Reception for info on concerns about backdrops.