[PATCH 3/3] getcwd: Set errno to ERANGE for size == 1 (CVE-2021-3999)
Andreas Schwab
schwab@linux-m68k.org
Tue Jan 18 13:30:17 GMT 2022
On Jan 18 2022, Siddhesh Poyarekar wrote:
> On 18/01/2022 18:43, Andreas Schwab wrote:
>> On Jan 18 2022, Siddhesh Poyarekar wrote:
>>
>>> We then process it to try and get the cwd anyway by using the posix
>>> variant.
>> Which returns the appropriate error.
>>
>
> In the specific case of an unprivileged mount on the same directory, it
> ends up underflowing the buffer before returning.
No, it returns with ERANGE.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
More information about the Libc-alpha
mailing list