[PATCH 3/3] getcwd: Set errno to ERANGE for size == 1 (CVE-2021-3999)
Siddhesh Poyarekar
siddhesh@sourceware.org
Tue Jan 18 14:44:49 GMT 2022
On 18/01/2022 19:29, Adhemerval Zanella via Libc-alpha wrote:
>
> Shouldn't we fix it on posix generic implementation then?
>
I added the shortcircuit in the generic as well as linux
implementations. Should I only restrict it to the posix one?
Technically the posix implementation is the only one that writes beyond
buffer bounds, but the linux target is the only one that has the
reproducer due to the linux-specific features used to get the
underflow+overflow going.
Thanks,
Siddhesh
More information about the Libc-alpha
mailing list