Re: [PATCH] ucounts: fix counter leak in inc_rlimit_get_ucounts()
From: Roman Gushchin
Date: Thu Oct 31 2024 - 13:38:54 EST
On Thu, Oct 31, 2024 at 04:56:01AM +0000, Andrei Vagin wrote:
> The inc_rlimit_get_ucounts() increments the specified rlimit counter and
> then checks its limit. If the value exceeds the limit, the function
> returns an error without decrementing the counter.
>
> Fixes: 15bc01effefe ("ucounts: Fix signal ucount refcounting")
> Tested-by: Roman Gushchin <roman.gushchin@xxxxxxxxx>
> Co-debugged-by: Roman Gushchin <roman.gushchin@xxxxxxxxx>
> Cc: Kees Cook <kees@xxxxxxxxxx>
> Cc: Andrei Vagin <avagin@xxxxxxxxxx>
> Cc: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx>
> Cc: Alexey Gladkov <legion@xxxxxxxxxx>
> Cc: <stable@xxxxxxxxxxxxxxx>
> Signed-off-by: Andrei Vagin <avagin@xxxxxxxxxx>
Acked-by: Roman Gushchin <roman.gushchin@xxxxxxxxx>
Thanks!