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:	Mon, 28 Mar 2011 13:34:24 -0400
From:	Aristeu Rozanski <aris@...hat.com>
To:	Steven Hardy <shardy@...hat.com>
Cc:	gregkh@...e.de, mjg@...hat.com, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [GIT PATCH] Fix memory leak in qcserial driver

On Mon, Mar 28, 2011 at 03:06:26PM +0100, Steven Hardy wrote:
> @@ -198,13 +200,27 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
>  	default:
>  		dev_err(&serial->dev->dev,
>  			"unknown number of interfaces: %d\n", nintf);
> +		retval = -ENODEV;
>  		kfree(data);
> -		return -ENODEV;
>  	}
>  
> +	/* Set serial->private may be null if -ENODEV */
> +	usb_set_serial_data(serial, data);
>  	return retval;
>  }
when there's a -ENODEV, kfree() is called but the now invalid address is
set by usb_set_serial_data() anyway. am I missing something here?

-- 
Aristeu

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ