libbsd and arc4random()
alx.manpages at gmail.com
Fri Dec 30 12:29:23 UTC 2022
glibc developers consider libbsd's arc4random(3) unsafe, since there are
situations in which it should drop the buffer but which can't be detected (and
libbsd's source code seems to acknowledge this). They added arc4random(3) in
glibc with kernel support, which is safer to use.
Could you somehow make that libbsd only provide arc4random(3) if glibc doesn't
provide it? You'll probably have to use aliases and linker magic, to not load
your function before the glibc one, I guess. Or maybe just compile it
conditionally on the glibc version.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: OpenPGP digital signature
More information about the libbsd