CVE-2026-139343
published high CVSS 3.1 · 7.8ipv4: use RCU protection in inet_netconf_get_devconf()
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linuxbbcf91053bb622c4c26a9bfc998d3b0c59227f10 to < 65ab9fea1f3607f5ffea13d30eaab8c897fa6fc5 · bbcf91053bb622c4c26a9bfc998d3b0c59227f10 to < f069745ffcea66a6bde5ade49e5145e7bd9d74ce · bbcf91053bb622c4c26a9bfc998d3b0c59227f10 to < 188ec7dfa015e9fa6ad809447589c950185762e9 · bbcf91053bb622c4c26a9bfc998d3b0c59227f10 to < b2039a6dd36b5c89142bfb95bc0205be8abcc600 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux6.9 (affected) · 0 to < 6.9 (unaffected · semver) · 6.12.119 through 6.12.* (unaffected · semver) · 6.18.65 through 6.18.* (unaffected · semver) · 7.3.6 through 7.3.* (unaffected · semver) · 7.4-rc1 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected; Pending Fix | Not stated | Amazon Linux assessment |
Description
In the Linux kernel, the following vulnerability has been resolved: ipv4: use RCU protection in inet_netconf_get_devconf() inet_netconf_get_devconf() runs without RTNL. It uses dev_get_by_index() and in_dev_get() to pin the device and its in_device while the reply is allocated and filled. in_dev_get() is not safe for a lockless caller. Since commit 9d40c84cf5bc ("net: devinet: Reduce refcount before grace period"), inetdev_destroy() drops the final reference before the RCU grace period. A reader can load dev->ip_ptr, then call refcount_inc() on a zero refcount after in_dev_free_rcu() has been queued, and keep using the in_device once it has been freed. None of these references are needed. An in_device is freed after an RCU grace period, ipv4_devconf is embedded in it, and inet_netconf_fill_devconf() does not sleep. Allocate the skb first, then perform the lookup and the fill under rcu_read_lock(), using dev_get_by_index_rcu() and __in_dev_get_rcu(), like inet_netconf_dump_devconf() already does.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.8 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - The race is between two local netlink requests on the attacker's own NETLINK_ROUTE socket: RTM_GETNETCONF reaching inet_netconf_get_devconf() (registered RTNL_FLAG_DOIT_UNLOCKED), and RTM_NEWLINK/SETLINK changing a device's MTU or deleting it, which reaches inetdev_destroy() through inetdev_event(). No remote peer supplies any input. AC:L - Both sides belong to the attacker: one thread loops RTM_GETNETCONF on the ifindex of its own dummy device while another switches its MTU between 60 and 1500, so inetdev_destroy() and inetdev_init() repeat without limit. The attacker controls scheduling to stall its own reader between the ip_ptr load and refcount_inc in in_dev_get(). A miss just returns a valid ref or -ENODEV. PR:L - rtnetlink_rcv_msg() applies no CAP_NET_ADMIN check to RTNL_KIND_GET, so the reader is unprivileged. The writer needs CAP_NET_ADMIN only over the netns that owns the device: after unshare -Urn, the user can create a dummy device (min_mtu=0) and set its MTU below 68 in that netns. UI:N - No victim action is needed; the attacker issues both the RTM_GETNETCONF lookups and the MTU or delete requests that free the in_device. S:U - The freed in_device is kernel heap memory, and the impact is kernel compromise within the same authority. No VM, IOMMU or sandbox boundary is crossed beyond ordinary local privilege escalation. C:H - After refcount_inc on zero, the reader drops RCU and sleeps in nlmsg_new(GFP_KERNEL). inet_netconf_fill_devconf() then copies six s32 values from the freed (possibly reallocated) in_dev->cnf.data into the netlink reply. Reallocating that slot gives the usual read primitives of a kmalloc use-after-free. I:H - in_dev_put() then runs refcount_dec_and_test on the freed object's refcnt. If an attacker spray left 1 there, in_dev_finish_destroy() runs on controlled data: netdev_put() on a forged dev pointer and call_rcu(in_dev_free_rcu), which kfree()s a forged mc_hash pointer and the sprayed object. That is an arbitrary-free and double-free write primitive. A:H - refcount_inc on zero fires refcount_warn_saturate (REFCOUNT_ADD_UAF), which panics under panic_on_warn, and the use-after-free read and decrement can oops or corrupt slab memory. The trigger can be repeated without limit.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | bbcf91053bb622c4c26a9bfc998d3b0c59227f10 to < 65ab9fea1f3607f5ffea13d30eaab8c897fa6fc5 (affected · git)bbcf91053bb622c4c26a9bfc998d3b0c59227f10 to < f069745ffcea66a6bde5ade49e5145e7bd9d74ce (affected · git)bbcf91053bb622c4c26a9bfc998d3b0c59227f10 to < 188ec7dfa015e9fa6ad809447589c950185762e9 (affected · git)bbcf91053bb622c4c26a9bfc998d3b0c59227f10 to < b2039a6dd36b5c89142bfb95bc0205be8abcc600 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 6.9 (affected)0 to < 6.9 (unaffected · semver)6.12.119 through 6.12.* (unaffected · semver)6.18.65 through 6.18.* (unaffected · semver)7.3.6 through 7.3.* (unaffected · semver)7.4-rc1 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
4Provider assertions
1Linux · cna
ipv4: use RCU protection in inet_netconf_get_devconf()
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 6342bbe7e38fe4db914ba2731236854935fdf330de8a6dca97f4f756ee299fce
- Ingested
- 01 Dec 2026, 05:47:22 UTC
- Source record
- Official CVE record