CVE-2024-42148
Vulnerability from cvelistv5
Published
2024-07-30 07:46
Modified
2024-12-19 09:14
Severity ?
Summary
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---
References
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/0edae06b4c227bcfaf3ce21208d49191e1009d3bPatch
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/134061163ee5ca4759de5c24ca3bd71608891ba7Patch
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/8b17cec33892a66bbd71f8d9a70a45e2072ae84fPatch
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/9504a1550686f53b0bab4cab31d435383b1ee2cePatch
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/b9ea38e767459111a511ed4fb74abc37db95a59dPatch
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/cbe53087026ad929cd3950508397e8892a6a2a0fPatch
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/cfb04472ce33bee2579caf4dc9f4242522f6e26ePatch
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/f1313ea92f82451923e28ab45a4aaa0e70e80b98Patch
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/0edae06b4c227bcfaf3ce21208d49191e1009d3bPatch
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/134061163ee5ca4759de5c24ca3bd71608891ba7Patch
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/8b17cec33892a66bbd71f8d9a70a45e2072ae84fPatch
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/9504a1550686f53b0bab4cab31d435383b1ee2cePatch
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/b9ea38e767459111a511ed4fb74abc37db95a59dPatch
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/cbe53087026ad929cd3950508397e8892a6a2a0fPatch
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/cfb04472ce33bee2579caf4dc9f4242522f6e26ePatch
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/f1313ea92f82451923e28ab45a4aaa0e70e80b98Patch
Impacted products
Vendor Product Version
Linux Linux Version: 3.3
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T04:54:32.025Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/cfb04472ce33bee2579caf4dc9f4242522f6e26e"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/cbe53087026ad929cd3950508397e8892a6a2a0f"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/8b17cec33892a66bbd71f8d9a70a45e2072ae84f"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/0edae06b4c227bcfaf3ce21208d49191e1009d3b"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/9504a1550686f53b0bab4cab31d435383b1ee2ce"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/f1313ea92f82451923e28ab45a4aaa0e70e80b98"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/b9ea38e767459111a511ed4fb74abc37db95a59d"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/134061163ee5ca4759de5c24ca3bd71608891ba7"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-42148",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-09-10T16:15:34.762201Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-09-11T17:34:34.889Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/ethernet/broadcom/bnx2x/bnx2x.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "cfb04472ce33bee2579caf4dc9f4242522f6e26e",
              "status": "affected",
              "version": "50f0a562f8cc9ed9d9f7f7380434c3c8646172d5",
              "versionType": "git"
            },
            {
              "lessThan": "cbe53087026ad929cd3950508397e8892a6a2a0f",
              "status": "affected",
              "version": "50f0a562f8cc9ed9d9f7f7380434c3c8646172d5",
              "versionType": "git"
            },
            {
              "lessThan": "8b17cec33892a66bbd71f8d9a70a45e2072ae84f",
              "status": "affected",
              "version": "50f0a562f8cc9ed9d9f7f7380434c3c8646172d5",
              "versionType": "git"
            },
            {
              "lessThan": "0edae06b4c227bcfaf3ce21208d49191e1009d3b",
              "status": "affected",
              "version": "50f0a562f8cc9ed9d9f7f7380434c3c8646172d5",
              "versionType": "git"
            },
            {
              "lessThan": "9504a1550686f53b0bab4cab31d435383b1ee2ce",
              "status": "affected",
              "version": "50f0a562f8cc9ed9d9f7f7380434c3c8646172d5",
              "versionType": "git"
            },
            {
              "lessThan": "f1313ea92f82451923e28ab45a4aaa0e70e80b98",
              "status": "affected",
              "version": "50f0a562f8cc9ed9d9f7f7380434c3c8646172d5",
              "versionType": "git"
            },
            {
              "lessThan": "b9ea38e767459111a511ed4fb74abc37db95a59d",
              "status": "affected",
              "version": "50f0a562f8cc9ed9d9f7f7380434c3c8646172d5",
              "versionType": "git"
            },
            {
              "lessThan": "134061163ee5ca4759de5c24ca3bd71608891ba7",
              "status": "affected",
              "version": "50f0a562f8cc9ed9d9f7f7380434c3c8646172d5",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/ethernet/broadcom/bnx2x/bnx2x.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "3.3"
            },
            {
              "lessThan": "3.3",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.19.*",
              "status": "unaffected",
              "version": "4.19.318",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.280",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.222",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.163",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.98",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.39",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.9.*",
              "status": "unaffected",
              "version": "6.9.9",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.10",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nbnx2x: Fix multiple UBSAN array-index-out-of-bounds\n\nFix UBSAN warnings that occur when using a system with 32 physical\ncpu cores or more, or when the user defines a number of Ethernet\nqueues greater than or equal to FP_SB_MAX_E1x using the num_queues\nmodule parameter.\n\nCurrently there is a read/write out of bounds that occurs on the array\n\"struct stats_query_entry query\" present inside the \"bnx2x_fw_stats_req\"\nstruct in \"drivers/net/ethernet/broadcom/bnx2x/bnx2x.h\".\nLooking at the definition of the \"struct stats_query_entry query\" array:\n\nstruct stats_query_entry query[FP_SB_MAX_E1x+\n         BNX2X_FIRST_QUEUE_QUERY_IDX];\n\nFP_SB_MAX_E1x is defined as the maximum number of fast path interrupts and\nhas a value of 16, while BNX2X_FIRST_QUEUE_QUERY_IDX has a value of 3\nmeaning the array has a total size of 19.\nSince accesses to \"struct stats_query_entry query\" are offset-ted by\nBNX2X_FIRST_QUEUE_QUERY_IDX, that means that the total number of Ethernet\nqueues should not exceed FP_SB_MAX_E1x (16). However one of these queues\nis reserved for FCOE and thus the number of Ethernet queues should be set\nto [FP_SB_MAX_E1x -1] (15) if FCOE is enabled or [FP_SB_MAX_E1x] (16) if\nit is not.\n\nThis is also described in a comment in the source code in\ndrivers/net/ethernet/broadcom/bnx2x/bnx2x.h just above the Macro definition\nof FP_SB_MAX_E1x. Below is the part of this explanation that it important\nfor this patch\n\n/*\n  * The total number of L2 queues, MSIX vectors and HW contexts (CIDs) is\n  * control by the number of fast-path status blocks supported by the\n  * device (HW/FW). Each fast-path status block (FP-SB) aka non-default\n  * status block represents an independent interrupts context that can\n  * serve a regular L2 networking queue. However special L2 queues such\n  * as the FCoE queue do not require a FP-SB and other components like\n  * the CNIC may consume FP-SB reducing the number of possible L2 queues\n  *\n  * If the maximum number of FP-SB available is X then:\n  * a. If CNIC is supported it consumes 1 FP-SB thus the max number of\n  *    regular L2 queues is Y=X-1\n  * b. In MF mode the actual number of L2 queues is Y= (X-1/MF_factor)\n  * c. If the FCoE L2 queue is supported the actual number of L2 queues\n  *    is Y+1\n  * d. The number of irqs (MSIX vectors) is either Y+1 (one extra for\n  *    slow-path interrupts) or Y+2 if CNIC is supported (one additional\n  *    FP interrupt context for the CNIC).\n  * e. The number of HW context (CID count) is always X or X+1 if FCoE\n  *    L2 queue is supported. The cid for the FCoE L2 queue is always X.\n  */\n\nHowever this driver also supports NICs that use the E2 controller which can\nhandle more queues due to having more FP-SB represented by FP_SB_MAX_E2.\nLooking at the commits when the E2 support was added, it was originally\nusing the E1x parameters: commit f2e0899f0f27 (\"bnx2x: Add 57712 support\").\nBack then FP_SB_MAX_E2 was set to 16 the same as E1x. However the driver\nwas later updated to take full advantage of the E2 instead of having it be\nlimited to the capabilities of the E1x. But as far as we can tell, the\narray \"stats_query_entry query\" was still limited to using the FP-SB\navailable to the E1x cards as part of an oversignt when the driver was\nupdated to take full advantage of the E2, and now with the driver being\naware of the greater queue size supported by E2 NICs, it causes the UBSAN\nwarnings seen in the stack traces below.\n\nThis patch increases the size of the \"stats_query_entry query\" array by\nreplacing FP_SB_MAX_E1x with FP_SB_MAX_E2 to be large enough to handle\nboth types of NICs.\n\nStack traces:\n\nUBSAN: array-index-out-of-bounds in\n       drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c:1529:11\nindex 20 is out of range for type \u0027stats_query_entry [19]\u0027\nCPU: 12 PID: 858 Comm: systemd-network Not tainted 6.9.0-060900rc7-generic\n\t     #202405052133\nHardware name: HP ProLiant DL360 Gen9/ProLiant DL360 \n---truncated---"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-12-19T09:14:03.256Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/cfb04472ce33bee2579caf4dc9f4242522f6e26e"
        },
        {
          "url": "https://git.kernel.org/stable/c/cbe53087026ad929cd3950508397e8892a6a2a0f"
        },
        {
          "url": "https://git.kernel.org/stable/c/8b17cec33892a66bbd71f8d9a70a45e2072ae84f"
        },
        {
          "url": "https://git.kernel.org/stable/c/0edae06b4c227bcfaf3ce21208d49191e1009d3b"
        },
        {
          "url": "https://git.kernel.org/stable/c/9504a1550686f53b0bab4cab31d435383b1ee2ce"
        },
        {
          "url": "https://git.kernel.org/stable/c/f1313ea92f82451923e28ab45a4aaa0e70e80b98"
        },
        {
          "url": "https://git.kernel.org/stable/c/b9ea38e767459111a511ed4fb74abc37db95a59d"
        },
        {
          "url": "https://git.kernel.org/stable/c/134061163ee5ca4759de5c24ca3bd71608891ba7"
        }
      ],
      "title": "bnx2x: Fix multiple UBSAN array-index-out-of-bounds",
      "x_generator": {
        "engine": "bippy-5f407fcff5a0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-42148",
    "datePublished": "2024-07-30T07:46:41.203Z",
    "dateReserved": "2024-07-29T15:50:41.191Z",
    "dateUpdated": "2024-12-19T09:14:03.256Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-42148\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-07-30T08:15:06.453\",\"lastModified\":\"2024-11-21T09:33:42.043\",\"vulnStatus\":\"Modified\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nbnx2x: Fix multiple UBSAN array-index-out-of-bounds\\n\\nFix UBSAN warnings that occur when using a system with 32 physical\\ncpu cores or more, or when the user defines a number of Ethernet\\nqueues greater than or equal to FP_SB_MAX_E1x using the num_queues\\nmodule parameter.\\n\\nCurrently there is a read/write out of bounds that occurs on the array\\n\\\"struct stats_query_entry query\\\" present inside the \\\"bnx2x_fw_stats_req\\\"\\nstruct in \\\"drivers/net/ethernet/broadcom/bnx2x/bnx2x.h\\\".\\nLooking at the definition of the \\\"struct stats_query_entry query\\\" array:\\n\\nstruct stats_query_entry query[FP_SB_MAX_E1x+\\n         BNX2X_FIRST_QUEUE_QUERY_IDX];\\n\\nFP_SB_MAX_E1x is defined as the maximum number of fast path interrupts and\\nhas a value of 16, while BNX2X_FIRST_QUEUE_QUERY_IDX has a value of 3\\nmeaning the array has a total size of 19.\\nSince accesses to \\\"struct stats_query_entry query\\\" are offset-ted by\\nBNX2X_FIRST_QUEUE_QUERY_IDX, that means that the total number of Ethernet\\nqueues should not exceed FP_SB_MAX_E1x (16). However one of these queues\\nis reserved for FCOE and thus the number of Ethernet queues should be set\\nto [FP_SB_MAX_E1x -1] (15) if FCOE is enabled or [FP_SB_MAX_E1x] (16) if\\nit is not.\\n\\nThis is also described in a comment in the source code in\\ndrivers/net/ethernet/broadcom/bnx2x/bnx2x.h just above the Macro definition\\nof FP_SB_MAX_E1x. Below is the part of this explanation that it important\\nfor this patch\\n\\n/*\\n  * The total number of L2 queues, MSIX vectors and HW contexts (CIDs) is\\n  * control by the number of fast-path status blocks supported by the\\n  * device (HW/FW). Each fast-path status block (FP-SB) aka non-default\\n  * status block represents an independent interrupts context that can\\n  * serve a regular L2 networking queue. However special L2 queues such\\n  * as the FCoE queue do not require a FP-SB and other components like\\n  * the CNIC may consume FP-SB reducing the number of possible L2 queues\\n  *\\n  * If the maximum number of FP-SB available is X then:\\n  * a. If CNIC is supported it consumes 1 FP-SB thus the max number of\\n  *    regular L2 queues is Y=X-1\\n  * b. In MF mode the actual number of L2 queues is Y= (X-1/MF_factor)\\n  * c. If the FCoE L2 queue is supported the actual number of L2 queues\\n  *    is Y+1\\n  * d. The number of irqs (MSIX vectors) is either Y+1 (one extra for\\n  *    slow-path interrupts) or Y+2 if CNIC is supported (one additional\\n  *    FP interrupt context for the CNIC).\\n  * e. The number of HW context (CID count) is always X or X+1 if FCoE\\n  *    L2 queue is supported. The cid for the FCoE L2 queue is always X.\\n  */\\n\\nHowever this driver also supports NICs that use the E2 controller which can\\nhandle more queues due to having more FP-SB represented by FP_SB_MAX_E2.\\nLooking at the commits when the E2 support was added, it was originally\\nusing the E1x parameters: commit f2e0899f0f27 (\\\"bnx2x: Add 57712 support\\\").\\nBack then FP_SB_MAX_E2 was set to 16 the same as E1x. However the driver\\nwas later updated to take full advantage of the E2 instead of having it be\\nlimited to the capabilities of the E1x. But as far as we can tell, the\\narray \\\"stats_query_entry query\\\" was still limited to using the FP-SB\\navailable to the E1x cards as part of an oversignt when the driver was\\nupdated to take full advantage of the E2, and now with the driver being\\naware of the greater queue size supported by E2 NICs, it causes the UBSAN\\nwarnings seen in the stack traces below.\\n\\nThis patch increases the size of the \\\"stats_query_entry query\\\" array by\\nreplacing FP_SB_MAX_E1x with FP_SB_MAX_E2 to be large enough to handle\\nboth types of NICs.\\n\\nStack traces:\\n\\nUBSAN: array-index-out-of-bounds in\\n       drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c:1529:11\\nindex 20 is out of range for type \u0027stats_query_entry [19]\u0027\\nCPU: 12 PID: 858 Comm: systemd-network Not tainted 6.9.0-060900rc7-generic\\n\\t     #202405052133\\nHardware name: HP ProLiant DL360 Gen9/ProLiant DL360 \\n---truncated---\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se resolvi\u00f3 la siguiente vulnerabilidad: bnx2x: corrige m\u00faltiples \u00edndices de matriz UBSAN fuera de los l\u00edmites. Corrige las advertencias de UBSAN que ocurren cuando se usa un sistema con 32 n\u00facleos de CPU f\u00edsicos o m\u00e1s, o cuando el usuario define un n\u00famero. de colas Ethernet mayores o iguales a FP_SB_MAX_E1x usando el par\u00e1metro del m\u00f3dulo num_queues. Actualmente hay una lectura/escritura fuera de los l\u00edmites que se produce en la matriz \\\"struct stats_query_entry query\\\" presente dentro de la estructura \\\"bnx2x_fw_stats_req\\\" en \\\"drivers/net/ethernet/broadcom/bnx2x/bnx2x.h\\\". Mirando la definici\u00f3n de la matriz \\\"struct stats_query_entry query\\\": struct stats_query_entry query[FP_SB_MAX_E1x+ BNX2X_FIRST_QUEUE_QUERY_IDX]; FP_SB_MAX_E1x se define como el n\u00famero m\u00e1ximo de interrupciones de ruta r\u00e1pida y tiene un valor de 16, mientras que BNX2X_FIRST_QUEUE_QUERY_IDX tiene un valor de 3, lo que significa que la matriz tiene un tama\u00f1o total de 19. Dado que los accesos a \\\"struct stats_query_entry query\\\" est\u00e1n compensados por BNX2X_FIRST_QUEUE_QUERY_IDX, eso significa que el n\u00famero total de colas Ethernet no debe exceder FP_SB_MAX_E1x (16). Sin embargo, una de estas colas est\u00e1 reservada para FCOE y, por lo tanto, el n\u00famero de colas Ethernet debe establecerse en [FP_SB_MAX_E1x -1] (15) si FCOE est\u00e1 habilitado o [FP_SB_MAX_E1x] (16) si no lo est\u00e1. Esto tambi\u00e9n se describe en un comentario en el c\u00f3digo fuente en drivers/net/ethernet/broadcom/bnx2x/bnx2x.h justo encima de la definici\u00f3n de macro de FP_SB_MAX_E1x. A continuaci\u00f3n se muestra la parte de esta explicaci\u00f3n que es importante para este parche /* * El n\u00famero total de colas L2, vectores MSIX y contextos HW (CID) est\u00e1 * controlado por el n\u00famero de bloques de estado de ruta r\u00e1pida admitidos por el * dispositivo (HW /FW). Cada bloque de estado de ruta r\u00e1pida (FP-SB), tambi\u00e9n conocido como bloque de estado no predeterminado *, representa un contexto de interrupciones independiente que puede * servir a una cola de red L2 normal. Sin embargo, las colas L2 especiales, como * como la cola FCoE, no requieren un FP-SB y otros componentes como * el CNIC pueden consumir FP-SB, lo que reduce el n\u00famero de colas L2 posibles * * Si el n\u00famero m\u00e1ximo de FP-SB disponibles es X, entonces : * a. Si se admite CNIC, consume 1 FP-SB, por lo que el n\u00famero m\u00e1ximo de * colas L2 regulares es Y=X-1 * b. En el modo MF, el n\u00famero real de colas L2 es Y= (X-1/MF_factor) * c. Si se admite la cola FCoE L2, el n\u00famero real de colas L2 * es Y+1 * d. El n\u00famero de irqs (vectores MSIX) es Y+1 (uno adicional para * interrupciones de ruta lenta) o Y+2 si se admite CNIC (un contexto de interrupci\u00f3n * FP adicional para el CNIC). * e. El n\u00famero de contexto de HW (recuento de CID) siempre es X o X+1 si se admite la cola FCoE * L2. El cid para la cola FCoE L2 siempre es X. */ Sin embargo, este controlador tambi\u00e9n admite NIC que usan el controlador E2, que puede manejar m\u00e1s colas debido a que tiene m\u00e1s FP-SB representado por FP_SB_MAX_E2. Al observar las confirmaciones cuando se agreg\u00f3 el soporte E2, originalmente se usaban los par\u00e1metros E1x: commit f2e0899f0f27 (\\\"bnx2x: Add 57712 support\\\"). En aquel entonces, FP_SB_MAX_E2 se configur\u00f3 en 16 al igual que E1x. Sin embargo, el controlador se actualiz\u00f3 posteriormente para aprovechar al m\u00e1ximo el E2 en lugar de limitarlo a las capacidades del E1x. Pero hasta donde sabemos, la \\\"consulta stats_query_entry\\\" de la matriz todav\u00eda se limitaba a usar el FP-SB disponible para las tarjetas E1x como parte de una sobrese\u00f1al cuando se actualiz\u00f3 el controlador para aprovechar al m\u00e1ximo el E2, y ahora con el Al ser consciente el controlador del mayor tama\u00f1o de cola admitido por las NIC E2, se generan las advertencias de UBSAN que se ven en los seguimientos de pila a continuaci\u00f3n. Este parche aumenta el tama\u00f1o de la matriz \\\"stats_query_entry query\\\" reemplazando FP_SB_MAX_E1x con FP_SB_MAX_E2 para que sea lo suficientemente grande como para manejar ambos tipos de NIC. Seguimientos de pila: UBSAN: ---truncado---\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\",\"baseScore\":7.8,\"baseSeverity\":\"HIGH\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":5.9}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-129\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"3.3\",\"versionEndExcluding\":\"4.19.318\",\"matchCriteriaId\":\"CB7FC3A4-F8FE-40B5-B8D0-0DE2A8D111A1\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"4.20\",\"versionEndExcluding\":\"5.4.280\",\"matchCriteriaId\":\"625DBFAB-C3D0-4309-A27F-12D6428FB38F\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.5\",\"versionEndExcluding\":\"5.10.222\",\"matchCriteriaId\":\"00696AC5-EE29-437F-97F9-C4D66608B327\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.11\",\"versionEndExcluding\":\"5.15.163\",\"matchCriteriaId\":\"A97DEB09-4927-40F8-B5C6-F5BD5EAE0CFD\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.16\",\"versionEndExcluding\":\"6.1.98\",\"matchCriteriaId\":\"E09E92A5-27EF-40E4-926A-B1CDC8270551\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.2\",\"versionEndExcluding\":\"6.6.39\",\"matchCriteriaId\":\"29E894E4-668F-4DB0-81F7-4FB5F698E970\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.7\",\"versionEndExcluding\":\"6.9.9\",\"matchCriteriaId\":\"ADCC1407-0CB3-4C8F-B4C5-07F682CD7085\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/0edae06b4c227bcfaf3ce21208d49191e1009d3b\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/134061163ee5ca4759de5c24ca3bd71608891ba7\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/8b17cec33892a66bbd71f8d9a70a45e2072ae84f\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/9504a1550686f53b0bab4cab31d435383b1ee2ce\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/b9ea38e767459111a511ed4fb74abc37db95a59d\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/cbe53087026ad929cd3950508397e8892a6a2a0f\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/cfb04472ce33bee2579caf4dc9f4242522f6e26e\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/f1313ea92f82451923e28ab45a4aaa0e70e80b98\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/0edae06b4c227bcfaf3ce21208d49191e1009d3b\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/134061163ee5ca4759de5c24ca3bd71608891ba7\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/8b17cec33892a66bbd71f8d9a70a45e2072ae84f\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/9504a1550686f53b0bab4cab31d435383b1ee2ce\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/b9ea38e767459111a511ed4fb74abc37db95a59d\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/cbe53087026ad929cd3950508397e8892a6a2a0f\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/cfb04472ce33bee2579caf4dc9f4242522f6e26e\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/f1313ea92f82451923e28ab45a4aaa0e70e80b98\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.