CVE-2024-42148: Vulnerability in Linux Linux
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---
AI Analysis
Technical Summary
CVE-2024-42148 is a vulnerability identified in the Linux kernel's Broadcom bnx2x network driver, specifically affecting the handling of Ethernet queues in NICs using the E1x and E2 controllers. The vulnerability arises from an out-of-bounds read/write on the array "struct stats_query_entry query" within the "bnx2x_fw_stats_req" structure. This array's size is defined based on the macro FP_SB_MAX_E1x (value 16) plus an offset BNX2X_FIRST_QUEUE_QUERY_IDX (value 3), resulting in a total size of 19. However, the driver supports NICs with the E2 controller that can handle more queues, represented by FP_SB_MAX_E2, which is larger than FP_SB_MAX_E1x. The driver incorrectly limits the array size to the E1x maximum, causing accesses beyond the allocated array bounds when more queues are configured, leading to undefined behavior and potential memory corruption. The root cause is a mismatch between the array size and the number of Ethernet queues supported by the hardware, especially when the number of queues exceeds the E1x limit but is within the E2 capabilities. The vulnerability manifests as UBSAN (Undefined Behavior Sanitizer) array-index-out-of-bounds warnings and can cause kernel crashes or unpredictable behavior. The issue is triggered when systems have 32 or more physical CPU cores or when the user sets the num_queues module parameter to a value equal or greater than FP_SB_MAX_E1x. The patch to fix this vulnerability involves increasing the array size by replacing FP_SB_MAX_E1x with FP_SB_MAX_E2, ensuring the array can accommodate the maximum number of queues supported by both E1x and E2 NICs. This vulnerability is specific to Linux kernel versions containing the affected bnx2x driver code and impacts systems using Broadcom NICs with E1x or E2 controllers. It does not require user interaction but depends on system configuration and hardware capabilities. No known exploits are reported in the wild as of the publication date.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to servers and network infrastructure using Linux systems equipped with Broadcom bnx2x network interface cards, especially those with E2 controllers supporting high numbers of Ethernet queues. The out-of-bounds access can lead to kernel instability, crashes, or potential memory corruption, which could disrupt network connectivity and availability of critical services. In environments with high-performance networking requirements, such as data centers, cloud providers, and telecom operators, this could degrade service reliability and increase downtime. Although no direct remote code execution or privilege escalation is indicated, the instability caused by this vulnerability could be exploited by an attacker with local access or through crafted network configurations to cause denial of service. This is particularly concerning for European organizations relying on Linux-based infrastructure for essential services, including financial institutions, healthcare providers, and government agencies. The vulnerability's impact on confidentiality and integrity is limited, but availability could be significantly affected if exploited or triggered inadvertently. Given the widespread use of Linux in enterprise and cloud environments across Europe, and the popularity of Broadcom NICs in server hardware, the potential for operational disruption is notable. Organizations with large-scale deployments or high core-count servers are at increased risk due to the conditions that trigger the vulnerability.
Mitigation Recommendations
1. Apply the official Linux kernel patches that address CVE-2024-42148 as soon as they become available from trusted sources or Linux distribution vendors. This patch increases the array size to accommodate the maximum number of Ethernet queues supported by the hardware. 2. Audit and limit the number of Ethernet queues configured via the num_queues module parameter to not exceed the safe limits (i.e., FP_SB_MAX_E1x or FP_SB_MAX_E2 as appropriate) until patches are applied. 3. Monitor kernel logs for UBSAN warnings or related error messages indicating out-of-bounds access in the bnx2x driver to detect potential triggering of the vulnerability. 4. For systems with Broadcom NICs using the E2 controller, prioritize patching due to higher risk from increased queue support. 5. Implement strict access controls to limit local administrative access to systems, reducing the risk of exploitation by unauthorized users. 6. Test kernel updates in staging environments to ensure compatibility and stability before deployment in production. 7. Maintain up-to-date hardware and driver inventories to identify affected systems accurately. 8. Collaborate with hardware vendors and Linux distribution maintainers to receive timely updates and advisories related to this vulnerability.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Italy, Spain
CVE-2024-42148: Vulnerability in Linux Linux
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---
AI-Powered Analysis
Technical Analysis
CVE-2024-42148 is a vulnerability identified in the Linux kernel's Broadcom bnx2x network driver, specifically affecting the handling of Ethernet queues in NICs using the E1x and E2 controllers. The vulnerability arises from an out-of-bounds read/write on the array "struct stats_query_entry query" within the "bnx2x_fw_stats_req" structure. This array's size is defined based on the macro FP_SB_MAX_E1x (value 16) plus an offset BNX2X_FIRST_QUEUE_QUERY_IDX (value 3), resulting in a total size of 19. However, the driver supports NICs with the E2 controller that can handle more queues, represented by FP_SB_MAX_E2, which is larger than FP_SB_MAX_E1x. The driver incorrectly limits the array size to the E1x maximum, causing accesses beyond the allocated array bounds when more queues are configured, leading to undefined behavior and potential memory corruption. The root cause is a mismatch between the array size and the number of Ethernet queues supported by the hardware, especially when the number of queues exceeds the E1x limit but is within the E2 capabilities. The vulnerability manifests as UBSAN (Undefined Behavior Sanitizer) array-index-out-of-bounds warnings and can cause kernel crashes or unpredictable behavior. The issue is triggered when systems have 32 or more physical CPU cores or when the user sets the num_queues module parameter to a value equal or greater than FP_SB_MAX_E1x. The patch to fix this vulnerability involves increasing the array size by replacing FP_SB_MAX_E1x with FP_SB_MAX_E2, ensuring the array can accommodate the maximum number of queues supported by both E1x and E2 NICs. This vulnerability is specific to Linux kernel versions containing the affected bnx2x driver code and impacts systems using Broadcom NICs with E1x or E2 controllers. It does not require user interaction but depends on system configuration and hardware capabilities. No known exploits are reported in the wild as of the publication date.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to servers and network infrastructure using Linux systems equipped with Broadcom bnx2x network interface cards, especially those with E2 controllers supporting high numbers of Ethernet queues. The out-of-bounds access can lead to kernel instability, crashes, or potential memory corruption, which could disrupt network connectivity and availability of critical services. In environments with high-performance networking requirements, such as data centers, cloud providers, and telecom operators, this could degrade service reliability and increase downtime. Although no direct remote code execution or privilege escalation is indicated, the instability caused by this vulnerability could be exploited by an attacker with local access or through crafted network configurations to cause denial of service. This is particularly concerning for European organizations relying on Linux-based infrastructure for essential services, including financial institutions, healthcare providers, and government agencies. The vulnerability's impact on confidentiality and integrity is limited, but availability could be significantly affected if exploited or triggered inadvertently. Given the widespread use of Linux in enterprise and cloud environments across Europe, and the popularity of Broadcom NICs in server hardware, the potential for operational disruption is notable. Organizations with large-scale deployments or high core-count servers are at increased risk due to the conditions that trigger the vulnerability.
Mitigation Recommendations
1. Apply the official Linux kernel patches that address CVE-2024-42148 as soon as they become available from trusted sources or Linux distribution vendors. This patch increases the array size to accommodate the maximum number of Ethernet queues supported by the hardware. 2. Audit and limit the number of Ethernet queues configured via the num_queues module parameter to not exceed the safe limits (i.e., FP_SB_MAX_E1x or FP_SB_MAX_E2 as appropriate) until patches are applied. 3. Monitor kernel logs for UBSAN warnings or related error messages indicating out-of-bounds access in the bnx2x driver to detect potential triggering of the vulnerability. 4. For systems with Broadcom NICs using the E2 controller, prioritize patching due to higher risk from increased queue support. 5. Implement strict access controls to limit local administrative access to systems, reducing the risk of exploitation by unauthorized users. 6. Test kernel updates in staging environments to ensure compatibility and stability before deployment in production. 7. Maintain up-to-date hardware and driver inventories to identify affected systems accurately. 8. Collaborate with hardware vendors and Linux distribution maintainers to receive timely updates and advisories related to this vulnerability.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-07-29T15:50:41.191Z
- Cisa Enriched
- true
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9827c4522896dcbe1bc9
Added to database: 5/21/2025, 9:08:55 AM
Last enriched: 6/29/2025, 5:41:36 AM
Last updated: 8/18/2025, 11:22:35 PM
Views: 18
Related Threats
CVE-2025-9132: Out of bounds write in Google Chrome
HighCVE-2025-9193: Open Redirect in TOTVS Portal Meu RH
MediumCVE-2025-9176: OS Command Injection in neurobin shc
MediumCVE-2025-9175: Stack-based Buffer Overflow in neurobin shc
MediumCVE-2025-9174: OS Command Injection in neurobin shc
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.