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]
Message-ID: <997876b6-39b4-64f0-648a-8b042b03a3a8@linaro.org>
Date:   Fri, 12 Nov 2021 21:42:11 -0800
From:   Tadeusz Struk <tadeusz.struk@...aro.org>
To:     Jakub Kicinski <kuba@...nel.org>, Jon Maloy <jmaloy@...hat.com>
Cc:     Ying Xue <ying.xue@...driver.com>,
        "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
        tipc-discussion@...ts.sourceforge.net,
        linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Dmitry Vyukov <dvyukov@...gle.com>
Subject: Re: [PATCH] tipc: check for null after calling kmemdup

On 11/12/21 20:13, Jakub Kicinski wrote:
>>> @@ -597,6 +597,11 @@ static int tipc_aead_init(struct tipc_aead **aead, struct tipc_aead_key *ukey,
>>>    	tmp->cloned = NULL;
>>>    	tmp->authsize = TIPC_AES_GCM_TAG_SIZE;
>>>    	tmp->key = kmemdup(ukey, tipc_aead_key_size(ukey), GFP_KERNEL);
>>> +	if (!tmp->key) {
>>> +		free_percpu(tmp->tfm_entry);
>>> +		kfree_sensitive(tmp);
>>> +		return -ENOMEM;
>>> +	}
>> Acked-by: Jon Maloy<jmaloy@...hat.com>
> Hm, shouldn't we free all the tfm entries here?

Right, I think we just need to call tipc_aead_free(&tmp->rcu);
here and return an error.

-- 
Thanks,
Tadeusz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ