From: Tom Rini Date: Sat, 17 Nov 2018 09:08:30 -0500 Subject: [U-Boot] [U-Boot, 2/2] fdt_region: Ensure that depth never goes below -1 In-Reply-To: <1541620306-14314-2-git-send-email-trini@konsulko.com> References: <1541620306-14314-2-git-send-email-trini@konsulko.com> Message-ID: <20181117140830.GG11247@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 Wed, Nov 07, 2018 at 02:51:46PM -0500, Tom Rini wrote: > From: Konrad Beckmann > > A specially crafted FIT image makes it possible to overflow the stack > with controlled values when using the verified boot feature. Depending > on the memory layout, this could be used to overwrite configuration > variables on the heap and setting them to 0, e.g. disable signature > verification, thus bypassing it. > > This change fixes a bug in fdt_find_regions where the fdt structure is > parsed. A lower value than -1 of depth can lead to a buffer underflow > write on the stack. > > Signed-off-by: Konrad Beckmann > Reviewed-by: Simon Glass Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: