CVE-2026-139348
published high CVSS 3.1 · 7.8net/smc: hold a reference on net_device returned by pnet_find_base_ndev()
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux0afff91c6f5ecef27715ea71e34dc2baacba1060 to < e3f992158d96d47aae01aa76c5e35af941d726c2 · 0afff91c6f5ecef27715ea71e34dc2baacba1060 to < 6176fa6b14c1ab439936b6d8ceda9a38dfb149dd · 0afff91c6f5ecef27715ea71e34dc2baacba1060 to < bd8ea7ddb909807b2200e4d72b38a0bc7d746298 · 0afff91c6f5ecef27715ea71e34dc2baacba1060 to < ea3bf68cfa530b4c1e5a4fe15fca5409a32b8c98 · 0afff91c6f5ecef27715ea71e34dc2baacba1060 to < 521c06e5d15386013de2196aa6917039ecf192ce · 0afff91c6f5ecef27715ea71e34dc2baacba1060 to < e6435b2cc5fdf008cdb67ad9a811a266e8ac9c1e · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux4.19 (affected) · 0 to < 4.19 (unaffected · semver) · 6.1.193 through 6.1.* (unaffected · semver) · 6.6.163 through 6.6.* (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 |
Description
In the Linux kernel, the following vulnerability has been resolved: net/smc: hold a reference on net_device returned by pnet_find_base_ndev() pnet_find_base_ndev() resolves the base net_device for stacked devices under RTNL, then drops the lock and returns the raw pointer without taking a reference. All three callers dereference the pointer after RTNL has been released, creating a use-after-free window if the device is concurrently unregistered. Take a reference with netdev_hold() before dropping RTNL and add the matching netdev_put() in every return path of the three callers: - smc_pnet_add_eth() - smc_pnet_find_roce_by_pnetid() - smc_pnet_find_ism_by_pnetid() Found by code analysis, confirmed with a proof-of-concept that triggers a KASAN slab-use-after-free report.
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 - Reached via a local connect() on an AF_SMC socket: __smc_connect -> smc_find_proposal_devices -> smc_pnet_find_ism_resource/roce_resource -> pnet_find_base_ndev. The free comes from local rtnetlink deletion of a bond slave. A remote SMC peer can reach the server-side lookup but cannot unregister the base netdev, so no wire message supplies the bug. AC:L - The attacker runs both sides of the race: SMC connects that read base_ndev after pnet_find_base_ndev drops RTNL, and RTM_DELLINK of the bond slave. They can repeat it freely and widen the window by contending pnettable->lock between the dev_net(base_ndev) reads. No ISM/RoCE hardware is needed and the commit reports a KASAN-confirmed PoC. PR:L - smc_create() has no capability check and AF_SMC autoloads. Creating veth/bond, enslaving and deleting the slave need only CAP_NET_ADMIN in an unprivileged user+net namespace (unshare -Urn). Only the smc_pnet_add_eth caller (SMC_PNETID_ADD) is GENL_ADMIN_PERM root-only, and the socket path does not need it. UI:N - The attacker sets up the netns, bond, veth, the AF_SMC listener that sets syn_smc, the connecting client and the slave deletion entirely on their own; no other user or admin action is needed. S:U - Corruption happens in the kernel's own net_device heap memory and leads to ordinary kernel privilege escalation or a crash in the same authority; no guest/host or IOMMU boundary is crossed. C:H - After the bond-slave net_device is freed, SMC reads base_ndev->nd_net (and dev.parent on s390) from reclaimable kvmalloc memory. A sprayed object makes that a forged struct net pointer, which net_generic() and the pnettable list walk dereference, giving controlled kernel reads. I:H - The forged nd_net from the freed net_device feeds mutex_lock/mutex_unlock(&pnettable->lock) at an attacker-derived address. The owner cmpxchg writes the current task pointer there and then clears it, a kernel write primitive usable for further corruption. A:H - Dereferencing a dangling base_ndev, or the bogus struct net/mutex derived from it, after the slave is unregistered causes a KASAN splat or oops. With panic_on_oops that takes down the host, and it can be retried at will.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 0afff91c6f5ecef27715ea71e34dc2baacba1060 to < e3f992158d96d47aae01aa76c5e35af941d726c2 (affected · git)0afff91c6f5ecef27715ea71e34dc2baacba1060 to < 6176fa6b14c1ab439936b6d8ceda9a38dfb149dd (affected · git)0afff91c6f5ecef27715ea71e34dc2baacba1060 to < bd8ea7ddb909807b2200e4d72b38a0bc7d746298 (affected · git)0afff91c6f5ecef27715ea71e34dc2baacba1060 to < ea3bf68cfa530b4c1e5a4fe15fca5409a32b8c98 (affected · git)0afff91c6f5ecef27715ea71e34dc2baacba1060 to < 521c06e5d15386013de2196aa6917039ecf192ce (affected · git)0afff91c6f5ecef27715ea71e34dc2baacba1060 to < e6435b2cc5fdf008cdb67ad9a811a266e8ac9c1e (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 4.19 (affected)0 to < 4.19 (unaffected · semver)6.1.193 through 6.1.* (unaffected · semver)6.6.163 through 6.6.* (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
6- https://git.kernel.org/stable/c/521c06e5d15386013de2196aa6917039ecf192ce
- https://git.kernel.org/stable/c/6176fa6b14c1ab439936b6d8ceda9a38dfb149dd
- https://git.kernel.org/stable/c/bd8ea7ddb909807b2200e4d72b38a0bc7d746298
- https://git.kernel.org/stable/c/e3f992158d96d47aae01aa76c5e35af941d726c2
- https://git.kernel.org/stable/c/e6435b2cc5fdf008cdb67ad9a811a266e8ac9c1e
- https://git.kernel.org/stable/c/ea3bf68cfa530b4c1e5a4fe15fca5409a32b8c98
Provider assertions
1Linux · cna
net/smc: hold a reference on net_device returned by pnet_find_base_ndev()
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- af3d5a32279d37609fc96ac8400754f436f91d226cd540d89f9cdcf4bb15b667
- Ingested
- 01 Dec 2026, 05:47:22 UTC
- Source record
- Official CVE record