# CVE-2024-42148: bnx2x: Fix multiple UBSAN array-index-out-of-bounds

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.33% (percentile 19, 2026-11-26)
- **CWE:** CWE-129
- **Published:** 2024-07-30T07:46:41.203Z
- **Modified:** 2026-06-17T07:48:55.870Z

## Who should check

- Anyone running Linux \>= 50f0a562f8cc9ed9d9f7f7380434c3c8646172d5, \< cfb04472ce33bee2579caf4dc9f4242522f6e26e; \>= 50f0a562f8cc9ed9d9f7f7380434c3c8646172d5, \< cbe53087026ad929cd3950508397e8892a6a2a0f; \>= 50f0a562f8cc9ed9d9f7f7380434c3c8646172d5, \< 8b17cec33892a66bbd71f8d9a70a45e2072ae84f; \>= 50f0a562f8cc9ed9d9f7f7380434c3c8646172d5, \< 0edae06b4c227bcfaf3ce21208d49191e1009d3b; \>= 50f0a562f8cc9ed9d9f7f7380434c3c8646172d5, \< 9504a1550686f53b0bab4cab31d435383b1ee2ce; \>= 50f0a562f8cc9ed9d9f7f7380434c3c8646172d5, \< f1313ea92f82451923e28ab45a4aaa0e70e80b98; \>= 50f0a562f8cc9ed9d9f7f7380434c3c8646172d5, \< b9ea38e767459111a511ed4fb74abc37db95a59d; \>= 50f0a562f8cc9ed9d9f7f7380434c3c8646172d5, \< 134061163ee5ca4759de5c24ca3bd71608891ba7
- Anyone running Linux 3.3

## Description

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

bnx2x: Fix multiple UBSAN array-index-out-of-bounds

Fix UBSAN warnings that occur when using a system with 32 physical
cpu cores or more, or when the user defines a number of Ethernet
queues greater than or equal to FP\_SB\_MAX\_E1x using the num\_queues
module parameter.

Currently there is a read/write out of bounds that occurs on the array
"struct stats\_query\_entry query" present inside the "bnx2x\_fw\_stats\_req"
struct in "drivers/net/ethernet/broadcom/bnx2x/bnx2x.h".
Looking at the definition of the "struct stats\_query\_entry query" array:

struct stats\_query\_entry query\[FP\_SB\_MAX\_E1x+
         BNX2X\_FIRST\_QUEUE\_QUERY\_IDX\];

FP\_SB\_MAX\_E1x is defined as the maximum number of fast path interrupts and
has a value of 16, while BNX2X\_FIRST\_QUEUE\_QUERY\_IDX has a value of 3
meaning the array has a total size of 19.
Since accesses to "struct stats\_query\_entry query" are offset-ted by
BNX2X\_FIRST\_QUEUE\_QUERY\_IDX, that means that the total number of Ethernet
queues should not exceed FP\_SB\_MAX\_E1x (16). However one of these queues
is reserved for FCOE and thus the number of Ethernet queues should be set
to \[FP\_SB\_MAX\_E1x -1\] (15) if FCOE is enabled or \[FP\_SB\_MAX\_E1x\] (16) if
it is not.

This is also described in a comment in the source code in
drivers/net/ethernet/broadcom/bnx2x/bnx2x.h just above the Macro definition
of FP\_SB\_MAX\_E1x. Below is the part of this explanation that it important
for this patch

/\*
  \* The total number of L2 queues, MSIX vectors and HW contexts (CIDs) is
  \* control by the number of fast-path status blocks supported by the
  \* device (HW/FW). Each fast-path status block (FP-SB) aka non-default
  \* status block represents an independent interrupts context that can
  \* serve a regular L2 networking queue. However special L2 queues such
  \* as the FCoE queue do not require a FP-SB and other components like
  \* the CNIC may consume FP-SB reducing the number of possible L2 queues
  \*
  \* If the maximum number of FP-SB available is X then:
  \* a. If CNIC is supported it consumes 1 FP-SB thus the max number of
  \*    regular L2 queues is Y=X-1
  \* b. In MF mode the actual number of L2 queues is Y= (X-1/MF\_factor)
  \* c. If the FCoE L2 queue is supported the actual number of L2 queues
  \*    is Y+1
  \* d. The number of irqs (MSIX vectors) is either Y+1 (one extra for
  \*    slow-path interrupts) or Y+2 if CNIC is supported (one additional
  \*    FP interrupt context for the CNIC).
  \* e. The number of HW context (CID count) is always X or X+1 if FCoE
  \*    L2 queue is supported. The cid for the FCoE L2 queue is always X.
  \*/

However this driver also supports NICs that use the E2 controller which can
handle more queues due to having more FP-SB represented by FP\_SB\_MAX\_E2.
Looking at the commits when the E2 support was added, it was originally
using the E1x parameters: commit f2e0899f0f27 ("bnx2x: Add 57712 support").
Back then FP\_SB\_MAX\_E2 was set to 16 the same as E1x. However the driver
was later updated to take full advantage of the E2 instead of having it be
limited to the capabilities of the E1x. But as far as we can tell, the
array "stats\_query\_entry query" was still limited to using the FP-SB
available to the E1x cards as part of an oversignt when the driver was
updated to take full advantage of the E2, and now with the driver being
aware of the greater queue size supported by E2 NICs, it causes the UBSAN
warnings seen in the stack traces below.

This patch increases the size of the "stats\_query\_entry query" array by
replacing FP\_SB\_MAX\_E1x with FP\_SB\_MAX\_E2 to be large enough to handle
both types of NICs.

Stack traces:

UBSAN: array-index-out-of-bounds in
       drivers/net/ethernet/broadcom/bnx2x/bnx2x\_stats.c:1529:11
index 20 is out of range for type 'stats\_query\_entry \[19\]'
CPU: 12 PID: 858 Comm: systemd-network Not tainted 6.9.0-060900rc7-generic
	     \#202405052133
Hardware name: HP ProLiant DL360 Gen9/ProLiant DL360 
---truncated---

## Affected and fixed versions

- Linux: \>= 50f0a562f8cc9ed9d9f7f7380434c3c8646172d5, \< cfb04472ce33bee2579caf4dc9f4242522f6e26e; \>= 50f0a562f8cc9ed9d9f7f7380434c3c8646172d5, \< cbe53087026ad929cd3950508397e8892a6a2a0f; \>= 50f0a562f8cc9ed9d9f7f7380434c3c8646172d5, \< 8b17cec33892a66bbd71f8d9a70a45e2072ae84f; \>= 50f0a562f8cc9ed9d9f7f7380434c3c8646172d5, \< 0edae06b4c227bcfaf3ce21208d49191e1009d3b; \>= 50f0a562f8cc9ed9d9f7f7380434c3c8646172d5, \< 9504a1550686f53b0bab4cab31d435383b1ee2ce; \>= 50f0a562f8cc9ed9d9f7f7380434c3c8646172d5, \< f1313ea92f82451923e28ab45a4aaa0e70e80b98; \>= 50f0a562f8cc9ed9d9f7f7380434c3c8646172d5, \< b9ea38e767459111a511ed4fb74abc37db95a59d; \>= 50f0a562f8cc9ed9d9f7f7380434c3c8646172d5, \< 134061163ee5ca4759de5c24ca3bd71608891ba7 (cvelist)
- Linux: 3.3 (cvelist)

## Mitigation

- Upgrade Linux to 134061163ee5ca4759de5c24ca3bd71608891ba7 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-42148. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-42148.md
Affected: Linux >= 50f0a562f8cc9ed9d9f7f7380434c3c8646172d5, < cfb04472ce33bee2579caf4dc9f4242522f6e26e; >= 50f0a562f8cc9ed9d9f7f7380434c3c8646172d5, < cbe53087026ad929cd3950508397e8892a6a2a0f; >= 50f0a562f8cc9ed9d9f7f7380434c3c8646172d5, < 8b17cec33892a66bbd71f8d9a70a45e2072ae84f; >= 50f0a562f8cc9ed9d9f7f73…
Fixed in: Linux 8b17cec33892a66bbd71f8d9a70a45e2072ae84f, Linux 0edae06b4c227bcfaf3ce21208d49191e1009d3b, Linux 9504a1550686f53b0bab4cab31d435383b1ee2ce, Linux 134061163ee5ca4759de5c24ca3bd71608891ba7

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-42148 being exploited?

There is no confirmed exploitation: CVE-2024-42148 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.33% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-42148?

High: CVSS 7.8 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-42148?

Linux \>= 50f0a562f8cc9ed9d9f7f7380434c3c8646172d5, \< cfb04472ce33bee2579caf4dc9f4242522f6e26e; \>= 50f0a562f8cc9ed9d9f7f7380434c3c8646172d5, \< cbe53087026ad929cd3950508397e8892a6a2a0f; \>= 50f0a562f8cc9ed9d9f7f7380434c3c8646172d5, \< 8b17cec33892a66bbd71f8d9a70a45e2072ae84f; \>= 50f0a562f8cc9ed9d9f7f7380434c3c8646172d5, \< 0edae06b4c227bcfaf3ce21208d49191e1009d3b; \>= 50f0a562f8cc9ed9d9f7f7380434c3c8646172d5, \< 9504a1550686f53b0bab4cab31d435383b1ee2ce; \>= 50f0a562f8cc9ed9d9f7f7380434c3c8646172d5, \< f1313ea92f82451923e28ab45a4aaa0e70e80b98; \>= 50f0a562f8cc9ed9d9f7f7380434c3c8646172d5, \< b9ea38e767459111a511ed4fb74abc37db95a59d; \>= 50f0a562f8cc9ed9d9f7f7380434c3c8646172d5, \< 134061163ee5ca4759de5c24ca3bd71608891ba7; Linux 3.3.

### Is there a fix for CVE-2024-42148?

Yes. Fixed in Linux 8b17cec33892a66bbd71f8d9a70a45e2072ae84f, Linux 0edae06b4c227bcfaf3ce21208d49191e1009d3b, Linux 9504a1550686f53b0bab4cab31d435383b1ee2ce, Linux 134061163ee5ca4759de5c24ca3bd71608891ba7. Upgrade Linux to 134061163ee5ca4759de5c24ca3bd71608891ba7 or later.

### How do I check if I'm affected by CVE-2024-42148?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/cfb04472ce33bee2579caf4dc9f4242522f6e26e>
- patch: <https://git.kernel.org/stable/c/cbe53087026ad929cd3950508397e8892a6a2a0f>
- patch: <https://git.kernel.org/stable/c/8b17cec33892a66bbd71f8d9a70a45e2072ae84f>
- patch: <https://git.kernel.org/stable/c/0edae06b4c227bcfaf3ce21208d49191e1009d3b>
- patch: <https://git.kernel.org/stable/c/9504a1550686f53b0bab4cab31d435383b1ee2ce>
- patch: <https://git.kernel.org/stable/c/f1313ea92f82451923e28ab45a4aaa0e70e80b98>
- patch: <https://git.kernel.org/stable/c/b9ea38e767459111a511ed4fb74abc37db95a59d>
- patch: <https://git.kernel.org/stable/c/134061163ee5ca4759de5c24ca3bd71608891ba7>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-42148>

HTML: <https://flawdb.com/CVE-2024-42148> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-42148>
