[PATCH v3 00/10] ext4: Overflow fixes

Tom Rini trini at konsulko.com
Thu May 15 21:32:54 CEST 2025


On Thu, May 15, 2025 at 09:26:59PM +0200, Simon Glass wrote:
> Hi Tom,
> 
> On Wed, 14 May 2025 at 23:50, Tom Rini <trini at konsulko.com> wrote:
> >
> > On Sat, May 10, 2025 at 03:06:06PM +0200, Simon Glass wrote:
> >
> > > This series fixes some potential overflows in the ext4 code with invalid
> > > or malicious filesystems.
> > >
> > > To assist with this and future work, it brings in overflow.h and part of
> > > limits.h from Linux.
> > >
> > > Changes in v3:
> > > - Split out into separate patches for easier review
> > >
> > > Changes in v2:
> > > - Add new patch to bring in linux/limits.h
> > > - Add new patch to bring in linux/overflow.h
> > > - Use Linux macros instead of gcc built-ins
> > >
> > > Simon Glass (10):
> > >   Bring in linux/limits.h
> > >   Bring in linux/overflow.h
> > >   ext4: Avoid expr in declaration in ext4fs_get_bgdtable()
> > >   ext4: Create a var for the number of blocks to allocate
> > >   ext4: Check for overflow of block count
> > >   ext4: Bail out of no_blk_pergdt() if there are no blocks
> > >   ext4: Replace multiplication with an existing variable
> > >   ext4: Set a max limit on block-size in ext4fs_init()
> > >   ext4: Make sure there is at least one sector per block
> > >   ext4: Check for overflow when allocating tables
> > >
> > >  fs/ext4/ext4_write.c     |  25 ++-
> > >  include/limits.h         |   2 +
> > >  include/linux/kernel.h   |  12 --
> > >  include/linux/limits.h   |  21 ++
> > >  include/linux/overflow.h | 443 +++++++++++++++++++++++++++++++++++++++
> > >  5 files changed, 487 insertions(+), 16 deletions(-)
> > >  create mode 100644 include/linux/limits.h
> > >  create mode 100644 include/linux/overflow.h
> > >
> > > --
> > > 2.43.0
> > >
> > > base-commit: c5a631df96de7421d10ee03dceed1b79db213026
> > > branch: sec3
> >
> > Since this commit isn't mainline, there's nothing further to do with it.
> 
> If you'd like to review the series, please do. I just checked again
> and it applies fine to your tree.

Then you shouldn't have based it on your tree to start with. Having
failed to apply the otherwise almost trivial strim series, but it failed
because it was against your tree, I'm not inclined to look at anything
not based on mainline. And this is feedback others have given you as
well.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250515/dcc7db88/attachment.sig>


More information about the U-Boot mailing list