CVE-2024-57801 (GCVE-0-2024-57801)

Vulnerability from cvelistv5 – Published: 2025-01-15 13:10 – Updated: 2026-08-05 11:46
VLAI
Title
net/mlx5e: Skip restore TC rules for vport rep without loaded flag
Summary
In the Linux kernel, the following vulnerability has been resolved: net/mlx5e: Skip restore TC rules for vport rep without loaded flag During driver unload, unregister_netdev is called after unloading vport rep. So, the mlx5e_rep_priv is already freed while trying to get rpriv->netdev, or walk rpriv->tc_ht, which results in use-after-free. So add the checking to make sure access the data of vport rep which is still loaded.
SSVC
Exploitation: none Automatable: no Technical Impact: total
CISA Coordinator · CISA-ADP (v2.0.3)
Decision recorded 2025-02-11 15:41 UTC
CWE
Assigner
Linux CNA
Impacted products
Vendor Product Version
Linux Linux Affected: d1569537a837d66620aa7ffc2bddf918e902f227 , < 3e45dd1622a2c1a83c11bf42fdd8c1810123d6c0 (git)
Affected: d1569537a837d66620aa7ffc2bddf918e902f227 , < 47c78d3fc26e38ab805613a0f592dc8a820c7c64 (git)
Affected: d1569537a837d66620aa7ffc2bddf918e902f227 , < 5a03b368562a7ff5f5f1f63b5adf8309cbdbd5be (git)
Create a notification for this product.
Linux Linux Affected: 6.6
Unaffected: 0 , < 6.6 (semver)
Unaffected: 6.6.70 , ≤ 6.6.* (semver)
Unaffected: 6.12.9 , ≤ 6.12.* (semver)
Unaffected: 6.13 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "cvssV3_1": {
              "attackComplexity": "LOW",
              "attackVector": "LOCAL",
              "availabilityImpact": "HIGH",
              "baseScore": 7.8,
              "baseSeverity": "HIGH",
              "confidentialityImpact": "HIGH",
              "integrityImpact": "HIGH",
              "privilegesRequired": "LOW",
              "scope": "UNCHANGED",
              "userInteraction": "NONE",
              "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
              "version": "3.1"
            }
          },
          {
            "other": {
              "content": {
                "id": "CVE-2024-57801",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "total"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2025-02-11T15:41:06.687224Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "problemTypes": [
          {
            "descriptions": [
              {
                "cweId": "CWE-416",
                "description": "CWE-416 Use After Free",
                "lang": "en",
                "type": "CWE"
              }
            ]
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2025-02-11T15:45:20.073Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/ethernet/mellanox/mlx5/core/esw/ipsec_fs.c",
            "drivers/net/ethernet/mellanox/mlx5/core/eswitch.h",
            "drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "3e45dd1622a2c1a83c11bf42fdd8c1810123d6c0",
              "status": "affected",
              "version": "d1569537a837d66620aa7ffc2bddf918e902f227",
              "versionType": "git"
            },
            {
              "lessThan": "47c78d3fc26e38ab805613a0f592dc8a820c7c64",
              "status": "affected",
              "version": "d1569537a837d66620aa7ffc2bddf918e902f227",
              "versionType": "git"
            },
            {
              "lessThan": "5a03b368562a7ff5f5f1f63b5adf8309cbdbd5be",
              "status": "affected",
              "version": "d1569537a837d66620aa7ffc2bddf918e902f227",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/ethernet/mellanox/mlx5/core/esw/ipsec_fs.c",
            "drivers/net/ethernet/mellanox/mlx5/core/eswitch.h",
            "drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.6"
            },
            {
              "lessThan": "6.6",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.70",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.9",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.13",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.70",
                  "versionStartIncluding": "6.6",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.9",
                  "versionStartIncluding": "6.6",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.13",
                  "versionStartIncluding": "6.6",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx5e: Skip restore TC rules for vport rep without loaded flag\n\nDuring driver unload, unregister_netdev is called after unloading\nvport rep. So, the mlx5e_rep_priv is already freed while trying to get\nrpriv-\u003enetdev, or walk rpriv-\u003etc_ht, which results in use-after-free.\nSo add the checking to make sure access the data of vport rep which is\nstill loaded."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The vulnerable path is only reachable through local device configuration \u2014 XFRM/netlink IPsec offload state and policy deletion, SR-IOV/SF vport reconfiguration, or devlink/driver unload. No remote peer input reaches `mlx5_esw_ipsec_restore_dest_uplink()`.\nAC:L - This is not a race: `rep-\u003erep_data[REP_ETH].priv` is left permanently dangling after any vport rep unload, and the attacker independently controls when the last eswitch IPsec TX rule is removed to trigger the walk. Freshly freed kmalloc memory retains a non-NULL `rpriv-\u003enetdev`, so the old guard reliably fails to catch the freed object, and both required kconfigs are default-y.\nPR:L - Triggering requires network-device administration (CAP_NET_ADMIN for XFRM offload state/policy and SR-IOV/SF vport changes) rather than real root, and consistent with kernel.org CNA scoring of comparable mlx5 eswitch/flow-steering UAFs this is treated as a low-privileged local capability.\nUI:N - The vport rep unload and the subsequent IPsec TX flow-table refcount drop are both performed by the attacker; no action by any other user or victim is needed.\nS:U - The use-after-free corrupts kernel heap memory within the same kernel security authority; there is no crossing of a VM, IOMMU, or sandbox boundary.\nC:H - The freed `mlx5e_rep_priv` is read back (`rpriv-\u003enetdev`, `rpriv-\u003etc_ht`, `tc_ht.tbl`) and the walk then dereferences reclaimed-slab contents as `mlx5e_tc_flow` objects, so a heap-spray of the freed object yields an attacker-directed kernel read primitive.\nI:H - `rhashtable_walk_enter()` writes into the freed object (spinlock acquire) and performs `list_add()` through a `tbl` pointer read out of freed memory, giving a write through an attacker-influenceable pointer; the walk additionally programs hardware flow-rule destinations from bogus flow structures.\nA:H - Even without exploitation, walking a freed rhashtable dereferences garbage bucket-table pointers and causes an immediate kernel oops/panic, and the dangling rep pointer makes the crash reproducible on demand."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T11:46:35.806Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/3e45dd1622a2c1a83c11bf42fdd8c1810123d6c0"
        },
        {
          "url": "https://git.kernel.org/stable/c/47c78d3fc26e38ab805613a0f592dc8a820c7c64"
        },
        {
          "url": "https://git.kernel.org/stable/c/5a03b368562a7ff5f5f1f63b5adf8309cbdbd5be"
        }
      ],
      "title": "net/mlx5e: Skip restore TC rules for vport rep without loaded flag",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-57801",
    "datePublished": "2025-01-15T13:10:24.619Z",
    "dateReserved": "2025-01-15T13:08:59.741Z",
    "dateUpdated": "2026-08-05T11:46:35.806Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2024-57801",
      "date": "2026-11-19",
      "epss": "0.00224",
      "percentile": "0.13144"
    },
    "microsoft_vex": {
      "current_release_date": "2026-02-18T02:18:39.000Z",
      "cve": "CVE-2024-57801",
      "id": "msrc_CVE-2024-57801",
      "initial_release_date": "2025-03-13T00:00:00.000Z",
      "product_status:fixed": "2",
      "product_status:known_affected": "2",
      "source": "Microsoft CSAF VEX",
      "status": "final",
      "title": "net/mlx5e: Skip restore TC rules for vport rep without loaded flag",
      "url": "https://msrc.microsoft.com/csaf/vex/2025/msrc_cve-2024-57801.json",
      "version": "2"
    },
    "redhat_vex": {
      "aggregate_severity": "Important",
      "current_release_date": "2026-11-06T20:22:13+00:00",
      "cve": "CVE-2024-57801",
      "id": "CVE-2024-57801",
      "initial_release_date": "2024-01-01T00:00:00+00:00",
      "product_status:known_not_affected": "200",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: net/mlx5e: Skip restore TC rules for vport rep without loaded flag",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2024/cve-2024-57801.json",
      "version": "3"
    },
    "vulnrichment": {
      "containers": {
        "adp": [
          {
            "metrics": [
              {
                "cvssV3_1": {
                  "attackComplexity": "LOW",
                  "attackVector": "LOCAL",
                  "availabilityImpact": "HIGH",
                  "baseScore": 7.8,
                  "baseSeverity": "HIGH",
                  "confidentialityImpact": "HIGH",
                  "integrityImpact": "HIGH",
                  "privilegesRequired": "LOW",
                  "scope": "UNCHANGED",
                  "userInteraction": "NONE",
                  "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                  "version": "3.1"
                }
              },
              {
                "other": {
                  "content": {
                    "id": "CVE-2024-57801",
                    "options": [
                      {
                        "Exploitation": "none"
                      },
                      {
                        "Automatable": "no"
                      },
                      {
                        "Technical Impact": "total"
                      }
                    ],
                    "role": "CISA Coordinator",
                    "timestamp": "2025-02-11T15:41:06.687224Z",
                    "version": "2.0.3"
                  },
                  "type": "ssvc"
                }
              }
            ],
            "problemTypes": [
              {
                "descriptions": [
                  {
                    "cweId": "CWE-416",
                    "description": "CWE-416 Use After Free",
                    "lang": "en",
                    "type": "CWE"
                  }
                ]
              }
            ],
            "providerMetadata": {
              "dateUpdated": "2025-02-11T15:41:08.156Z",
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP"
            },
            "title": "CISA ADP Vulnrichment"
          }
        ],
        "cna": {
          "affected": [
            {
              "defaultStatus": "unaffected",
              "product": "Linux",
              "programFiles": [
                "drivers/net/ethernet/mellanox/mlx5/core/esw/ipsec_fs.c",
                "drivers/net/ethernet/mellanox/mlx5/core/eswitch.h",
                "drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c"
              ],
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "vendor": "Linux",
              "versions": [
                {
                  "lessThan": "3e45dd1622a2c1a83c11bf42fdd8c1810123d6c0",
                  "status": "affected",
                  "version": "d1569537a837d66620aa7ffc2bddf918e902f227",
                  "versionType": "git"
                },
                {
                  "lessThan": "47c78d3fc26e38ab805613a0f592dc8a820c7c64",
                  "status": "affected",
                  "version": "d1569537a837d66620aa7ffc2bddf918e902f227",
                  "versionType": "git"
                },
                {
                  "lessThan": "5a03b368562a7ff5f5f1f63b5adf8309cbdbd5be",
                  "status": "affected",
                  "version": "d1569537a837d66620aa7ffc2bddf918e902f227",
                  "versionType": "git"
                }
              ]
            },
            {
              "defaultStatus": "affected",
              "product": "Linux",
              "programFiles": [
                "drivers/net/ethernet/mellanox/mlx5/core/esw/ipsec_fs.c",
                "drivers/net/ethernet/mellanox/mlx5/core/eswitch.h",
                "drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c"
              ],
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "vendor": "Linux",
              "versions": [
                {
                  "status": "affected",
                  "version": "6.6"
                },
                {
                  "lessThan": "6.6",
                  "status": "unaffected",
                  "version": "0",
                  "versionType": "semver"
                },
                {
                  "lessThanOrEqual": "6.6.*",
                  "status": "unaffected",
                  "version": "6.6.70",
                  "versionType": "semver"
                },
                {
                  "lessThanOrEqual": "6.12.*",
                  "status": "unaffected",
                  "version": "6.12.9",
                  "versionType": "semver"
                },
                {
                  "lessThanOrEqual": "*",
                  "status": "unaffected",
                  "version": "6.13",
                  "versionType": "original_commit_for_fix"
                }
              ]
            }
          ],
          "cpeApplicability": [
            {
              "nodes": [
                {
                  "cpeMatch": [
                    {
                      "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                      "versionEndExcluding": "6.6.70",
                      "versionStartIncluding": "6.6",
                      "vulnerable": true
                    },
                    {
                      "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                      "versionEndExcluding": "6.12.9",
                      "versionStartIncluding": "6.6",
                      "vulnerable": true
                    },
                    {
                      "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                      "versionEndExcluding": "6.13",
                      "versionStartIncluding": "6.6",
                      "vulnerable": true
                    }
                  ],
                  "negate": false,
                  "operator": "OR"
                }
              ]
            }
          ],
          "descriptions": [
            {
              "lang": "en",
              "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx5e: Skip restore TC rules for vport rep without loaded flag\n\nDuring driver unload, unregister_netdev is called after unloading\nvport rep. So, the mlx5e_rep_priv is already freed while trying to get\nrpriv-\u003enetdev, or walk rpriv-\u003etc_ht, which results in use-after-free.\nSo add the checking to make sure access the data of vport rep which is\nstill loaded."
            }
          ],
          "metrics": [
            {
              "cvssV3_1": {
                "baseScore": 7.8,
                "baseSeverity": "HIGH",
                "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                "version": "3.1"
              },
              "scenarios": [
                {
                  "lang": "en",
                  "value": "AV:L - The vulnerable path is only reachable through local device configuration \u2014 XFRM/netlink IPsec offload state and policy deletion, SR-IOV/SF vport reconfiguration, or devlink/driver unload. No remote peer input reaches `mlx5_esw_ipsec_restore_dest_uplink()`.\nAC:L - This is not a race: `rep-\u003erep_data[REP_ETH].priv` is left permanently dangling after any vport rep unload, and the attacker independently controls when the last eswitch IPsec TX rule is removed to trigger the walk. Freshly freed kmalloc memory retains a non-NULL `rpriv-\u003enetdev`, so the old guard reliably fails to catch the freed object, and both required kconfigs are default-y.\nPR:L - Triggering requires network-device administration (CAP_NET_ADMIN for XFRM offload state/policy and SR-IOV/SF vport changes) rather than real root, and consistent with kernel.org CNA scoring of comparable mlx5 eswitch/flow-steering UAFs this is treated as a low-privileged local capability.\nUI:N - The vport rep unload and the subsequent IPsec TX flow-table refcount drop are both performed by the attacker; no action by any other user or victim is needed.\nS:U - The use-after-free corrupts kernel heap memory within the same kernel security authority; there is no crossing of a VM, IOMMU, or sandbox boundary.\nC:H - The freed `mlx5e_rep_priv` is read back (`rpriv-\u003enetdev`, `rpriv-\u003etc_ht`, `tc_ht.tbl`) and the walk then dereferences reclaimed-slab contents as `mlx5e_tc_flow` objects, so a heap-spray of the freed object yields an attacker-directed kernel read primitive.\nI:H - `rhashtable_walk_enter()` writes into the freed object (spinlock acquire) and performs `list_add()` through a `tbl` pointer read out of freed memory, giving a write through an attacker-influenceable pointer; the walk additionally programs hardware flow-rule destinations from bogus flow structures.\nA:H - Even without exploitation, walking a freed rhashtable dereferences garbage bucket-table pointers and causes an immediate kernel oops/panic, and the dangling rep pointer makes the crash reproducible on demand."
                }
              ]
            }
          ],
          "providerMetadata": {
            "dateUpdated": "2026-08-05T11:46:35.806Z",
            "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "shortName": "Linux"
          },
          "references": [
            {
              "url": "https://git.kernel.org/stable/c/3e45dd1622a2c1a83c11bf42fdd8c1810123d6c0"
            },
            {
              "url": "https://git.kernel.org/stable/c/47c78d3fc26e38ab805613a0f592dc8a820c7c64"
            },
            {
              "url": "https://git.kernel.org/stable/c/5a03b368562a7ff5f5f1f63b5adf8309cbdbd5be"
            }
          ],
          "title": "net/mlx5e: Skip restore TC rules for vport rep without loaded flag",
          "x_generator": {
            "engine": "bippy-1.2.0"
          }
        }
      },
      "cveMetadata": {
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "assignerShortName": "Linux",
        "cveId": "CVE-2024-57801",
        "datePublished": "2025-01-15T13:10:24.619Z",
        "dateReserved": "2025-01-15T13:08:59.741Z",
        "dateUpdated": "2026-08-05T11:46:35.806Z",
        "state": "PUBLISHED"
      },
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.