dm mirror log: round up region bitmap size to BITS_PER_LONG
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:
dm mirror log: round up region bitmap size to BITS_PER_LONG
The code in dm-log rounds up bitset_size to 32 bits. It then uses find_next_zero_bit_le on the allocated region. find_next_zero_bit_le accesses the bitmap using unsigned long pointers. So, on 64-bit architectures, it may access 4 bytes beyond the allocated size.
Fix this bug by rounding up bitset_size to BITS_PER_LONG.
This bug was found by running the lvm2 testsuite with kasan.
From the CVE record · Linux
The Linux kernel dm mirror log can access four bytes beyond an allocated region bitmap on 64-bit architectures because the bitmap size is rounded to 32 bits rather than the size of an unsigned long. The input does not specify whether an attacker can trigger this behavior, or any required access or user interaction.
Engineers running the Linux kernel on 64-bit architectures should check their affected versions; no version range is provided.