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: <A94F2FE5-9403-420E-ACBE-C9DF0BBEC35E@umn.edu>
Date:   Tue, 12 Mar 2019 00:26:17 -0500
From:   Kangjie Lu <kjlu@....edu>
To:     David Miller <davem@...emloft.net>
Cc:     pakki001@....edu, dchickles@...vell.com, sburla@...vell.com,
        fmanlunas@...vell.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: liquidio: fix NULL pointer dereferences



> On Mar 11, 2019, at 2:17 PM, David Miller <davem@...emloft.net> wrote:
> 
> From: Kangjie Lu <kjlu@....edu>
> Date: Mon, 11 Mar 2019 00:46:15 -0500
> 
>> @@ -1960,6 +1966,12 @@ static int setup_nic_devices(struct octeon_device *octeon_dev)
>> 		sc = (struct octeon_soft_command *)
>> 			octeon_alloc_soft_command(octeon_dev, data_size,
>> 						  resp_size, 0);
>> +		if (!sc) {
>> +			dev_err(&octeon_dev->pci_dev->dev,
>> +				"Failed to allocate octeon_soft_command\n");
>> +			return -ENOMEM;
>> +		}
> 
> Again, very sloppy.  You have to branch to setup_nic_dev_free in this situation
> otherwise you leak devices allocated and setup from previous iterations of the
> loop this code is in.

I was referring to how the following code handles errors. 
Does that mean that the returns at line 2004, 2012, and 2019 are also leaking 
devices?

> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ