On Fri, Feb 21, 2025 at 10:02:54AM +0100, Christian Hesse wrote: > Michael Chang via Grub-devel <grub-devel@gnu.org> on Fri, 2025/02/21 09:06: > > Previously, the number of extent entries was not properly capped based > > on the actual available space. This could lead to insufficient reads for > > external extents, since the computation was based solely on the inline > > extent layout. > > > > In this patch, when processing the extent header, we determine whether > > the header is stored inline (i.e., at inode->blocks.dir_blocks) or in an > > external extent block. We then clamp the number of entries accordingly > > (using max_inline_ext for inline extents and max_external_ext for > > external extent blocks). > > > > This change ensures that only the valid number of extent entries is > > processed, preventing out-of-bound reads and potential filesystem > > corruption. > > > > Fixes: 7e2f750f0a (fs/ext2: Fix out-of-bounds read for inline extents) > > > > Signed-off-by: Michael Chang <mch...@suse.com> > > Tested and it fixes reading from loopback disk on ext4 for me. Thanks! > > Tested-by: Christian Hesse <m...@eworm.de>
Reviewed-by: Daniel Kiper <daniel.ki...@oracle.com> Daniel _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel