CVE
CVE-2024-42148
CNA 原文 · 原文(英文)
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 *…
受影响版本
- ≥ 6.7, < 6.9.9修复版本 6.9.9
- ≥ 6.2, < 6.6.39修复版本 6.6.39
- ≥ 5.16, < 6.1.98修复版本 6.1.98
- ≥ 5.11, < 5.15.163修复版本 5.15.163
- ≥ 5.5, < 5.10.222修复版本 5.10.222
- ≥ 4.20, < 5.4.280修复版本 5.4.280
- ≥ 3.3, < 4.19.318修复版本 4.19.318
发行版软件包(Debian、Ubuntu、Red Hat 等)会回移补丁而不改上游版本号,请同时查看所用发行版的安全公告。
公告与补丁
- git.kernel.org/stable/c/0edae06b4c227bcfaf3ce21208d49191e1009d3b · Patch
- git.kernel.org/stable/c/134061163ee5ca4759de5c24ca3bd71608891ba7 · Patch
- git.kernel.org/stable/c/8b17cec33892a66bbd71f8d9a70a45e2072ae84f · Patch
- git.kernel.org/stable/c/9504a1550686f53b0bab4cab31d435383b1ee2ce · Patch
- git.kernel.org/stable/c/b9ea38e767459111a511ed4fb74abc37db95a59d · Patch
- git.kernel.org/stable/c/cbe53087026ad929cd3950508397e8892a6a2a0f · Patch
- git.kernel.org/stable/c/cfb04472ce33bee2579caf4dc9f4242522f6e26e · Patch
- git.kernel.org/stable/c/f1313ea92f82451923e28ab45a4aaa0e70e80b98 · Patch
数据来源:NVD(公有领域)、CISA KEV(CC0)、FIRST EPSS、OSV.dev / GitHub Advisory Database(CC-BY 4.0) · 本库只列受影响版本与修复版本,不托管、不链接任何利用代码。