[Bug libc/32440] getrandom() in glibc 2.41 (development) returns EINVAL as retcode instead of errno

fweimer at redhat dot com sourceware-bugzilla@sourceware.org
Wed Dec 11 16:50:59 GMT 2024


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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Target Milestone|---                         |2.41
            Version|unspecified                 |2.41
             Status|ASSIGNED                    |RESOLVED

--- Comment #8 from Florian Weimer <fweimer at redhat dot com> ---
Fixed in 2.41 via:

commit 4f5704ea347e52ac3f272d1341da10aed6e9973e
Author: Florian Weimer <fweimer@redhat.com>
Date:   Tue Dec 10 16:17:06 2024 +0100

    powerpc: Use correct procedure call standard for getrandom vDSO call (bug
32440)

    A plain indirect function call does not work on POWER because
    success and failure are signaled through a flag register, and
    not via the usual Linux negative return value convention.

    This has potential security impact, in two ways: the return value
    could be out of bounds (EAGAIN is 11 on powerpc6le), and no
    random bytes have been written despite the non-error return value.

    Fixes commit 461cab1de747f3842f27a5d24977d78d561d45f9 ("linux: Add
    support for getrandom vDSO").

    Reported-by: Ján Stanček <jstancek@redhat.com>
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>

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


More information about the Glibc-bugs mailing list