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:   Wed, 19 Oct 2022 17:33:51 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Shang XiaoJing <shangxiaojing@...wei.com>
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 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ