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]
Date:	Tue, 24 Nov 2009 02:22:26 +0000
From:	David Vrabel <david.vrabel@....com>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	Roel Kluin <roel.kluin@...il.com>, linux-usb@...r.kernel.org,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] wusb: Use sizeof struct rather than pointer

Andrew Morton wrote:
> 
> But I wonder if the code will still work.  Because we then go on to do
> 
>         secd_size = le16_to_cpu(secd->wTotalLength);
>         secd = krealloc(secd, secd_size, GFP_KERNEL);
> 
> which implies (to me) that the thing we read from the device might
> indeed have been smaller than we expected, in which case the
> newly-fixed check will cause a failure.

We first read the security descriptor which tells use the total length 
of the security descriptor plus all the following encryption type 
descriptors.  Your revised patch is fine.

David
--
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