Skip to contentSkip to conversation

CVE-2024-50158: RDMA/bnxt_re: Fix out of bound check

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Nov 7, 2024

lore
Share & tools
lore
#0 lore raw

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

RDMA/bnxt_re: Fix out of bound check

Driver exports pacing stats only on GenP5 and P7 adapters. But while parsing the pacing stats, driver has a check for "rdev->dbr_pacing". This caused a trace when KASAN is enabled.

BUG: KASAN: slab-out-of-bounds in bnxt_re_get_hw_stats+0x2b6a/0x2e00 [bnxt_re]
Write of size 8 at addr ffff8885942a6340 by task modprobe/4809

The Linux kernel CVE team has assigned CVE-2024-50158 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.6 with commit 8b6573ff3420 and fixed in 6.6.59 with commit 05c5fcc1869a
	Issue introduced in 6.6 with commit 8b6573ff3420 and fixed in 6.11.6 with commit c11b9b03ea52
	Issue introduced in 6.6 with commit 8b6573ff3420 and fixed in 6.12-rc4 with commit a9e6e7443922

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2024-50158

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/infiniband/hw/bnxt_re/hw_counters.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/05c5fcc1869a08e36a29691699b6534e5a00a82b
	https://git.kernel.org/stable/c/c11b9b03ea5252898f91f3388c248f0dc47bda52
	https://git.kernel.org/stable/c/a9e6e7443922ac0a48243c35d03834c96926bff1