lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 11 Aug 2021 13:48:50 -0500
From:   Hsuan-Chi Kuo <hsuanchikuo@...il.com>
To:     Kees Cook <keescook@...omium.org>,
        Wiktor Garbacz <wiktorg@...gle.com>
Cc:     Andy Lutomirski <luto@...capital.net>,
        Will Drewry <wad@...omium.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] seccomp: Fix setting number of loaded filters

Thanks.

I was just trying to understand how seccomp works by code reading and 
spotted this bug.


On 8/11/21 1:46 PM, Kees Cook wrote:
> 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.
> Hi,
>
> 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[1], and add you as a reporter.
>
> Out of curiosity, how did you (or Hsuan-Chi Kuo) find this? Broken
> behavior, code reading, static analysis?
>
> Thanks!
>
> -Kees
>
> [1] https://lore.kernel.org/lkml/20210304233708.420597-1-hsuanchikuo@gmail.com/
>
>> Signed-off-by: Wiktor Garbacz <wiktorg@...gle.com>
>> ---
>>   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)
>>   		smp_store_release(&thread->seccomp.filter,
>>   				  caller->seccomp.filter);
>>   		atomic_set(&thread->seccomp.filter_count,
>> -			   atomic_read(&thread->seccomp.filter_count));
>> +			   atomic_read(&caller->seccomp.filter_count));
>>   
>>   		/*
>>   		 * Don't let an unprivileged task work around
>> -- 
>> 2.32.0.605.g8dce9f2422-goog
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ