CVE-2024-49933 blk_iocost: fix more out of bound shifts
An out-of-bounds shift in the Linux kernel's blk_iocost module can cause undefined behavior, potentially leading to system instability or crashes.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-49933?
CVE-2024-49933 is a medium-severity vulnerability in Linux kernel, published on 21 Oct 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
blk_iocost: fix more out of bound shifts
Recently running UBSAN caught few out of bound shifts in the ioc_forgive_debts() function:
UBSAN: shift-out-of-bounds in block/blk-iocost.c:2142:38 shift exponent 80 is too large for 64-bit type 'u64' (aka 'unsigned long long') ... UBSAN: shift-out-of-bounds in block/blk-iocost.c:2144:30 shift exponent 80 is too large for 64-bit type 'u64' (aka 'unsigned long long') ... Call Trace: <IRQ> dump_stack_lvl+0xca/0x130 __ubsan_handle_shift_out_of_bounds+0x22c/0x280 ? __lock_acquire+0x6441/0x7c10 ioc_timer_fn+0x6cec/0x7750 ? blk_iocost_init+0x720/0x720 ? call_timer_fn+0x5d/0x470 call_timer_fn+0xfa/0x470 ? blk_iocost_init+0x720/0x720 __run_timer_base+0x519/0x700 ...
Actual impact of this issue was not identified but I propose to fix the undefined behaviour. The proposed fix to prevent those out of bound shifts consist of precalculating exponent before using it the shift operations by taking min value from the actual exponent and maximum possible number of bits.
Which versions are affected by CVE-2024-49933?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-49933?
Apply the vendor's patch.
Is CVE-2024-49933 being exploited?
There is no known exploitation of CVE-2024-49933 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as AZL-52941, BELL-CVE-2024-49933, DEBIAN-CVE-2024-49933, GHSA-66x6-php2-c8mm, UBUNTU-CVE-2024-49933.