#873047 libgfshare: gfsplit SIGSEGV if /dev/urandom is not accessible

#873047#5
Date:
2017-08-24 02:13:57 UTC
From:
To:
Hi,

gfsplit SIGSEGV if /dev/urandom is not accessible as it doesn't fallback
to the (correctly named!) gfshare_bad_idea_but_fill_rand_using_random; it
prints a warning to stderr.

Patch attached.


Best wishes,

#873047#10
Date:
2017-08-24 21:58:29 UTC
From:
To:
Hi Simon,

Updated patch attached.

For some reason vim went a bit crazy and set gfshare_fill_rand twice. Y'know,
just to be sure it's set...


Best wishes,

#873047#15
Date:
2018-01-27 21:51:20 UTC
From:
To:
I can't help wondering whether this might be deliberate, or at least,
not a bad idea. The upstream commit message that changed the ABI to make
it mandatory to set a randomness-obtaining function says:

"""
Update to require gfshare_fill_rand to be initialised.

Require explicit initialisation of gfshare_fill_rand so that
numpties get a SEGV instead of bad randomness.
"""
— https://git.gitano.org.uk/libgfshare.git/commit/?id=da0566422af4e0ad5c9e17cfe21f563e4274338d

and I think failure to read /dev/urandom is a similar situation? If
you're using gfsplit/gfcombine for crypto, it had better be using
crypto-quality randomness (I don't think the theoretical basis for
libgfshare is sound if your randomness isn't random).

If that's the intention, it would be better if it was clearly deliberate
by calling abort() or fprintf() + exit().

    smcv

#873047#20
Date:
2026-05-10 10:00:36 UTC
From:
To:
Version: 1.0.3-1

This was implemented in 1.0.3 upstream, closing the bug.

     smcv