[PATCH] powerpc: Use correct procedure call standard for getrandom vDSO call (bug 32440)
Florian Weimer
fweimer@redhat.com
Wed Dec 11 08:29:52 GMT 2024
* Florian Weimer:
> A plain indirect function call does not work on POWER because
> success and failure are signalled through are 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>
I'll have to send a v2 because there is another call site that needs
converting. And per convention, the return type of the
INTERNAL_VSYSCALL_CALL macro is long int, not ssize_t.
Thanks,
Florian
More information about the Libc-alpha
mailing list