Re: [PATCH 5/6] hw/block: validate the fdc sector position fits within bounds

Kevin Wolf <[email protected]>
Newsgroups org.nongnu.qemu-arm,org.nongnu.qemu-devel
Message-ID <[email protected]>
Am 19.08.2026 um 11:22 hat Alex Bennée geschrieben:
> Previously the guest controlled the value of last_sec and wasn't
> particularly careful to check it didn't exceed the media size. We
> can't re-use drv->last_sec as that changes as we do operations so we
> set media_last_sect when the geometry is probed.
> 
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3800
> Signed-off-by: Alex Bennée <[email protected]>

If it's not too hard, I would appreciate a qtest case that reproduces
the problem in the pre-patch state and shows that the behaviour
afterwards is right, including after media change to a floppy of a
different size.

Kevin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.