[PATCH v2] linux-user: fix getgroups/setgroups allocations

2022-12-17 Thread Michael Tokarev
linux-user getgroups(), setgroups(), getgroups32() and setgroups32() used alloca() to allocate grouplist arrays, with unchecked gidsetsize coming from the "guest". With NGROUPS_MAX being 65536 (linux, and it is common for an application to allocate NGROUPS_MAX for getgroups()), this means a typica

Re: [PATCH v2] linux-user: fix getgroups/setgroups allocations

2023-01-25 Thread Laurent Vivier
Le 17/12/2022 à 10:31, Michael Tokarev a écrit : linux-user getgroups(), setgroups(), getgroups32() and setgroups32() used alloca() to allocate grouplist arrays, with unchecked gidsetsize coming from the "guest". With NGROUPS_MAX being 65536 (linux, and it is common for an application to allocat

Re: [PATCH v2] linux-user: fix getgroups/setgroups allocations

2023-02-03 Thread Laurent Vivier
On 1/25/23 14:18, Laurent Vivier wrote: Le 17/12/2022 à 10:31, Michael Tokarev a écrit : linux-user getgroups(), setgroups(), getgroups32() and setgroups32() used alloca() to allocate grouplist arrays, with unchecked gidsetsize coming from the "guest".  With NGROUPS_MAX being 65536 (linux, and i

Re: [PATCH v2] linux-user: fix getgroups/setgroups allocations

2023-02-03 Thread Richard Henderson
On 2/3/23 11:49, Laurent Vivier wrote: On 1/25/23 14:18, Laurent Vivier wrote: Le 17/12/2022 à 10:31, Michael Tokarev a écrit : linux-user getgroups(), setgroups(), getgroups32() and setgroups32() used alloca() to allocate grouplist arrays, with unchecked gidsetsize coming from the "guest".  Wi

Re: [PATCH v2] linux-user: fix getgroups/setgroups allocations

2023-02-03 Thread Laurent Vivier
Le 03/02/2023 à 22:57, Richard Henderson a écrit : On 2/3/23 11:49, Laurent Vivier wrote: On 1/25/23 14:18, Laurent Vivier wrote: Le 17/12/2022 à 10:31, Michael Tokarev a écrit : linux-user getgroups(), setgroups(), getgroups32() and setgroups32() used alloca() to allocate grouplist arrays, wi

Re: [PATCH v2] linux-user: fix getgroups/setgroups allocations

2022-12-17 Thread Richard Henderson
On 12/17/22 01:31, Michael Tokarev wrote: linux-user getgroups(), setgroups(), getgroups32() and setgroups32() used alloca() to allocate grouplist arrays, with unchecked gidsetsize coming from the "guest". With NGROUPS_MAX being 65536 (linux, and it is common for an application to allocate NGROU

Re: [PATCH v2] linux-user: fix getgroups/setgroups allocations

2023-04-09 Thread Michael Tokarev
04.02.2023 01:23, Laurent Vivier wrote: Le 03/02/2023 à 22:57, Richard Henderson a écrit : On 2/3/23 11:49, Laurent Vivier wrote: .. I'm going to remove this patch from my branch because it breaks something. When I execute LTP test suite (20200930), I have: getgroups01    1  TPASS  :  getgr

Re: [PATCH v2] linux-user: fix getgroups/setgroups allocations

2023-04-09 Thread Michael Tokarev
09.04.2023 12:06, Michael Tokarev пишет: .. Laurent, can you describe what you're doing there in a bit more details please? I'd love to fix this one.  Do you know which test is/was failing? Oh, n/m, I found it: it's getgroups01 test in testcases/kernel/syscalls/getgroups/. /mjt