{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2023-53570",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2023-53570"
  ],
  "published": "2025-10-04T15:17:41Z",
  "summary": "wifi: nl80211: fix integer overflow in nl80211_parse_mbssid_elems()",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nwifi: nl80211: fix integer overflow in nl80211_parse_mbssid_elems()\n\nnl80211_parse_mbssid_elems() uses a u8 variable num_elems to count the\nnumber of MBSSID elements in the nested netlink attribute attrs, which can\nlead to an integer overflow if a user of the nl80211 interface specifies\n256 or more elements in the corresponding attribute in userspace. The\ninteger overflow can lead to a heap buffer overflow as num_elems determines\nthe size of the trailing array in elems, and this array is thereafter\nwritten to for each element in attrs.\n\nNote that this vulnerability only affects devices with the\nwiphy->mbssid_max_interfaces member set for the wireless physical device\nstruct in the device driver, and can only be triggered by a process with\nCAP_NET_ADMIN capabilities.\n\nFix this by checking for a maximum of 255 elements in attrs.",
  "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.21-1+rpt1"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi1-rpi-v6",
            "binary_version": "1:6.1.21-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi1-rpi-v7",
            "binary_version": "1:6.1.21-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi1-rpi-v7l",
            "binary_version": "1:6.1.21-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi1-rpi-v8",
            "binary_version": "1:6.1.21-1+rpt1"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.21-1+rpt1": {
            "linux_commit": "0afb5e98488aed7017b9bf321b575d0177feb7ed",
            "upstream_version": "6.1.21",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.46"
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2023-53570"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/e642eb67b8c10dcce758d549cc81564116e0fa49"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/7d09f9f255a5f78578deba5454923072bb53b16c"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/6311071a056272e1e761de8d0305e87cc566f734"
    }
  ],
  "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 vulnerability is triggered by crafting an nl80211 generic-netlink message (NL80211_CMD_START_AP/SET_BEACON/CHANNEL_SWITCH) from local userspace; despite being in the wireless subsystem, no over-the-air frame is involved. Per kernel scoring guidance, netlink-reachable bugs are Local.\nAC:L - The attacker fully and deterministically controls the trigger by placing 256 nested attributes in NL80211_ATTR_MBSSID_ELEMS \u2014 no race, no timing, no memory-layout condition outside their influence, and the overflow size and contents are directly tunable via the attribute count and lengths.\nPR:L - The gate is GENL_UNS_ADMIN_PERM, i.e. netlink_ns_capable(net->user_ns, CAP_NET_ADMIN), which an unprivileged user obtains via `unshare -Urn`; mac80211_hwsim's radio-creation command is gated identically and places the new wiphy (with mbssid_max_interfaces = 8) in the caller's netns, giving a complete unprivileged local path.\nUI:N - The attacker performs every step themselves \u2014 create/select an AP-capable interface and issue the netlink command \u2014 with no action required from any other user or administrator.\nS:U - The heap corruption occurs in kernel slab memory within the same kernel security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - A 4 KB controlled out-of-bounds heap write lets the attacker overwrite adjacent objects' pointers and length fields, which is readily leveraged into arbitrary kernel-memory disclosure, so confidentiality impact is High.\nI:H - This is a large, attacker-sized out-of-bounds heap write with a fully attacker-controlled size_t field per entry, providing a strong slab-corruption primitive suitable for control-flow hijack and privilege escalation.\nA:H - Writing 4096 bytes past an 8-byte kmalloc allocation reliably corrupts slab metadata and neighbouring objects, producing kernel oops/panic and complete loss of availability."
    }
  }
}
