public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/31612] New: arc4random fails to fallback to /dev/urandom if getrandom is not present
@ 2024-04-05 13:09 adhemerval.zanella at linaro dot org
  0 siblings, 0 replies; only message in thread
From: adhemerval.zanella at linaro dot org @ 2024-04-05 13:09 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31612

            Bug ID: 31612
           Summary: arc4random fails to fallback to /dev/urandom if
                    getrandom is not present
           Product: glibc
           Version: 2.39
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: adhemerval.zanella at linaro dot org
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

The __getrandom_nocancel used in __arc4random_buf used INLINE_SYSCALL_CALL
which returns -1/errno and the loop checks for the return value instead of
errno to fallback to /dev/urandom.

The malloc code now uses __getrandom_nocancel_nostatus, which uses
INTERNAL_SYSCALL_CALL, so there is no need to use the variant that does not set
errno (BZ#29624).

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-05 13:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-05 13:09 [Bug libc/31612] New: arc4random fails to fallback to /dev/urandom if getrandom is not present adhemerval.zanella at linaro dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).