cve-2024-42073
Vulnerability from cvelistv5
Published
2024-07-29 15:52
Modified
2024-11-05 09:36
Severity ?
Summary
mlxsw: spectrum_buffers: Fix memory corruptions on Spectrum-4 systems
Impacted products
Vendor Product Version
Linux Linux Version: 5.17
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T04:54:32.349Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/bfa86a96912faa0b6142a918db88cc0c738a769e"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/942901e0fc74ad4b7992ef7ca9336e68d5fd6d36"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/bf8781ede7bd9a37c0fcabca78976e61300b5a1a"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/c28947de2bed40217cf256c5d0d16880054fcf13"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-42073",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-09-10T16:19:36.665774Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-09-11T17:33:57.825Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "bfa86a96912f",
              "status": "affected",
              "version": "f8538aec88b4",
              "versionType": "git"
            },
            {
              "lessThan": "942901e0fc74",
              "status": "affected",
              "version": "f8538aec88b4",
              "versionType": "git"
            },
            {
              "lessThan": "bf8781ede7bd",
              "status": "affected",
              "version": "f8538aec88b4",
              "versionType": "git"
            },
            {
              "lessThan": "c28947de2bed",
              "status": "affected",
              "version": "f8538aec88b4",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.17"
            },
            {
              "lessThan": "5.17",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.97",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.37",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.9.*",
              "status": "unaffected",
              "version": "6.9.8",
              "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\nmlxsw: spectrum_buffers: Fix memory corruptions on Spectrum-4 systems\n\nThe following two shared buffer operations make use of the Shared Buffer\nStatus Register (SBSR):\n\n # devlink sb occupancy snapshot pci/0000:01:00.0\n # devlink sb occupancy clearmax pci/0000:01:00.0\n\nThe register has two masks of 256 bits to denote on which ingress /\negress ports the register should operate on. Spectrum-4 has more than\n256 ports, so the register was extended by cited commit with a new\n\u0027port_page\u0027 field.\n\nHowever, when filling the register\u0027s payload, the driver specifies the\nports as absolute numbers and not relative to the first port of the port\npage, resulting in memory corruptions [1].\n\nFix by specifying the ports relative to the first port of the port page.\n\n[1]\nBUG: KASAN: slab-use-after-free in mlxsw_sp_sb_occ_snapshot+0xb6d/0xbc0\nRead of size 1 at addr ffff8881068cb00f by task devlink/1566\n[...]\nCall Trace:\n \u003cTASK\u003e\n dump_stack_lvl+0xc6/0x120\n print_report+0xce/0x670\n kasan_report+0xd7/0x110\n mlxsw_sp_sb_occ_snapshot+0xb6d/0xbc0\n mlxsw_devlink_sb_occ_snapshot+0x75/0xb0\n devlink_nl_sb_occ_snapshot_doit+0x1f9/0x2a0\n genl_family_rcv_msg_doit+0x20c/0x300\n genl_rcv_msg+0x567/0x800\n netlink_rcv_skb+0x170/0x450\n genl_rcv+0x2d/0x40\n netlink_unicast+0x547/0x830\n netlink_sendmsg+0x8d4/0xdb0\n __sys_sendto+0x49b/0x510\n __x64_sys_sendto+0xe5/0x1c0\n do_syscall_64+0xc1/0x1d0\n entry_SYSCALL_64_after_hwframe+0x77/0x7f\n[...]\nAllocated by task 1:\n kasan_save_stack+0x33/0x60\n kasan_save_track+0x14/0x30\n __kasan_kmalloc+0x8f/0xa0\n copy_verifier_state+0xbc2/0xfb0\n do_check_common+0x2c51/0xc7e0\n bpf_check+0x5107/0x9960\n bpf_prog_load+0xf0e/0x2690\n __sys_bpf+0x1a61/0x49d0\n __x64_sys_bpf+0x7d/0xc0\n do_syscall_64+0xc1/0x1d0\n entry_SYSCALL_64_after_hwframe+0x77/0x7f\n\nFreed by task 1:\n kasan_save_stack+0x33/0x60\n kasan_save_track+0x14/0x30\n kasan_save_free_info+0x3b/0x60\n poison_slab_object+0x109/0x170\n __kasan_slab_free+0x14/0x30\n kfree+0xca/0x2b0\n free_verifier_state+0xce/0x270\n do_check_common+0x4828/0xc7e0\n bpf_check+0x5107/0x9960\n bpf_prog_load+0xf0e/0x2690\n __sys_bpf+0x1a61/0x49d0\n __x64_sys_bpf+0x7d/0xc0\n do_syscall_64+0xc1/0x1d0\n entry_SYSCALL_64_after_hwframe+0x77/0x7f"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-11-05T09:36:52.581Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/bfa86a96912faa0b6142a918db88cc0c738a769e"
        },
        {
          "url": "https://git.kernel.org/stable/c/942901e0fc74ad4b7992ef7ca9336e68d5fd6d36"
        },
        {
          "url": "https://git.kernel.org/stable/c/bf8781ede7bd9a37c0fcabca78976e61300b5a1a"
        },
        {
          "url": "https://git.kernel.org/stable/c/c28947de2bed40217cf256c5d0d16880054fcf13"
        }
      ],
      "title": "mlxsw: spectrum_buffers: Fix memory corruptions on Spectrum-4 systems",
      "x_generator": {
        "engine": "bippy-9e1c9544281a"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-42073",
    "datePublished": "2024-07-29T15:52:36.416Z",
    "dateReserved": "2024-07-29T15:50:41.169Z",
    "dateUpdated": "2024-11-05T09:36:52.581Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-42073\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-07-29T16:15:06.770\",\"lastModified\":\"2024-11-21T09:33:32.187\",\"vulnStatus\":\"Modified\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nmlxsw: spectrum_buffers: Fix memory corruptions on Spectrum-4 systems\\n\\nThe following two shared buffer operations make use of the Shared Buffer\\nStatus Register (SBSR):\\n\\n # devlink sb occupancy snapshot pci/0000:01:00.0\\n # devlink sb occupancy clearmax pci/0000:01:00.0\\n\\nThe register has two masks of 256 bits to denote on which ingress /\\negress ports the register should operate on. Spectrum-4 has more than\\n256 ports, so the register was extended by cited commit with a new\\n\u0027port_page\u0027 field.\\n\\nHowever, when filling the register\u0027s payload, the driver specifies the\\nports as absolute numbers and not relative to the first port of the port\\npage, resulting in memory corruptions [1].\\n\\nFix by specifying the ports relative to the first port of the port page.\\n\\n[1]\\nBUG: KASAN: slab-use-after-free in mlxsw_sp_sb_occ_snapshot+0xb6d/0xbc0\\nRead of size 1 at addr ffff8881068cb00f by task devlink/1566\\n[...]\\nCall Trace:\\n \u003cTASK\u003e\\n dump_stack_lvl+0xc6/0x120\\n print_report+0xce/0x670\\n kasan_report+0xd7/0x110\\n mlxsw_sp_sb_occ_snapshot+0xb6d/0xbc0\\n mlxsw_devlink_sb_occ_snapshot+0x75/0xb0\\n devlink_nl_sb_occ_snapshot_doit+0x1f9/0x2a0\\n genl_family_rcv_msg_doit+0x20c/0x300\\n genl_rcv_msg+0x567/0x800\\n netlink_rcv_skb+0x170/0x450\\n genl_rcv+0x2d/0x40\\n netlink_unicast+0x547/0x830\\n netlink_sendmsg+0x8d4/0xdb0\\n __sys_sendto+0x49b/0x510\\n __x64_sys_sendto+0xe5/0x1c0\\n do_syscall_64+0xc1/0x1d0\\n entry_SYSCALL_64_after_hwframe+0x77/0x7f\\n[...]\\nAllocated by task 1:\\n kasan_save_stack+0x33/0x60\\n kasan_save_track+0x14/0x30\\n __kasan_kmalloc+0x8f/0xa0\\n copy_verifier_state+0xbc2/0xfb0\\n do_check_common+0x2c51/0xc7e0\\n bpf_check+0x5107/0x9960\\n bpf_prog_load+0xf0e/0x2690\\n __sys_bpf+0x1a61/0x49d0\\n __x64_sys_bpf+0x7d/0xc0\\n do_syscall_64+0xc1/0x1d0\\n entry_SYSCALL_64_after_hwframe+0x77/0x7f\\n\\nFreed by task 1:\\n kasan_save_stack+0x33/0x60\\n kasan_save_track+0x14/0x30\\n kasan_save_free_info+0x3b/0x60\\n poison_slab_object+0x109/0x170\\n __kasan_slab_free+0x14/0x30\\n kfree+0xca/0x2b0\\n free_verifier_state+0xce/0x270\\n do_check_common+0x4828/0xc7e0\\n bpf_check+0x5107/0x9960\\n bpf_prog_load+0xf0e/0x2690\\n __sys_bpf+0x1a61/0x49d0\\n __x64_sys_bpf+0x7d/0xc0\\n do_syscall_64+0xc1/0x1d0\\n entry_SYSCALL_64_after_hwframe+0x77/0x7f\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: mlxsw: spectrum_buffers: corrige da\u00f1os en la memoria en sistemas Spectrum-4 Las siguientes dos operaciones de b\u00fafer compartido utilizan el registro de estado del b\u00fafer compartido (SBSR): # devlink sb occupancy snapshot pci/0000 :01:00.0 # devlink sb occupancy clearmax pci/0000:01:00.0 El registro tiene dos m\u00e1scaras de 256 bits para indicar en qu\u00e9 puertos de entrada/salida debe operar el registro. Spectrum-4 tiene m\u00e1s de 256 puertos, por lo que el registro se ampli\u00f3 mediante la confirmaci\u00f3n citada con un nuevo campo \u0027port_page\u0027. Sin embargo, al llenar el payload del registro, el controlador especifica los puertos como n\u00fameros absolutos y no relativos al primer puerto de la p\u00e1gina de puertos, lo que provoca da\u00f1os en la memoria [1]. Corrija especificando los puertos relativos al primer puerto de la p\u00e1gina de puertos. [1] ERROR: KASAN: slab-use-after-free en mlxsw_sp_sb_occ_snapshot+0xb6d/0xbc0 Lectura del tama\u00f1o 1 en la direcci\u00f3n ffff8881068cb00f mediante la tarea devlink/1566 [...] Seguimiento de llamadas:  dump_stack_lvl+0xc6/0x120 print_report+ 0xce/0x670 kasan_report+0xd7/0x110 mlxsw_sp_sb_occ_snapshot+0xb6d/0xbc0 mlxsw_devlink_sb_occ_snapshot+0x75/0xb0 devlink_nl_sb_occ_snapshot_doit+0x1f9/0x2a0 genl_family_rcv_ msg_doit+0x20c/0x300 genl_rcv_msg+0x567/0x800 netlink_rcv_skb+0x170/0x450 genl_rcv+0x2d/0x40 netlink_unicast+0x547/0x830 netlink_sendmsg+ 0x8d4/0xdb0 __sys_sendto+0x49b/0x510 __x64_sys_sendto+0xe5/0x1c0 do_syscall_64+0xc1/0x1d0 Entry_SYSCALL_64_after_hwframe+0x77/0x7f [...] Asignado por tarea 1: kasan_save_stack+0x33/ 0x60 kasan_save_track+0x14/0x30 __kasan_kmalloc+0x8f/0xa0 copy_verifier_state+ 0xbc2/0xfb0 do_check_common+0x2c51/0xc7e0 bpf_check+0x5107/0x9960 bpf_prog_load+0xf0e/0x2690 __sys_bpf+0x1a61/0x49d0 __x64_sys_bpf+0x7d/0xc0 _64+0xc1/0x1d0 Entry_SYSCALL_64_after_hwframe+0x77/0x7f Liberado por la tarea 1: kasan_save_stack+0x33/0x60 kasan_save_track+ 0x14/0x30 kasan_save_free_info+0x3b/0x60 poison_slab_object+0x109/0x170 __kasan_slab_free+0x14/0x30 kfree+0xca/0x2b0 free_verifier_state+0xce/0x270 do_check_common+0x4828/0xc7e0 bpf_check+0x 5107/0x9960 bpf_prog_load+0xf0e/0x2690 __sys_bpf+0x1a61/0x49d0 __x64_sys_bpf+ 0x7d/0xc0 do_syscall_64+0xc1/0x1d0 entrada_SYSCALL_64_after_hwframe+0x77/0x7f\"}],\"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:N/I:N/A:H\",\"baseScore\":5.5,\"baseSeverity\":\"MEDIUM\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":3.6}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-416\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionEndExcluding\":\"5.17\",\"matchCriteriaId\":\"A37A8EE9-3F14-4C7A-A882-DA8A6AD1897C\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.1\",\"versionEndExcluding\":\"6.1.97\",\"matchCriteriaId\":\"D6EFEE97-4CE8-4BE7-8CAF-B3004753F1CC\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.2\",\"versionEndExcluding\":\"6.6.37\",\"matchCriteriaId\":\"D72E033B-5323-4C4D-8818-36E1EBC3535F\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.7\",\"versionEndExcluding\":\"6.9.8\",\"matchCriteriaId\":\"E95105F2-32E3-4C5F-9D18-7AEFD0E6275C\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/942901e0fc74ad4b7992ef7ca9336e68d5fd6d36\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/bf8781ede7bd9a37c0fcabca78976e61300b5a1a\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/bfa86a96912faa0b6142a918db88cc0c738a769e\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/c28947de2bed40217cf256c5d0d16880054fcf13\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/942901e0fc74ad4b7992ef7ca9336e68d5fd6d36\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/bf8781ede7bd9a37c0fcabca78976e61300b5a1a\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/bfa86a96912faa0b6142a918db88cc0c738a769e\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/c28947de2bed40217cf256c5d0d16880054fcf13\",\"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.