# CVE-2026-31695: wifi: virt\_wifi: remove SET\_NETDEV\_DEV to avoid use-after-free

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.17% (percentile 4, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2026-05-01T13:53:36.857Z
- **Modified:** 2026-11-11T21:10:00.200Z

## Who should check

- Anyone running Linux \>= d43c65b05b848e0b2db1a6c78b02c189da3a95b5, \< e90f3e74e1ebc26c461a74be490d322716bcdcb4; \>= d43c65b05b848e0b2db1a6c78b02c189da3a95b5, \< dcb5915696bd7b32b6404a897c24ee47cb23e772; \>= d43c65b05b848e0b2db1a6c78b02c189da3a95b5, \< d1e3aa80e6e04410ba89eaaba4441a0d749d181d; \>= d43c65b05b848e0b2db1a6c78b02c189da3a95b5, \< c5fa98842783ed227365d1303785de6a67020c8d; \>= d43c65b05b848e0b2db1a6c78b02c189da3a95b5, \< 5bbadf60b121065ffb267ec92018607b9c1c7524; \>= d43c65b05b848e0b2db1a6c78b02c189da3a95b5, \< 5adc01506da94dfaab76f3d1b8410a8ca7bfc59d; \>= d43c65b05b848e0b2db1a6c78b02c189da3a95b5, \< 789b06f9f39cdc7e895bdab2c034e39c41c8f8d6
- Anyone running Linux 5.15

## Description

In the Linux kernel, the following vulnerability has been resolved:

wifi: virt\_wifi: remove SET\_NETDEV\_DEV to avoid use-after-free

Currently we execute \`SET\_NETDEV\_DEV(dev, &priv-\>lowerdev-\>dev)\` for
the virt\_wifi net devices. However, unregistering a virt\_wifi device in
netdev\_run\_todo() can happen together with the device referenced by
SET\_NETDEV\_DEV().

It can result in use-after-free during the ethtool operations performed
on a virt\_wifi device that is currently being unregistered. Such a net
device can have the \`dev.parent\` field pointing to the freed memory,
but ethnl\_ops\_begin() calls \`pm\_runtime\_get\_sync(dev-\>dev.parent)\`.

Let's remove SET\_NETDEV\_DEV for virt\_wifi to avoid bugs like this:

 ==================================================================
 BUG: KASAN: slab-use-after-free in \_\_pm\_runtime\_resume+0xe2/0xf0
 Read of size 2 at addr ffff88810cfc46f8 by task pm/606

 Call Trace:
  \<TASK\>
  dump\_stack\_lvl+0x4d/0x70
  print\_report+0x170/0x4f3
  ? \_\_pfx\_\_raw\_spin\_lock\_irqsave+0x10/0x10
  kasan\_report+0xda/0x110
  ? \_\_pm\_runtime\_resume+0xe2/0xf0
  ? \_\_pm\_runtime\_resume+0xe2/0xf0
  \_\_pm\_runtime\_resume+0xe2/0xf0
  ethnl\_ops\_begin+0x49/0x270
  ethnl\_set\_features+0x23c/0xab0
  ? \_\_pfx\_ethnl\_set\_features+0x10/0x10
  ? kvm\_sched\_clock\_read+0x11/0x20
  ? local\_clock\_noinstr+0xf/0xf0
  ? local\_clock+0x10/0x30
  ? kasan\_save\_track+0x25/0x60
  ? \_\_kasan\_kmalloc+0x7f/0x90
  ? genl\_family\_rcv\_msg\_attrs\_parse.isra.0+0x150/0x2c0
  genl\_family\_rcv\_msg\_doit+0x1e7/0x2c0
  ? \_\_pfx\_genl\_family\_rcv\_msg\_doit+0x10/0x10
  ? \_\_pfx\_cred\_has\_capability.isra.0+0x10/0x10
  ? stack\_trace\_save+0x8e/0xc0
  genl\_rcv\_msg+0x411/0x660
  ? \_\_pfx\_genl\_rcv\_msg+0x10/0x10
  ? \_\_pfx\_ethnl\_set\_features+0x10/0x10
  netlink\_rcv\_skb+0x121/0x380
  ? \_\_pfx\_genl\_rcv\_msg+0x10/0x10
  ? \_\_pfx\_netlink\_rcv\_skb+0x10/0x10
  ? \_\_pfx\_down\_read+0x10/0x10
  genl\_rcv+0x23/0x30
  netlink\_unicast+0x60f/0x830
  ? \_\_pfx\_netlink\_unicast+0x10/0x10
  ? \_\_pfx\_\_\_alloc\_skb+0x10/0x10
  netlink\_sendmsg+0x6ea/0xbc0
  ? \_\_pfx\_netlink\_sendmsg+0x10/0x10
  ? \_\_futex\_queue+0x10b/0x1f0
  \_\_\_\_sys\_sendmsg+0x7a2/0x950
  ? copy\_msghdr\_from\_user+0x26b/0x430
  ? \_\_pfx\_\_\_\_\_sys\_sendmsg+0x10/0x10
  ? \_\_pfx\_copy\_msghdr\_from\_user+0x10/0x10
  \_\_\_sys\_sendmsg+0xf8/0x180
  ? \_\_pfx\_\_\_\_sys\_sendmsg+0x10/0x10
  ? \_\_pfx\_futex\_wait+0x10/0x10
  ? fdget+0x2e4/0x4a0
  \_\_sys\_sendmsg+0x11f/0x1c0
  ? \_\_pfx\_\_\_sys\_sendmsg+0x10/0x10
  do\_syscall\_64+0xe2/0x570
  ? exc\_page\_fault+0x66/0xb0
  entry\_SYSCALL\_64\_after\_hwframe+0x77/0x7f
  \</TASK\>

This fix may be combined with another one in the ethtool subsystem:
https://lore.kernel.org/all/20260322075917.254874-1-alex.popov@linux.com/T/\#u

## Affected and fixed versions

- Linux: \>= d43c65b05b848e0b2db1a6c78b02c189da3a95b5, \< e90f3e74e1ebc26c461a74be490d322716bcdcb4; \>= d43c65b05b848e0b2db1a6c78b02c189da3a95b5, \< dcb5915696bd7b32b6404a897c24ee47cb23e772; \>= d43c65b05b848e0b2db1a6c78b02c189da3a95b5, \< d1e3aa80e6e04410ba89eaaba4441a0d749d181d; \>= d43c65b05b848e0b2db1a6c78b02c189da3a95b5, \< c5fa98842783ed227365d1303785de6a67020c8d; \>= d43c65b05b848e0b2db1a6c78b02c189da3a95b5, \< 5bbadf60b121065ffb267ec92018607b9c1c7524; \>= d43c65b05b848e0b2db1a6c78b02c189da3a95b5, \< 5adc01506da94dfaab76f3d1b8410a8ca7bfc59d; \>= d43c65b05b848e0b2db1a6c78b02c189da3a95b5, \< 789b06f9f39cdc7e895bdab2c034e39c41c8f8d6 (cvelist)
- Linux: 5.15 (cvelist)

## Mitigation

- Upgrade Linux to 789b06f9f39cdc7e895bdab2c034e39c41c8f8d6 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-31695. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-31695.md
Affected: Linux >= d43c65b05b848e0b2db1a6c78b02c189da3a95b5, < e90f3e74e1ebc26c461a74be490d322716bcdcb4; >= d43c65b05b848e0b2db1a6c78b02c189da3a95b5, < dcb5915696bd7b32b6404a897c24ee47cb23e772; >= d43c65b05b848e0b2db1a6c78b02c189da3a95b5, < d1e3aa80e6e04410ba89eaaba4441a0d749d181d; >= d43c65b05b848e0b2db1a6c…
Fixed in: Linux 5bbadf60b121065ffb267ec92018607b9c1c7524, Linux 5adc01506da94dfaab76f3d1b8410a8ca7bfc59d, Linux 789b06f9f39cdc7e895bdab2c034e39c41c8f8d6

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-31695 being exploited?

There is no confirmed exploitation: CVE-2026-31695 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.17% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-31695?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-31695?

Linux \>= d43c65b05b848e0b2db1a6c78b02c189da3a95b5, \< e90f3e74e1ebc26c461a74be490d322716bcdcb4; \>= d43c65b05b848e0b2db1a6c78b02c189da3a95b5, \< dcb5915696bd7b32b6404a897c24ee47cb23e772; \>= d43c65b05b848e0b2db1a6c78b02c189da3a95b5, \< d1e3aa80e6e04410ba89eaaba4441a0d749d181d; \>= d43c65b05b848e0b2db1a6c78b02c189da3a95b5, \< c5fa98842783ed227365d1303785de6a67020c8d; \>= d43c65b05b848e0b2db1a6c78b02c189da3a95b5, \< 5bbadf60b121065ffb267ec92018607b9c1c7524; \>= d43c65b05b848e0b2db1a6c78b02c189da3a95b5, \< 5adc01506da94dfaab76f3d1b8410a8ca7bfc59d; \>= d43c65b05b848e0b2db1a6c78b02c189da3a95b5, \< 789b06f9f39cdc7e895bdab2c034e39c41c8f8d6; Linux 5.15.

### Is there a fix for CVE-2026-31695?

Yes. Fixed in Linux 5bbadf60b121065ffb267ec92018607b9c1c7524, Linux 5adc01506da94dfaab76f3d1b8410a8ca7bfc59d, Linux 789b06f9f39cdc7e895bdab2c034e39c41c8f8d6. Upgrade Linux to 789b06f9f39cdc7e895bdab2c034e39c41c8f8d6 or later.

### How do I check if I'm affected by CVE-2026-31695?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/e90f3e74e1ebc26c461a74be490d322716bcdcb4>
- patch: <https://git.kernel.org/stable/c/dcb5915696bd7b32b6404a897c24ee47cb23e772>
- patch: <https://git.kernel.org/stable/c/d1e3aa80e6e04410ba89eaaba4441a0d749d181d>
- patch: <https://git.kernel.org/stable/c/c5fa98842783ed227365d1303785de6a67020c8d>
- patch: <https://git.kernel.org/stable/c/5bbadf60b121065ffb267ec92018607b9c1c7524>
- patch: <https://git.kernel.org/stable/c/5adc01506da94dfaab76f3d1b8410a8ca7bfc59d>
- patch: <https://git.kernel.org/stable/c/789b06f9f39cdc7e895bdab2c034e39c41c8f8d6>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-31695>

HTML: <https://flawdb.com/CVE-2026-31695> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-31695>
