Re: [PATCH] adfs: validate nzones in adfs_read_map()
From: paeyz
Date: Fri Mar 20 2026 - 11:31:20 EST
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>