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] [day] [month] [year] [list]
Message-ID: <281db3e6-fde9-7fb6-9c44-d2f149c21304@huawei.com>
Date:   Thu, 20 Oct 2022 08:59:59 +0800
From:   shangxiaojing <shangxiaojing@...wei.com>
To:     Jakub Kicinski <kuba@...nel.org>
CC:     <bongsu.jeon@...sung.com>, <krzysztof.kozlowski@...aro.org>,
        <pabeni@...hat.com>, <netdev@...r.kernel.org>
Subject: Re: [PATCH v2] nfc: virtual_ncidev: Fix memory leak in
 virtual_nci_send()



On 2022/10/20 8:33, Jakub Kicinski wrote:
> On Tue, 18 Oct 2022 19:49:35 +0800 Shang XiaoJing wrote:
>> --- a/drivers/nfc/virtual_ncidev.c
>> +++ b/drivers/nfc/virtual_ncidev.c
>> @@ -54,16 +54,19 @@ static int virtual_nci_send(struct nci_dev *ndev, struct sk_buff *skb)
>>   	mutex_lock(&nci_mutex);
>>   	if (state != virtual_ncidev_enabled) {
>>   		mutex_unlock(&nci_mutex);
>> +		consume_skb(skb);
>>   		return 0;
>>   	}
>>   
>>   	if (send_buff) {
>>   		mutex_unlock(&nci_mutex);
>> +		consume_skb(skb);
>>   		return -1;
> 
> these two should be kfree_skb() as we're dropping a packet

ok, will be fixed in v3.

Thanks,
-- 
Shang XiaoJing

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ