[PATCH 3/3] getcwd: Set errno to ERANGE for size == 1 (CVE-2021-3999)
Adhemerval Zanella
adhemerval.zanella@linaro.org
Tue Jan 18 16:30:39 GMT 2022
On 18/01/2022 11:44, Siddhesh Poyarekar wrote:
> 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.
I think it would make sense only to fix on posix one, since the syscall
already handle it correctly.
More information about the Libc-alpha
mailing list