https://bugzilla.novell.com/show_bug.cgi?id=856915
https://bugzilla.novell.com/show_bug.cgi?id=856915#c0
Summary: devel:libraries:c_c++/libgcrypt: Bug
Classification: openSUSE
Product: openSUSE.org
Version: unspecified
Platform: Other
OS/Version: Other
Status: ASSIGNED
Severity: Normal
Priority: P5 - None
Component: 3rd party software
AssignedTo: mvyskocil@suse.com
ReportedBy: tcech@suse.com
QAContact: opensuse-communityscreening@forge.provo.novell.com
CC: crrodriguez@opensuse.org
Found By: L3
Blocker: ---
I'm playing a bit with gnunet which was released few days ago. It requires
libgcrypt >= 1.6.0 so I took the version which was in devel:libraries:c_c++.
When I tried first run of gnunet-arm, it failed with weird message:
Fatal: can't open /dev/urandom: No such file or directory
Some digging revealed failure in open_device() function (libgcrypt):
#0 0x00007ffff75fc849 in raise () from /lib64/libc.so.6
#1 0x00007ffff75fdcd8 in abort () from /lib64/libc.so.6
#2 0x00007ffff72f3b04 in _gcry_logv (level=level@entry=40,
fmt=fmt@entry=0x7ffff73ae595 "can't open %s: %s\n",
arg_ptr=arg_ptr@entry=0x7fffffffd678) at misc.c:142
#3 0x00007ffff72f3e74 in _gcry_log_fatal (fmt=fmt@entry=0x7ffff73ae595 "can't
open %s: %s\n") at misc.c:230
#4 0x00007ffff73868ed in open_device (name=0x7ffff73adf1f "/dev/urandom",
retry=<optimized out>, fatal=1) at rndlinux.c:83
#5 0x00007ffff7386c88 in _gcry_rndlinux_gather_random (add=0x7ffff7383df0
, origin=RANDOM_ORIGIN_SLOWPOLL, length=60, level=1) at
rndlinux.c:201
#6 0x00007ffff7383b50 in read_random_source
(orgin=orgin@entry=RANDOM_ORIGIN_SLOWPOLL, length=length@entry=120,
level=level@entry=1) at random-csprng.c:1288
#7 0x00007ffff7384c34 in random_poll () at random-csprng.c:1114
#8 read_pool (level=0, length=<optimized out>, buffer=0x7ffff75c60c4
"") at random-csprng.c:1008
#9 _gcry_rngcsprng_randomize (buffer=<optimized out>, length=<optimized out>,
level=<optimized out>) at random-csprng.c:556
#10 0x00007ffff73839c5 in _gcry_randomize (level=GCRY_WEAK_RANDOM, length=8,
buffer=0x7ffff75c60c4 ) at random.c:354
#11 _gcry_create_nonce (buffer=0x7fffffffdc8c, length=4) at random.c:479
#12 0x00007ffff79a1aad in GNUNET_CRYPTO_random_u32 () from
/usr/lib64/libgnunetutil.so.9
#13 0x00007ffff7987ded in GNUNET_CRYPTO_random_init () from
/usr/lib64/libgnunetutil.so.9
..
Relevant code looks like this (random/rndlinux.c):
70 fd = open (name, O_RDONLY);
71 if (fd == -1 && retry)
72 {
73 struct timeval tv;
74
75 tv.tv_sec = 5;
76 tv.tv_usec = 0;
77 _gcry_random_progress ("wait_dev_random", 'X', 0,
(int)tv.tv_sec);
78 select (0, NULL, NULL, NULL, &tv);
79 goto again;
80 }
81 {
82 if (fatal)
83 log_fatal ("can't open %s: %s\n", name, strerror(errno) );
84 return fd;
85 }
86
87 if (set_cloexec_flag (fd))
88 log_error ("error setting FD_CLOEXEC on fd %d: %s\n",
89 fd, strerror (errno));
Lines 81-85 looks suspicious, these changes are from one
chunk of libgcrypt-1.5.0-etc_gcrypt_rngseed-symlink.diff:
- if (fd == -1)
- log_fatal ("can't open %s: %s\n", name, strerror(errno) );
+ {
+ if (fatal)
+ log_fatal ("can't open %s: %s\n", name, strerror(errno) );
+ return fd;
+ }
Is this really correct? It causes that lines 87+ are never run.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.