block: fix integer overflow in BLKSECDISCARD
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
block: fix integer overflow in BLKSECDISCARD
I independently rediscovered
commit 22d24a544b0d49bbcbd61c8c0eaf77d3c9297155 block: fix overflow in blk_ioctl_discard()
but for secure erase.
Same problem:
uint64_t r[2] = {512, 18446744073709551104ULL}; ioctl(fd, BLKSECDISCARD, r);
will enter near infinite loop inside blkdev_issue_secure_erase():
From the CVE record · Linux
An integer overflow in the Linux kernel's BLKSECDISCARD secure-erase path can cause a near-infinite loop. A local attacker who can issue the ioctl on a block device could trigger it; no user interaction is described.
Anyone running a Linux kernel with the affected BLKSECDISCARD implementation should check their kernel version against the Linux kernel advisory; affected versions were not provided.