All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG] multipath-tools: 0 cyl reported on large disks due to overflow
@ 2026-05-22 21:10 Xose Vazquez Perez
  2026-05-26 19:28 ` Benjamin Marzinski
  0 siblings, 1 reply; 3+ messages in thread
From: Xose Vazquez Perez @ 2026-05-22 21:10 UTC (permalink / raw)
  To: Martin Wilck, Benjamin Marzinski, Christophe Varoqui; +Cc: DM_DEVEL-ML

Hi,

An integer overflow occurs in libmultipath/discovery.c:get_geometry() when
querying geometry on large disks resulting in "0 cyl" being reported:

# multipath -ll -d -v3
... | sdgm: 0 cyl, 64 heads, 32 sectors/track, start at 0

# fdisk -l /dev/sdgm
Disk /dev/sdgm: 12 TiB, 13194139533312 bytes, 25769803776 sectors
Units: sectors of 1 * 512 = 512 bytes

# dmesg | grep sdgm
sd 5:0:3:100: [sdgm] 25769803776 512-byte logical blocks: (13.2 TB/12.0TiB)


The root cause is that struct hd_geometry, from libmultipath/structs.h,
defines cylinders as an unsigned short.

Since it is a legacy interface, it should either sanitize the log output
or avoid relying on CHS geometry for large devices.

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

end of thread, other threads:[~2026-06-05 14:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-22 21:10 [BUG] multipath-tools: 0 cyl reported on large disks due to overflow Xose Vazquez Perez
2026-05-26 19:28 ` Benjamin Marzinski
2026-06-05 14:17   ` Martin Wilck

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.