qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] vvfat: fix out of bounds array write


From: Michael Tokarev
Subject: Re: [PATCH] vvfat: fix out of bounds array write
Date: Wed, 22 Jan 2025 15:33:56 +0300
User-agent: Mozilla Thunderbird

22.01.2025 15:19, BALATON Zoltan wrote:
On Wed, 22 Jan 2025, Michael Tokarev wrote:
22.01.2025 02:14, Pierrick Bouvier wrote:
..
I agree the existing code (and this patch) is pretty cryptic for anyone not 
familiar with FAT format.
However, I think it could be a good thing to first merge this one (which is correct, and works), and refactor this in a second time, so the current ubsan issue is fixed upstream as soon as possible.

For an actual *fix*, please take a look at
20250119093233.9E4C450B6D@localhost.tls.msk.ru/">https://lore.kernel.org/qemu-devel/20250119093233.9E4C450B6D@localhost.tls.msk.ru/

which is minimal, understandable, verified and works.

Just noticed in that patch you have several &(s->directory) where () is not needed, 
-> is higher priority than & (address_of).

Yes.  I especially mentioned that I kept the original style,
to minimize the changes.  It is not needed to fix the issue
at hand, the fix is maximally targeted (or minimally).

The subsequent patch - which is optional, unrelated to the issue
at hand - changes all that stuff to adhere to qemu coding style
(and yes, this is a style thing, for some, these parens makes it
more readable).

Thanks,

/mjt



reply via email to

[Prev in Thread] Current Thread [Next in Thread]