CVE-2024-26856 (GCVE-0-2024-26856)
Vulnerability from cvelistv5
Published
2024-04-17 10:17
Modified
2026-08-05 11:27
Summary
In the Linux kernel, the following vulnerability has been resolved: net: sparx5: Fix use after free inside sparx5_del_mact_entry Based on the static analyzis of the code it looks like when an entry from the MAC table was removed, the entry was still used after being freed. More precise the vid of the mac_entry was used after calling devm_kfree on the mac_entry. The fix consists in first using the vid of the mac_entry to delete the entry from the HW and after that to free it.
Impacted products
Vendor Product Version
Linux Linux Version: b37a1bae742f92cc9b1f777d54e04ee3d86bbfc2
Version: b37a1bae742f92cc9b1f777d54e04ee3d86bbfc2
Version: b37a1bae742f92cc9b1f777d54e04ee3d86bbfc2
Version: b37a1bae742f92cc9b1f777d54e04ee3d86bbfc2
Version: b37a1bae742f92cc9b1f777d54e04ee3d86bbfc2
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-26856",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-05-01T19:36:26.233327Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-06-04T17:49:15.853Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      },
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T00:14:13.666Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/e46274df1100fb0c06704195bfff5bfbd418bf64"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/0de693d68b0a18d5e256556c7c62d92cca35ad52"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/e83bebb718fd1f42549358730e1206164e0861d6"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/71809805b95052ff551922f11660008fb3666025"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/89d72d4125e94aa3c2140fedd97ce07ba9e37674"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/ethernet/microchip/sparx5/sparx5_mactable.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "e46274df1100fb0c06704195bfff5bfbd418bf64",
              "status": "affected",
              "version": "b37a1bae742f92cc9b1f777d54e04ee3d86bbfc2",
              "versionType": "git"
            },
            {
              "lessThan": "0de693d68b0a18d5e256556c7c62d92cca35ad52",
              "status": "affected",
              "version": "b37a1bae742f92cc9b1f777d54e04ee3d86bbfc2",
              "versionType": "git"
            },
            {
              "lessThan": "e83bebb718fd1f42549358730e1206164e0861d6",
              "status": "affected",
              "version": "b37a1bae742f92cc9b1f777d54e04ee3d86bbfc2",
              "versionType": "git"
            },
            {
              "lessThan": "71809805b95052ff551922f11660008fb3666025",
              "status": "affected",
              "version": "b37a1bae742f92cc9b1f777d54e04ee3d86bbfc2",
              "versionType": "git"
            },
            {
              "lessThan": "89d72d4125e94aa3c2140fedd97ce07ba9e37674",
              "status": "affected",
              "version": "b37a1bae742f92cc9b1f777d54e04ee3d86bbfc2",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/ethernet/microchip/sparx5/sparx5_mactable.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.14"
            },
            {
              "lessThan": "5.14",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.152",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.82",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.22",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.7.*",
              "status": "unaffected",
              "version": "6.7.10",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.8",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.152",
                  "versionStartIncluding": "5.14",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.82",
                  "versionStartIncluding": "5.14",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.22",
                  "versionStartIncluding": "5.14",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.7.10",
                  "versionStartIncluding": "5.14",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.8",
                  "versionStartIncluding": "5.14",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet: sparx5: Fix use after free inside sparx5_del_mact_entry\n\nBased on the static analyzis of the code it looks like when an entry\nfrom the MAC table was removed, the entry was still used after being\nfreed. More precise the vid of the mac_entry was used after calling\ndevm_kfree on the mac_entry.\nThe fix consists in first using the vid of the mac_entry to delete the\nentry from the HW and after that to free it."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 8.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:A - The vulnerability is driven by Ethernet frames on the L2 segment \u2014 an unauthenticated attacker connected to a Sparx5 switch port populates the MAC table with chosen source MACs, and a MAC roam or FDB age-out makes the bridge emit SWITCHDEV_FDB_DEL_TO_DEVICE into sparx5_del_mact_entry(). No routing is involved, so this is same-broadcast-domain (Adjacent) rather than Network.\nAC:L - The free-then-use is unconditional straight-line code, not a race \u2014 every matching entry deletion frees mact_entry and then reads mact_entry-\u003evid. The attacker controls both the MAC/VID that populates the table and the trigger (moving the same source MAC between ports forces br_fdb_update() to emit the delete notification synchronously), so it is reproducible on demand.\nPR:N - The frame-driven path requires no credentials or account on the switch whatsoever \u2014 MAC learning, roaming, and FDB aging are automatic. The privileged `bridge fdb del` route is only an alternative, strictly weaker trigger.\nUI:N - No victim action is needed; bridge MAC learning, roaming and aging happen automatically in response to attacker-sent frames on an already-configured bridged switch port.\nS:U - The freed object and the corrupted state are both kernel-resident within the same security authority; there is no VM, IOMMU, or sandbox boundary crossed.\nC:H - Freed slab memory is read back and acted upon, and the object lives in a general kmalloc cache that concurrent GFP_ATOMIC softirq allocations (including the driver\u0027s own attacker-driven switchdev work and skb allocations) can immediately reoccupy, letting an attacker influence and infer freed heap contents. Per use-after-free scoring, UAF primitives generalize to kernel memory disclosure.\nI:H - The stale value read from freed memory is written directly into the hardware MAC-table unlearn command, so the wrong VID is unlearned \u2014 the attacker\u0027s revoked MAC stays programmed and forwarded in hardware while an unrelated victim\u0027s entry can be purged, corrupting switch forwarding and isolation state. As a use-after-free it also carries the general potential for heap-grooming-based write primitives.\nA:H - Dereferencing freed slab memory can oops outright \u2014 the kfree() immediately preceding the read can discard the last-in-use slab page back to the page allocator \u2014 and KASAN/hardened kernels report or panic on it. The attacker can retrigger it continuously by flooding frames with rotating source MACs, and corrupted MAC-table state causes persistent forwarding breakage."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T11:27:50.303Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/e46274df1100fb0c06704195bfff5bfbd418bf64"
        },
        {
          "url": "https://git.kernel.org/stable/c/0de693d68b0a18d5e256556c7c62d92cca35ad52"
        },
        {
          "url": "https://git.kernel.org/stable/c/e83bebb718fd1f42549358730e1206164e0861d6"
        },
        {
          "url": "https://git.kernel.org/stable/c/71809805b95052ff551922f11660008fb3666025"
        },
        {
          "url": "https://git.kernel.org/stable/c/89d72d4125e94aa3c2140fedd97ce07ba9e37674"
        }
      ],
      "title": "net: sparx5: Fix use after free inside sparx5_del_mact_entry",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-26856",
    "datePublished": "2024-04-17T10:17:18.475Z",
    "dateReserved": "2024-02-19T14:20:24.183Z",
    "dateUpdated": "2026-08-05T11:27:50.303Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CVE Program Container\", \"references\": [{\"url\": \"https://git.kernel.org/stable/c/e46274df1100fb0c06704195bfff5bfbd418bf64\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/0de693d68b0a18d5e256556c7c62d92cca35ad52\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/e83bebb718fd1f42549358730e1206164e0861d6\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/71809805b95052ff551922f11660008fb3666025\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/89d72d4125e94aa3c2140fedd97ce07ba9e37674\", \"tags\": [\"x_transferred\"]}], \"providerMetadata\": {\"orgId\": \"af854a3a-2127-422b-91ae-364da2661108\", \"shortName\": \"CVE\", \"dateUpdated\": \"2024-08-02T00:14:13.666Z\"}}, {\"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2024-26856\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-05-01T19:36:26.233327Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-05-23T19:01:24.047Z\"}, \"title\": \"CISA ADP Vulnrichment\"}], \"cna\": {\"title\": \"net: sparx5: Fix use after free inside sparx5_del_mact_entry\", \"metrics\": [{\"cvssV3_1\": {\"version\": \"3.1\", \"baseScore\": 8.8, \"baseSeverity\": \"HIGH\", \"vectorString\": \"CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H\"}, \"scenarios\": [{\"lang\": \"en\", \"value\": \"AV:A - The vulnerability is driven by Ethernet frames on the L2 segment \\u2014 an unauthenticated attacker connected to a Sparx5 switch port populates the MAC table with chosen source MACs, and a MAC roam or FDB age-out makes the bridge emit SWITCHDEV_FDB_DEL_TO_DEVICE into sparx5_del_mact_entry(). No routing is involved, so this is same-broadcast-domain (Adjacent) rather than Network.\\nAC:L - The free-then-use is unconditional straight-line code, not a race \\u2014 every matching entry deletion frees mact_entry and then reads mact_entry-\u003evid. The attacker controls both the MAC/VID that populates the table and the trigger (moving the same source MAC between ports forces br_fdb_update() to emit the delete notification synchronously), so it is reproducible on demand.\\nPR:N - The frame-driven path requires no credentials or account on the switch whatsoever \\u2014 MAC learning, roaming, and FDB aging are automatic. The privileged `bridge fdb del` route is only an alternative, strictly weaker trigger.\\nUI:N - No victim action is needed; bridge MAC learning, roaming and aging happen automatically in response to attacker-sent frames on an already-configured bridged switch port.\\nS:U - The freed object and the corrupted state are both kernel-resident within the same security authority; there is no VM, IOMMU, or sandbox boundary crossed.\\nC:H - Freed slab memory is read back and acted upon, and the object lives in a general kmalloc cache that concurrent GFP_ATOMIC softirq allocations (including the driver\u0027s own attacker-driven switchdev work and skb allocations) can immediately reoccupy, letting an attacker influence and infer freed heap contents. Per use-after-free scoring, UAF primitives generalize to kernel memory disclosure.\\nI:H - The stale value read from freed memory is written directly into the hardware MAC-table unlearn command, so the wrong VID is unlearned \\u2014 the attacker\u0027s revoked MAC stays programmed and forwarded in hardware while an unrelated victim\u0027s entry can be purged, corrupting switch forwarding and isolation state. As a use-after-free it also carries the general potential for heap-grooming-based write primitives.\\nA:H - Dereferencing freed slab memory can oops outright \\u2014 the kfree() immediately preceding the read can discard the last-in-use slab page back to the page allocator \\u2014 and KASAN/hardened kernels report or panic on it. The attacker can retrigger it continuously by flooding frames with rotating source MACs, and corrupted MAC-table state causes persistent forwarding breakage.\"}]}], \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"b37a1bae742f92cc9b1f777d54e04ee3d86bbfc2\", \"lessThan\": \"e46274df1100fb0c06704195bfff5bfbd418bf64\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"b37a1bae742f92cc9b1f777d54e04ee3d86bbfc2\", \"lessThan\": \"0de693d68b0a18d5e256556c7c62d92cca35ad52\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"b37a1bae742f92cc9b1f777d54e04ee3d86bbfc2\", \"lessThan\": \"e83bebb718fd1f42549358730e1206164e0861d6\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"b37a1bae742f92cc9b1f777d54e04ee3d86bbfc2\", \"lessThan\": \"71809805b95052ff551922f11660008fb3666025\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"b37a1bae742f92cc9b1f777d54e04ee3d86bbfc2\", \"lessThan\": \"89d72d4125e94aa3c2140fedd97ce07ba9e37674\", \"versionType\": \"git\"}], \"programFiles\": [\"drivers/net/ethernet/microchip/sparx5/sparx5_mactable.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"5.14\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"5.14\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"5.15.152\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"5.15.*\"}, {\"status\": \"unaffected\", \"version\": \"6.1.82\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.1.*\"}, {\"status\": \"unaffected\", \"version\": \"6.6.22\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.6.*\"}, {\"status\": \"unaffected\", \"version\": \"6.7.10\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.7.*\"}, {\"status\": \"unaffected\", \"version\": \"6.8\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"drivers/net/ethernet/microchip/sparx5/sparx5_mactable.c\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/e46274df1100fb0c06704195bfff5bfbd418bf64\"}, {\"url\": \"https://git.kernel.org/stable/c/0de693d68b0a18d5e256556c7c62d92cca35ad52\"}, {\"url\": \"https://git.kernel.org/stable/c/e83bebb718fd1f42549358730e1206164e0861d6\"}, {\"url\": \"https://git.kernel.org/stable/c/71809805b95052ff551922f11660008fb3666025\"}, {\"url\": \"https://git.kernel.org/stable/c/89d72d4125e94aa3c2140fedd97ce07ba9e37674\"}], \"x_generator\": {\"engine\": \"bippy-1.2.0\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\nnet: sparx5: Fix use after free inside sparx5_del_mact_entry\\n\\nBased on the static analyzis of the code it looks like when an entry\\nfrom the MAC table was removed, the entry was still used after being\\nfreed. More precise the vid of the mac_entry was used after calling\\ndevm_kfree on the mac_entry.\\nThe fix consists in first using the vid of the mac_entry to delete the\\nentry from the HW and after that to free it.\"}], \"cpeApplicability\": [{\"nodes\": [{\"negate\": false, \"cpeMatch\": [{\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"5.15.152\", \"versionStartIncluding\": \"5.14\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.1.82\", \"versionStartIncluding\": \"5.14\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.6.22\", \"versionStartIncluding\": \"5.14\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.7.10\", \"versionStartIncluding\": \"5.14\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.8\", \"versionStartIncluding\": \"5.14\"}], \"operator\": \"OR\"}]}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2026-08-05T11:27:50.303Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2024-26856\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2026-08-05T11:27:50.303Z\", \"dateReserved\": \"2024-02-19T14:20:24.183Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2024-04-17T10:17:18.475Z\", \"assignerShortName\": \"Linux\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }
  }
}


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.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • 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.


Loading…

Loading…