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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 7 Jul 2022 10:12:09 -0400
From:   Stefan Berger <stefanb@...ux.ibm.com>
To:     "Serge E. Hallyn" <serge@...lyn.com>
Cc:     linux-integrity@...r.kernel.org, zohar@...ux.ibm.com,
        christian.brauner@...ntu.com, containers@...ts.linux.dev,
        dmitry.kasatkin@...il.com, ebiederm@...ssion.com,
        krzysztof.struczynski@...wei.com, roberto.sassu@...wei.com,
        mpeters@...hat.com, lhinds@...hat.com, lsturman@...hat.com,
        puiterwi@...hat.com, jejb@...ux.ibm.com, jamjoom@...ibm.com,
        linux-kernel@...r.kernel.org, paul@...l-moore.com, rgb@...hat.com,
        linux-security-module@...r.kernel.org, jmorris@...ei.org,
        jpenumak@...hat.com, Christian Brauner <brauner@...nel.org>
Subject: Re: [PATCH v12 04/26] ima: Move arch_policy_entry into ima_namespace



On 5/20/22 22:46, Serge E. Hallyn wrote:
> On Wed, Apr 20, 2022 at 10:06:11AM -0400, Stefan Berger wrote:

>> @@ -1005,7 +1003,8 @@ void ima_update_policy(struct ima_namespace *ns)
>>   		 * on boot.  After loading a custom policy, free the
>>   		 * architecture specific rules stored as an array.
>>   		 */
>> -		kfree(arch_policy_entry);
>> +		kfree(ns->arch_policy_entry);
>> +		ns->arch_policy_entry = NULL;
> 
> So the thing that prevents multiple racing occurances of the above two lines is
> that ima_open_policy() sets IMA_FS_BUSY (or returns EBUSY) and then removes
> this file before clearing the flag, right?

Correct.

> 
> Seems good.
> 
> Reviewed-by: Serge Hallyn <serge@...lyn.com>
> 
> 
>>   	}
>>   	ima_update_policy_flags(ns);
>>   
>> -- 
>> 2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ