Re: [PATCH] seccomp: Fix setting number of loaded filters
From: Kees Cook
Date: Wed Aug 11 2021 - 14:46:49 EST
On Tue, Aug 10, 2021 at 02:51:58PM +0200, Wiktor Garbacz wrote:
> The value is only reported through procfs so this
> is purely cosmetic.
Thanks for the patch! I thought this had already been fixed, but I see I
dropped the ball. :( Sorry!
I'll get the original fix landed, and add you as a reporter.
Out of curiosity, how did you (or Hsuan-Chi Kuo) find this? Broken
behavior, code reading, static analysis?
> Signed-off-by: Wiktor Garbacz <wiktorg@xxxxxxxxxx>
> kernel/seccomp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/kernel/seccomp.c b/kernel/seccomp.c
> index 057e17f3215d..6469eca8078c 100644
> --- a/kernel/seccomp.c
> +++ b/kernel/seccomp.c
> @@ -602,7 +602,7 @@ static inline void seccomp_sync_threads(unsigned long flags)
> - atomic_read(&thread->seccomp.filter_count));
> + atomic_read(&caller->seccomp.filter_count));
> * Don't let an unprivileged task work around