linux: In the Linux kernel, the following vulnerability has been resolved: bnx2x: Fix multiple UBSAN array-index-out-of-bou...
CVE-2024-42148 is fixed in 40 products on 1 platform, first by DEBIAN-CVE-2024-42148, released July 30, 2024. It is not reported as exploited. Patch Radar priority: High.
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---
Where it's fixed
| Product | Fixed in | Fix | Released |
|---|---|---|---|
| Linux | |||
| bpftool · ol 8 | 0:5.15.0-210.163.7.el9uek | ELSA-2024-12618 | Sep 12, 2024 |
| bpftool · ol 9 | 0:5.15.0-210.163.7.el9uek | ELSA-2024-12618 | Sep 12, 2024 |
| dtb-aarch64 · opensuse-leap 15.6 | 6.4.0-150600.23.22.1 | SUSE-SU-2024:3383-1 | Sep 23, 2024 |
| kernel-64kb · opensuse-leap 15.6 | 6.4.0-150600.23.22.1 | SUSE-SU-2024:3383-1 | Sep 23, 2024 |
| kernel-64kb · sles 15.6 | 6.4.0-150600.23.22.1 | SUSE-SU-2024:3383-1 | Sep 23, 2024 |
| kernel-azure · opensuse-leap 15.6 | 6.4.0-150600.8.11.1 | SUSE-SU-2024:3194-1 | Sep 10, 2024 |
| kernel-azure · sles 15.6 | 6.4.0-150600.8.11.1 | SUSE-SU-2024:3194-1 | Sep 10, 2024 |
| kernel-debug · opensuse-leap 15.6 | 6.4.0-150600.23.22.1 | SUSE-SU-2024:3383-1 | Sep 23, 2024 |
| kernel-default · opensuse-leap 15.6 | 6.4.0-150600.23.22.1 | SUSE-SU-2024:3383-1 | Sep 23, 2024 |
| kernel-default · sles 15.6 | 6.4.0-150600.23.22.1 | SUSE-SU-2024:3383-1 | Sep 23, 2024 |
| kernel-default-base · opensuse-leap 15.6 | 6.4.0-150600.23.22.1.150600.12.8.3 | SUSE-SU-2024:3383-1 | Sep 23, 2024 |
| kernel-default-base · sles 15.6 | 6.4.0-150600.23.22.1.150600.12.8.3 | SUSE-SU-2024:3383-1 | Sep 23, 2024 |
| kernel-docs · opensuse-leap 15.6 | 6.4.0-150600.23.22.1 | SUSE-SU-2024:3383-1 | Sep 23, 2024 |
| kernel-docs · sles 15.6 | 6.4.0-150600.23.22.1 | SUSE-SU-2024:3383-1 | Sep 23, 2024 |
| kernel-kvmsmall · opensuse-leap 15.6 | 6.4.0-150600.23.22.1 | SUSE-SU-2024:3383-1 | Sep 23, 2024 |
| kernel-livepatch-SLE15-SP6-RT_Update_2 · sles 15.6 | 1-150600.1.3.2 | SUSE-SU-2024:3195-1 | Sep 10, 2024 |
| kernel-livepatch-SLE15-SP6_Update_4 · sles 15.6 | 1-150600.13.3.3 | SUSE-SU-2024:3383-1 | Sep 23, 2024 |
| kernel-obs-build · opensuse-leap 15.6 | 6.4.0-150600.23.22.1 | SUSE-SU-2024:3383-1 | Sep 23, 2024 |
| kernel-obs-build · sles 15.6 | 6.4.0-150600.23.22.1 | SUSE-SU-2024:3383-1 | Sep 23, 2024 |
| kernel-obs-qa · opensuse-leap 15.6 | 6.4.0-150600.23.22.1 | SUSE-SU-2024:3383-1 | Sep 23, 2024 |
| kernel-rt · opensuse-leap 15.6 | 6.4.0-150600.10.8.3 | SUSE-SU-2024:3195-1 | Sep 10, 2024 |
| kernel-rt_debug · opensuse-leap 15.6 | 6.4.0-150600.10.8.3 | SUSE-SU-2024:3195-1 | Sep 10, 2024 |
| kernel-source · opensuse-leap 15.6 | 6.4.0-150600.23.22.1 | SUSE-SU-2024:3383-1 | Sep 23, 2024 |
| kernel-source · sles 15.6 | 6.4.0-150600.23.22.1 | SUSE-SU-2024:3383-1 | Sep 23, 2024 |
| kernel-source-azure · opensuse-leap 15.6 | 6.4.0-150600.8.11.1 | SUSE-SU-2024:3194-1 | Sep 10, 2024 |
| kernel-source-azure · sles 15.6 | 6.4.0-150600.8.11.1 | SUSE-SU-2024:3194-1 | Sep 10, 2024 |
| kernel-source-rt · opensuse-leap 15.6 | 6.4.0-150600.10.8.3 | SUSE-SU-2024:3195-1 | Sep 10, 2024 |
| kernel-syms · opensuse-leap 15.6 | 6.4.0-150600.23.22.1 | SUSE-SU-2024:3383-1 | Sep 23, 2024 |
| kernel-syms · sles 15.6 | 6.4.0-150600.23.22.1 | SUSE-SU-2024:3383-1 | Sep 23, 2024 |
| kernel-syms-azure · opensuse-leap 15.6 | 6.4.0-150600.8.11.1 | SUSE-SU-2024:3194-1 | Sep 10, 2024 |
| kernel-syms-azure · sles 15.6 | 6.4.0-150600.8.11.1 | SUSE-SU-2024:3194-1 | Sep 10, 2024 |
| kernel-syms-rt · opensuse-leap 15.6 | 6.4.0-150600.10.8.1 | SUSE-SU-2024:3195-1 | Sep 10, 2024 |
| kernel-uek · ol 8 | 0:5.15.0-210.163.7.el9uek | ELSA-2024-12618 | Sep 12, 2024 |
| kernel-uek · ol 8 | 0:5.4.17-2136.335.4.el8uek | ELSA-2024-12610 | Sep 10, 2024 |
| kernel-uek · ol 9 | 0:5.15.0-210.163.7.el9uek | ELSA-2024-12618 | Sep 12, 2024 |
| kernel-uek-container · ol 8 | 0:5.15.0-210.163.7.el9uek | ELSA-2024-12618 | Sep 12, 2024 |
| kernel-uek-container · ol 8 | 0:5.4.17-2136.335.4.el8 | ELSA-2024-12612 | Sep 11, 2024 |
| kernel-uek-container · ol 9 | 0:5.15.0-210.163.7.el9uek | ELSA-2024-12618 | Sep 12, 2024 |
| kernel-uek-container-debug · ol 8 | 0:5.15.0-210.163.7.el9uek | ELSA-2024-12618 | Sep 12, 2024 |
| kernel-uek-container-debug · ol 8 | 0:5.4.17-2136.335.4.el8 | ELSA-2024-12612 | Sep 11, 2024 |
| kernel-uek-container-debug · ol 9 | 0:5.15.0-210.163.7.el9uek | ELSA-2024-12618 | Sep 12, 2024 |
| kernel-uek-core · ol 8 | 0:5.15.0-210.163.7.el9uek | ELSA-2024-12618 | Sep 12, 2024 |
| kernel-uek-core · ol 9 | 0:5.15.0-210.163.7.el9uek | ELSA-2024-12618 | Sep 12, 2024 |
| kernel-uek-debug · ol 8 | 0:5.15.0-210.163.7.el9uek | ELSA-2024-12618 | Sep 12, 2024 |
| kernel-uek-debug · ol 8 | 0:5.4.17-2136.335.4.el8uek | ELSA-2024-12610 | Sep 10, 2024 |
| kernel-uek-debug · ol 9 | 0:5.15.0-210.163.7.el9uek | ELSA-2024-12618 | Sep 12, 2024 |
| kernel-uek-debug-core · ol 8 | 0:5.15.0-210.163.7.el9uek | ELSA-2024-12618 | Sep 12, 2024 |
| kernel-uek-debug-core · ol 9 | 0:5.15.0-210.163.7.el9uek | ELSA-2024-12618 | Sep 12, 2024 |
| kernel-uek-debug-devel · ol 8 | 0:5.15.0-210.163.7.el9uek | ELSA-2024-12618 | Sep 12, 2024 |
| kernel-uek-debug-devel · ol 8 | 0:5.4.17-2136.335.4.el8uek | ELSA-2024-12610 | Sep 10, 2024 |
| kernel-uek-debug-devel · ol 9 | 0:5.15.0-210.163.7.el9uek | ELSA-2024-12618 | Sep 12, 2024 |
| kernel-uek-debug-modules · ol 8 | 0:5.15.0-210.163.7.el9uek | ELSA-2024-12618 | Sep 12, 2024 |
| kernel-uek-debug-modules · ol 9 | 0:5.15.0-210.163.7.el9uek | ELSA-2024-12618 | Sep 12, 2024 |
| kernel-uek-debug-modules-extra · ol 8 | 0:5.15.0-210.163.7.el9uek | ELSA-2024-12618 | Sep 12, 2024 |
| kernel-uek-debug-modules-extra · ol 9 | 0:5.15.0-210.163.7.el9uek | ELSA-2024-12618 | Sep 12, 2024 |
| kernel-uek-devel · ol 8 | 0:5.15.0-210.163.7.el9uek | ELSA-2024-12618 | Sep 12, 2024 |
| kernel-uek-devel · ol 8 | 0:5.4.17-2136.335.4.el8uek | ELSA-2024-12610 | Sep 10, 2024 |
| kernel-uek-devel · ol 9 | 0:5.15.0-210.163.7.el9uek | ELSA-2024-12618 | Sep 12, 2024 |
| kernel-uek-doc · ol 8 | 0:5.15.0-210.163.7.el9uek | ELSA-2024-12618 | Sep 12, 2024 |
| kernel-uek-doc · ol 8 | 0:5.4.17-2136.335.4.el8uek | ELSA-2024-12610 | Sep 10, 2024 |
| kernel-uek-doc · ol 9 | 0:5.15.0-210.163.7.el9uek | ELSA-2024-12618 | Sep 12, 2024 |
| kernel-uek-modules · ol 8 | 0:5.15.0-210.163.7.el9uek | ELSA-2024-12618 | Sep 12, 2024 |
| kernel-uek-modules · ol 9 | 0:5.15.0-210.163.7.el9uek | ELSA-2024-12618 | Sep 12, 2024 |
| kernel-uek-modules-extra · ol 8 | 0:5.15.0-210.163.7.el9uek | ELSA-2024-12618 | Sep 12, 2024 |
| kernel-uek-modules-extra · ol 9 | 0:5.15.0-210.163.7.el9uek | ELSA-2024-12618 | Sep 12, 2024 |
| kernel-uek-tools · ol 8 | 0:5.4.17-2136.335.4.el7uek | ELSA-2024-12610 | Sep 10, 2024 |
| kernel-uek-tools-libs · ol 8 | 0:5.4.17-2136.335.4.el7uek | ELSA-2024-12610 | Sep 10, 2024 |
| kernel-zfcpdump · opensuse-leap 15.6 | 6.4.0-150600.23.22.1 | SUSE-SU-2024:3383-1 | Sep 23, 2024 |
| kernel-zfcpdump · sles 15.6 | 6.4.0-150600.23.22.1 | SUSE-SU-2024:3383-1 | Sep 23, 2024 |
| linux · Debian 12.15 (bookworm) | 6.1.98-1 | DEBIAN-CVE-2024-42148 | Jul 30, 2024 |
| linux · Debian 13.5 (trixie) | 6.9.9-1 | DEBIAN-CVE-2024-42148 | Jul 30, 2024 |
| linux · Debian 14 | 6.9.9-1 | DEBIAN-CVE-2024-42148 | Jul 30, 2024 |
| perf · ol 8 | 0:5.4.17-2136.335.4.el7uek | ELSA-2024-12610 | Sep 10, 2024 |
| python-perf · ol 8 | 0:5.4.17-2136.335.4.el7uek | ELSA-2024-12610 | Sep 10, 2024 |
Patch Radar data is free to use with attribution. Terms and how to credit it.
Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.