{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2023-52667",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2023-52667"
  ],
  "published": "2024-05-17T14:10:12Z",
  "summary": "net/mlx5e: fix a potential double-free in fs_any_create_groups",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx5e: fix a potential double-free in fs_any_create_groups\n\nWhen kcalloc() for ft->g succeeds but kvzalloc() for in fails,\nfs_any_create_groups() will free ft->g. However, its caller\nfs_any_create_table() will free ft->g again through calling\nmlx5e_destroy_flow_table(), which will lead to a double-free.\nFix this by setting ft->g to NULL in fs_any_create_groups().",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.47-1+rpt4"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-2712",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v6",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7l",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v8",
            "binary_version": "1:6.1.47-1+rpt4"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.47-1+rpt4": {
            "linux_commit": "655fc658a15ae7a6f37103754adb39ba52a9a14e",
            "upstream_version": "6.1.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.76",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2023-52667"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/72a729868592752b5a294d27453da264106983b1"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/b2fa86b2aceb4bc9ada51cea90f61546d7512cbe"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/2897c981ee63e1be5e530b1042484626a10b26d8"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/65a4ade8a6d205979292e88beeb6a626ddbd4779"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/aef855df7e1bbd5aa4484851561211500b22707e"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T11:24:39Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.8,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The double-free is reached only through local mlx5e PTP RX flow-steering setup (SIOCSHWTSTAMP/ethtool private-flag paths \u2192 mlx5e_ptp_rx_set_fs \u2192 mlx5e_fs_tt_redirect_any_create \u2192 fs_any_create_groups), not via remotely received packets or peer protocol data.\nAC:L - The bug fires when kcalloc(ft->g) succeeds and the subsequent kvzalloc(in) fails; a local attacker can drive that GFP_KERNEL failure via memory pressure, after which the double-free in mlx5e_destroy_flow_table() is fully deterministic with no race outside attacker control.\nPR:L - An unprivileged local account can supply the memory-pressure half of the condition while ordinary admin/PTP hwstamp or channel reopen activity hits the path; alternatively, CAP_NET_ADMIN checked via ns_capable(net->user_ns) on an mlx5 VF in a tenant netns is Low, not init-ns root.\nUI:N - No separate victim action is required; the attacker induces the failing allocation (and/or issues the hwstamp/ethtool configuration themselves), and the faulty cleanup runs automatically in fs_any_create_table()'s error path.\nS:U - Impact is confined to host-kernel slab/mlx5e state under a single security authority; the defect does not cross a VM, IOMMU, or sandbox boundary.\nC:H - ft->g is a 16-byte (2-pointer) kmalloc object; under the same memory pressure that triggers the bug it can be reallocated between the two kfree()s, so freelist aliasing from the double-free yields an arbitrary kernel read/disclosure primitive.\nI:H - Double-free freelist corruption lets attacker-controlled data overwrite a live kmalloc-16 object and/or redirect subsequent allocations, providing a write and control-flow hijack primitive suitable for privilege escalation.\nA:H - The second kfree() of the already-freed pointer trips SLUB double-free detection or corrupts the freelist, causing a kernel BUG/oops/panic and denying service on the host or NIC bring-up path."
    }
  }
}
