{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2026-98311",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2026-98311"
  ],
  "published": "2026-10-06T08:47:10Z",
  "summary": "wifi: virt_wifi: don't transfer operstate before register",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nwifi: virt_wifi: don't transfer operstate before register\n\nvirt_wifi_newlink() calls netif_stacked_transfer_operstate() before\nregister_netdevice(). If the lower device is dormant, that queues the\nnew netdev on lweventlist while it is still uninitialized. If\nregistration fails after that, for example because of an invalid name\nsuch as \"bad/name\", free_netdev() immediately frees the object. A\nlater linkwatch_fire_event() then use-after-frees the list entry.\n\nMove the transfer to after netdev_upper_dev_link(), as macvlan and\nipvlan already do.",
  "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.189",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-98311"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/ee9ea1afd6990def51d52b3a0aecd5cfcc951da0"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/9ce26201f6dedf3fa02b97da8c67ee6f6c5f7225"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/f9526054c2b2cace5916b7225603d008834ec011"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/e8304e25c6dabb8accf38b807969438d0ce84fd7"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/ca49763c42c1089d654bf11b037980a9ede3772c"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/293c56a66510bb7de073a1aba388e38abddff1fb"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/b808a9af5fd21f9c68b0d024eda7535b5dce6a4e"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/e5c8d7acd31b27057ea42cd405d0b3ece097bc89"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-10-07T06:50:27Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.8,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The trigger is a local RTM_NEWLINK netlink request of kind \"virt_wifi\" handled by virt_wifi_newlink(). No remote peer or WiFi frame supplies any input. The bug is a fault in the order of steps when creating the device.\nAC:L - The attacker sets up the state and triggers it alone. They bring the lower device (e.g. lo) up and set it dormant via IFLA_OPERSTATE, then send RTM_NEWLINK with an invalid name like \"bad/name\". netif_dormant_on() queues the device on lweventlist, register_netdevice() fails and free_netdev() frees the device while it is still queued. No race is involved.\nPR:L - rtnetlink_rcv_msg() and __rtnl_newlink() check CAP_NET_ADMIN only against the user namespace that owns the netns, so an unprivileged user can get it with unshare -Urn. __rtnl_newlink() also auto-loads rtnl-link-virt_wifi through request_module().\nUI:N - No victim action is needed; the attacker's own netlink messages create the dormant lower device, the failing virt_wifi link and the queued linkwatch event.\nS:U - Memory in the same kernel is corrupted and stays within the kernel's own security authority. No VM, IOMMU or sandbox boundary is crossed.\nC:H - The freed net_device is still linked into the global lweventlist. linkwatch_do_dev() later reads it (flags, state, qdisc pointers), so the attacker can reclaim the freed object with controlled data and use the resulting reads to leak memory.\nI:H - A list_add or list_del on lweventlist writes through link_watch_list into freed memory. With a reclaimed object, linkwatch_do_dev() calls dev_activate() or dev_deactivate() on qdisc pointers the attacker controls, which allows corrupting memory and hijacking control flow.\nA:H - Even without careful exploitation, the queued linkwatch_event work or any later linkwatch_fire_event() corrupts list memory or touches freed memory. That causes a kernel oops or panic, and the attacker can repeat it."
    }
  }
}
