From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Bruens Date: Sun, 28 Aug 2016 22:55:44 +0200 Subject: [U-Boot] [PATCH v2 5/5] ext4: optimize direntlen loops In-Reply-To: <1471940862-6663-6-git-send-email-michael@walle.cc> References: <1471940862-6663-1-git-send-email-michael@walle.cc> <1471940862-6663-6-git-send-email-michael@walle.cc> Message-ID: <1545282.mnnLJHC7px@pebbles.site> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Dienstag, 23. August 2016 10:27:42 CEST Michael Walle wrote: > direntlen is always >= 8. Therefore, the loop condition is always true. > > Signed-off-by: Michael Walle > Suggested-by: Stefan Br?ns Thinking again about it, direntlen is read from disk, and as any outside data should be untrusted. In case the direntlen is 0, we get an infinite loop here. Also see commit 54d68e9333ff65d135faac68fa01be4276f1371f : fs: ext4: Prevent infinite loop in ext4fs_iterate_dir So better drop this patch. Kind regards, Stefan -- Stefan Br?ns / Bergstra?e 21 / 52062 Aachen home: +49 241 53809034 mobile: +49 151 50412019 work: +49 2405 49936-424