CVE-2025-38271

Source
https://cve.org/CVERecord?id=CVE-2025-38271
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38271.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2025-38271
Downstream
Published
2025-07-10T07:41:53.126Z
Modified
2026-04-02T12:47:53.956590Z
Summary
net: prevent a NULL deref in rtnl_create_link()
Details

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

net: prevent a NULL deref in rtnlcreatelink()

At the time rtnlcreatelink() is running, dev->netdevops is NULL, we must not use netdevlockops() or risk a NULL deref if CONFIGNET_SHAPER is defined.

Use netifsetgroup() instead of devsetgroup().

RIP: 0010:netdevneedopslock include/net/netdevlock.h:33 [inline] RIP: 0010:netdevlockops include/net/netdevlock.h:41 [inline] RIP: 0010:devsetgroup+0xc0/0x230 net/core/devapi.c:82 Call Trace: <TASK> rtnlcreatelink+0x748/0xd10 net/core/rtnetlink.c:3674 rtnlnewlinkcreate+0x25c/0xb00 net/core/rtnetlink.c:3813 __rtnlnewlink net/core/rtnetlink.c:3940 [inline] rtnlnewlink+0x16d6/0x1c70 net/core/rtnetlink.c:4055 rtnetlinkrcvmsg+0x7cf/0xb70 net/core/rtnetlink.c:6944 netlinkrcvskb+0x208/0x470 net/netlink/afnetlink.c:2534 netlinkunicastkernel net/netlink/afnetlink.c:1313 [inline] netlinkunicast+0x75b/0x8d0 net/netlink/afnetlink.c:1339 netlinksendmsg+0x805/0xb30 net/netlink/afnetlink.c:1883 socksendmsgnosec net/socket.c:712 [inline]

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38271.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
7e4d784f5810bba76c4593791028e13cce4af547
Fixed
8a29ae8428a5c26f0b4471c2057d9e9415c53109
Fixed
feafc73f3e6ae73371777a037d41d2e31c929636

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38271.json"