Re: [PATCH] adfs: validate nzones in adfs_read_map()
From: Russell King (Oracle)
Date: Fri Mar 20 2026 - 12:09:50 EST
On Fri, Mar 20, 2026 at 04:40:57PM +0100, Greg KH wrote:
> On Sat, Mar 21, 2026 at 12:21:31AM +0900, paeyz wrote:
> > From: Bae Yeonju <iwasbaeyz@xxxxxxxxx>
> >
> > Hi,
> >
> > I tested moving the nzones validation to adfs_validate_bblk() on
> > 6.12.36 with KASAN enabled.
> >
> > With this change, a crafted image with nzones=0 is rejected during
> > validation:
> >
> > ADFS-fs (loop0): error: can't find an ADFS filesystem on dev loop0.
> >
> > mount() returns -EINVAL, and no crash or KASAN report is observed.
> >
> > So the issue can be prevented by validating nzones earlier in the
> > validation path.
> >
> > Tested-by: Bae Yeonju <iwasbaeyz@xxxxxxxxx>
>
> Great, can you rework your patch to move the check to that location and
> send it?
... great, giving me no chance to reply to your previous email...
In netdev land, we have a rule: wait 24 hours between posting updates,
so that discussion has a chance of completing. I suggest that would
have been good here.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!