Re: [PATCH] adfs: validate nzones in adfs_read_map()
From: Russell King (Oracle)
Date: Fri Mar 20 2026 - 12:03:56 EST
On Fri, Mar 20, 2026 at 04:05:03PM +0100, Greg Kroah-Hartman wrote:
> But then why is this check also needed? I'm all for moving it
> elsewhere, Bae has the reproducer, they can check if moving it fixes
> their issue or not.
There are two variants of the disc format.
adfs_validate_bblk() which is used for hard disc formats where the
number of zones is greater than zero, and ADFS F format on floppy
disks which should have four zones.) This doesn't validate the
number of zones, but it should - and this is where it should be
added, not in the map reading code.
The other uses adfs_validate_dr0(), which is for the ADFS E floppy
format images. This already validates that the number of zones is
equal to one.
Reference:
https://www.riscosopen.org/wiki/documentation/show/FileCore%20Overview#laylogic
Only "new map" is supported by adfs under Linux.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!