All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] block/vmdk: Fix various bugs in handling malicious image files
@ 2026-11-03 14:35 Peter Maydell
  2026-11-03 14:35 ` [PATCH 1/5] block/vmdk: Avoid assertion if image file has no extents Peter Maydell
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Peter Maydell @ 2026-11-03 14:35 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-block, Hanna Reitz, Kevin Wolf, Fam Zheng

This set of patches fixes four reported bugs in vmdk's handling of
potentially malicious image files:

 #3843: if cluster_sectors is 0x200000 we can overflow an 'int' and try
        to g_malloc() 0xffffffff80000000
 #4017: if cluster_sectors is 0 we will divide by zero and SIGFPE
 #4029: we can overflow a 32*64 multiply; we catch it a bit later on
        so there are no ill-effects, but for robustness it's better to
        check before the multiply
 #4571: we can read off the end of a block of memory when trying to
        parse descriptors; worst case is that we read some junk from
        the heap into BlockDriverState::auto_backing_file and
        ::backing_file. I don't think this is an exploitable info
        leak into the guest.
 #4571: if the input file specifies no extents, we hit an assert
        in vmdk_co_get_info() rather than rejecting the file
        (mentioned in passing in the same issue as previous bug)

I think these all classify as "hardening bugs" rather than security
issues, since they're just "self-denial-of-service" at worst.

Tested using qemu-iotests on the vmdk format.

thanks
-- PMM

Peter Maydell (5):
  block/vmdk: Avoid assertion if image file has no extents
  block/vmdk: Avoid reading off the end of descriptor memory
  block/vmdk: Use larger types for byte counts in vmdk_read_extent()
  block/vmdk: Reject a zero cluster_sectors parameter
  block/vmdk: Avoid overflowing multiplication in vmdk_open_vmdk4()

 block/vmdk.c | 26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

-- 
2.43.0



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-11-10 19:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-03 14:35 [PATCH 0/5] block/vmdk: Fix various bugs in handling malicious image files Peter Maydell
2026-11-03 14:35 ` [PATCH 1/5] block/vmdk: Avoid assertion if image file has no extents Peter Maydell
2026-11-03 14:35 ` [PATCH 2/5] block/vmdk: Avoid reading off the end of descriptor memory Peter Maydell
2026-11-03 14:35 ` [PATCH 3/5] block/vmdk: Use larger types for byte counts in vmdk_read_extent() Peter Maydell
2026-11-03 14:35 ` [PATCH 4/5] block/vmdk: Reject a zero cluster_sectors parameter Peter Maydell
2026-11-03 14:35 ` [PATCH 5/5] block/vmdk: Avoid overflowing multiplication in vmdk_open_vmdk4() Peter Maydell
2026-11-05 17:18 ` [PATCH 0/5] block/vmdk: Fix various bugs in handling malicious image files Kevin Wolf
2026-11-10 19:04   ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.