From: Tom Rini Date: Fri, 23 Sep 2016 15:57:25 -0400 Subject: [U-Boot] [U-Boot, v5, 10/16] ext4: Avoid out-of-bounds access of block bitmap In-Reply-To: References: Message-ID: <20160923195725.GN4884@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 Tue, Sep 06, 2016 at 04:36:50AM +0200, Stefan Br?ns wrote: > If the blocksize is 1024, count is initialized with 1. Incrementing count > by 8 will never match (count == fs->blksz * 8), and ptr may be > incremented beyond the buffer end if the bitmap is filled. Add the > startblock offset after the loop. > > Remove the second loop, as only the first iteration will be done. > > Signed-off-by: Stefan Br?ns > Reviewed-by: Lukasz Majewski 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: Digital signature URL: