From: Tom Rini Date: Wed, 5 Jun 2013 08:34:14 -0400 Subject: [U-Boot] disk: Fix possible out-of-bounds access in part_efi.c In-Reply-To: <1369004014-11395-1-git-send-email-marex@denx.de> References: <1369004014-11395-1-git-send-email-marex@denx.de> Message-ID: <20130605123414.GM10720@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sun, May 19, 2013 at 12:53:34PM -0000, Marek Vasut wrote: > Make sure to never access beyond bounds of either EFI partition name > or DOS partition name. This situation is happening: > > part.h: disk_partition_t->name is 32-byte long > part_efi.h: gpt_entry->partition_name is 36-bytes long > > The loop in part_efi.c copies over 36 bytes and thus accesses beyond > the disk_partition_t->name . > > Fix this by picking the shortest of source and destination arrays and > make sure the destination array is cleared so the trailing bytes are > zeroed-out and don't cause issues with string manipulation. > > Signed-off-by: Marek Vasut > Cc: Tom Rini > Cc: Simon Glass Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: