Bug 2320577 (CVE-2024-49933) - CVE-2024-49933 kernel: blk_iocost: fix more out of bound shifts
Summary: CVE-2024-49933 kernel: blk_iocost: fix more out of bound shifts
Keywords:
Status: NEW
Alias: CVE-2024-49933
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On: 2320975
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-10-21 19:12 UTC by OSIDB Bzimport
Modified: 2025-05-13 08:30 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2025:6966 0 None None None 2025-05-13 08:30:58 UTC

Description OSIDB Bzimport 2024-10-21 19:12:05 UTC
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.

Comment 1 Avinash Hanwate 2024-10-22 11:59:51 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2024102126-CVE-2024-49933-f918@gregkh/T

Comment 2 Avinash Hanwate 2024-10-22 12:53:07 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2024102126-CVE-2024-49933-f918@gregkh/T

Comment 3 errata-xmlrpc 2025-05-13 08:30:57 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2025:6966 https://access.redhat.com/errata/RHSA-2025:6966


Note You need to log in before you can comment on or make changes to this bug.