Re: [PATCH] isofs: bound empty directory blocks in isofs_read_level3_size()
From: Matthias Goergens
Date: Thu Oct 01 2026 - 06:53:33 EST
Hi Honza,
> Right, that needs a bit more care but still, something like the attached
> patch should work?
Yes, it does. Testing the next-section link as "not yet set" instead
of "i == 1" is what was missing from the first variant. I ran your
patch on top of v1, built in userspace with ASan and UBSan, against 67
test images: empty blocks between and after the section records,
three-section files, and the 100 bound from both sides. i_size, the
recorded next section, the limit message and the file contents match
v1 on every image, including the split-gap one your first variant read
wrongly. No sanitizer reports.
Reviewed-by: Matthias Goergens <matthias.goergens@xxxxxxxxx>
Tested-by: Matthias Goergens <matthias.goergens@xxxxxxxxx>
Thanks,
Matthias