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] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 16 Jan 2019 14:36:34 -0800
From:   John Johansen <john.johansen@...onical.com>
To:     James Morris <jmorris@...ei.org>,
        Casey Schaufler <casey@...aufler-ca.com>
Cc:     linux-kernel@...r.kernel.org,
        linux-security-module@...r.kernel.org, serge@...lyn.com
Subject: Re: WARNING in apparmor_cred_free

On 1/16/19 1:14 PM, James Morris wrote:
> On Fri, 11 Jan 2019, Casey Schaufler wrote:
> 
>> >From 47134986133c822e1d88860fa2b108f92c97a7ff Mon Sep 17 00:00:00 2001
>> From: Casey Schaufler <casey@...aufler-ca.com>
>> Date: Fri, 11 Jan 2019 17:31:50 -0800
>> Subject: [PATCH 1/2] LSM: Check for NULL cred-security on free
>>
>> Check that the cred security blob has been set before trying
>> to clean it up. There is a case during credential initialization
>> that could result in this.
>>
>> Signed-off-by: Casey Schaufler <casey@...aufler-ca.com>
> 
> JJ: does this fix the problem?
> 

sorry for not responding earlier, yes it does.

Acked-by: John Johansen <john.johansen@...onical.com>

>> ---
>>  security/security.c | 7 +++++++
>>  1 file changed, 7 insertions(+)
>>
>> diff --git a/security/security.c b/security/security.c
>> index a618e22df5c6..7bffc86d4e87 100644
>> --- a/security/security.c
>> +++ b/security/security.c
>> @@ -1477,6 +1477,13 @@ int security_cred_alloc_blank(struct cred *cred, gfp_t gfp)
>>  
>>  void security_cred_free(struct cred *cred)
>>  {
>> +	/*
>> +	 * There is a failure case in prepare_creds() that
>> +	 * may result in a call here with ->security being NULL.
>> +	 */
>> +	if (unlikely(cred->security == NULL))
>> +		return;
>> +
>>  	call_void_hook(cred_free, cred);
>>  
>>  	kfree(cred->security);
>>
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ