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]
Message-ID: <20190601210858.GG31203@kadam>
Date:   Sun, 2 Jun 2019 00:08:58 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Ganapathi Bhat <gbhat@...vell.com>
Cc:     Colin King <colin.king@...onical.com>,
        Amitkumar Karwar <amitkarwar@...il.com>,
        Nishant Sarmukadam <nishants@...vell.com>,
        Xinming Hu <huxinming820@...il.com>,
        Kalle Valo <kvalo@...eaurora.org>,
        "David S . Miller" <davem@...emloft.net>,
        "linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [EXT] Re: [PATCH] mwifiex: check for null return from skb_copy

On Sat, Jun 01, 2019 at 05:29:26PM +0000, Ganapathi Bhat wrote:
> Hi Dan,
> 
> > >  	if (is_multicast_ether_addr(ra)) {
> > >  		skb_uap = skb_copy(skb, GFP_ATOMIC);
> > > +		if (!skb_uap)
> > > +			return -ENOMEM;
> > 
> > I think we would want to free dev_kfree_skb_any(skb) before returning.
> I think if the pointer is NULL, no need to free it; 

You're misreading skb vs skb_uap.  "skb_uap" is NULL but "skb" is
non-NULL and I'm pretty sure we should free it.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ