# CVE-2026-43167: xfrm: always flush state and policy upon NETDEV\_UNREGISTER event

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; 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.16% (percentile 3, 2026-11-26)
- **Published:** 2026-05-06T11:27:43.904Z
- **Modified:** 2026-11-11T20:10:00.273Z

## Who should check

- Anyone running Linux \>= d77e38e612a017480157fe6d2c1422f42cb5b7e3, \< d4df5a7da376e35089b8b601a86ff8a4cf997e2f; \>= d77e38e612a017480157fe6d2c1422f42cb5b7e3, \< 166801e49a5b5fc127b8c9e2f110f303cfddfbc3; \>= d77e38e612a017480157fe6d2c1422f42cb5b7e3, \< a3c8fede034fa27892f87c863cbd5493167d17ed; \>= d77e38e612a017480157fe6d2c1422f42cb5b7e3, \< 59581778792cbaf8ad788f4a21dc663ce986050e; \>= d77e38e612a017480157fe6d2c1422f42cb5b7e3, \< 8c75c455ecd3bfd2f36abf66edb7021c4fa19ec4; \>= d77e38e612a017480157fe6d2c1422f42cb5b7e3, \< 4efa91a28576054aae0e6dad9cba8fed8293aef8
- Anyone running Linux 4.12

## Description

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

xfrm: always flush state and policy upon NETDEV\_UNREGISTER event

syzbot is reporting that "struct xfrm\_state" refcount is leaking.

  unregister\_netdevice: waiting for netdevsim0 to become free. Usage count = 2
  ref\_tracker: netdev@ffff888052f24618 has 1/1 users at
       \_\_netdev\_tracker\_alloc include/linux/netdevice.h:4400 \[inline\]
       netdev\_tracker\_alloc include/linux/netdevice.h:4412 \[inline\]
       xfrm\_dev\_state\_add+0x3a5/0x1080 net/xfrm/xfrm\_device.c:316
       xfrm\_state\_construct net/xfrm/xfrm\_user.c:986 \[inline\]
       xfrm\_add\_sa+0x34ff/0x5fa0 net/xfrm/xfrm\_user.c:1022
       xfrm\_user\_rcv\_msg+0x58e/0xc00 net/xfrm/xfrm\_user.c:3507
       netlink\_rcv\_skb+0x158/0x420 net/netlink/af\_netlink.c:2550
       xfrm\_netlink\_rcv+0x71/0x90 net/xfrm/xfrm\_user.c:3529
       netlink\_unicast\_kernel net/netlink/af\_netlink.c:1318 \[inline\]
       netlink\_unicast+0x5aa/0x870 net/netlink/af\_netlink.c:1344
       netlink\_sendmsg+0x8c8/0xdd0 net/netlink/af\_netlink.c:1894
       sock\_sendmsg\_nosec net/socket.c:727 \[inline\]
       \_\_sock\_sendmsg net/socket.c:742 \[inline\]
       \_\_\_\_sys\_sendmsg+0xa5d/0xc30 net/socket.c:2592
       \_\_\_sys\_sendmsg+0x134/0x1d0 net/socket.c:2646
       \_\_sys\_sendmsg+0x16d/0x220 net/socket.c:2678
       do\_syscall\_x64 arch/x86/entry/syscall\_64.c:63 \[inline\]
       do\_syscall\_64+0xcd/0xf80 arch/x86/entry/syscall\_64.c:94
       entry\_SYSCALL\_64\_after\_hwframe+0x77/0x7f

This is because commit d77e38e612a0 ("xfrm: Add an IPsec hardware
offloading API") implemented xfrm\_dev\_unregister() as no-op despite
xfrm\_dev\_state\_add() from xfrm\_state\_construct() acquires a reference
to "struct net\_device".
I guess that that commit expected that NETDEV\_DOWN event is fired before
NETDEV\_UNREGISTER event fires, and also assumed that xfrm\_dev\_state\_add()
is called only if (dev-\>features & NETIF\_F\_HW\_ESP) != 0.

Sabrina Dubroca identified steps to reproduce the same symptoms as below.

  echo 0 \> /sys/bus/netdevsim/new\_device
  dev=$(ls -1 /sys/bus/netdevsim/devices/netdevsim0/net/)
  ip xfrm state add src 192.168.13.1 dst 192.168.13.2 proto esp \\
     spi 0x1000 mode tunnel aead 'rfc4106(gcm(aes))' $key 128   \\
     offload crypto dev $dev dir out
  ethtool -K $dev esp-hw-offload off
  echo 0 \> /sys/bus/netdevsim/del\_device

Like these steps indicate, the NETIF\_F\_HW\_ESP bit can be cleared after
xfrm\_dev\_state\_add() acquired a reference to "struct net\_device".
Also, xfrm\_dev\_state\_add() does not check for the NETIF\_F\_HW\_ESP bit
when acquiring a reference to "struct net\_device".

Commit 03891f820c21 ("xfrm: handle NETDEV\_UNREGISTER for xfrm device")
re-introduced the NETDEV\_UNREGISTER event to xfrm\_dev\_event(), but that
commit for unknown reason chose to share xfrm\_dev\_down() between the
NETDEV\_DOWN event and the NETDEV\_UNREGISTER event.
I guess that that commit missed the behavior in the previous paragraph.

Therefore, we need to re-introduce xfrm\_dev\_unregister() in order to
release the reference to "struct net\_device" by unconditionally flushing
state and policy.

## Affected and fixed versions

- Linux: \>= d77e38e612a017480157fe6d2c1422f42cb5b7e3, \< d4df5a7da376e35089b8b601a86ff8a4cf997e2f; \>= d77e38e612a017480157fe6d2c1422f42cb5b7e3, \< 166801e49a5b5fc127b8c9e2f110f303cfddfbc3; \>= d77e38e612a017480157fe6d2c1422f42cb5b7e3, \< a3c8fede034fa27892f87c863cbd5493167d17ed; \>= d77e38e612a017480157fe6d2c1422f42cb5b7e3, \< 59581778792cbaf8ad788f4a21dc663ce986050e; \>= d77e38e612a017480157fe6d2c1422f42cb5b7e3, \< 8c75c455ecd3bfd2f36abf66edb7021c4fa19ec4; \>= d77e38e612a017480157fe6d2c1422f42cb5b7e3, \< 4efa91a28576054aae0e6dad9cba8fed8293aef8 (cvelist)
- Linux: 4.12 (cvelist)

## Mitigation

- Upgrade Linux to 4efa91a28576054aae0e6dad9cba8fed8293aef8 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-43167. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-43167.md
Affected: Linux >= d77e38e612a017480157fe6d2c1422f42cb5b7e3, < d4df5a7da376e35089b8b601a86ff8a4cf997e2f; >= d77e38e612a017480157fe6d2c1422f42cb5b7e3, < 166801e49a5b5fc127b8c9e2f110f303cfddfbc3; >= d77e38e612a017480157fe6d2c1422f42cb5b7e3, < a3c8fede034fa27892f87c863cbd5493167d17ed; >= d77e38e612a017480157fe6…
Fixed in: Linux 166801e49a5b5fc127b8c9e2f110f303cfddfbc3, Linux 59581778792cbaf8ad788f4a21dc663ce986050e, Linux 8c75c455ecd3bfd2f36abf66edb7021c4fa19ec4, Linux 4efa91a28576054aae0e6dad9cba8fed8293aef8

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-43167 being exploited?

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

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

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= d77e38e612a017480157fe6d2c1422f42cb5b7e3, \< d4df5a7da376e35089b8b601a86ff8a4cf997e2f; \>= d77e38e612a017480157fe6d2c1422f42cb5b7e3, \< 166801e49a5b5fc127b8c9e2f110f303cfddfbc3; \>= d77e38e612a017480157fe6d2c1422f42cb5b7e3, \< a3c8fede034fa27892f87c863cbd5493167d17ed; \>= d77e38e612a017480157fe6d2c1422f42cb5b7e3, \< 59581778792cbaf8ad788f4a21dc663ce986050e; \>= d77e38e612a017480157fe6d2c1422f42cb5b7e3, \< 8c75c455ecd3bfd2f36abf66edb7021c4fa19ec4; \>= d77e38e612a017480157fe6d2c1422f42cb5b7e3, \< 4efa91a28576054aae0e6dad9cba8fed8293aef8; Linux 4.12.

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

Yes. Fixed in Linux 166801e49a5b5fc127b8c9e2f110f303cfddfbc3, Linux 59581778792cbaf8ad788f4a21dc663ce986050e, Linux 8c75c455ecd3bfd2f36abf66edb7021c4fa19ec4, Linux 4efa91a28576054aae0e6dad9cba8fed8293aef8. Upgrade Linux to 4efa91a28576054aae0e6dad9cba8fed8293aef8 or later.

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

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/166801e49a5b5fc127b8c9e2f110f303cfddfbc3>
- patch: <https://git.kernel.org/stable/c/a3c8fede034fa27892f87c863cbd5493167d17ed>
- patch: <https://git.kernel.org/stable/c/59581778792cbaf8ad788f4a21dc663ce986050e>
- patch: <https://git.kernel.org/stable/c/8c75c455ecd3bfd2f36abf66edb7021c4fa19ec4>
- patch: <https://git.kernel.org/stable/c/4efa91a28576054aae0e6dad9cba8fed8293aef8>
- other: <https://git.kernel.org/stable/c/d4df5a7da376e35089b8b601a86ff8a4cf997e2f>

## 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-43167>

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