# CVE-2025-38271: net: prevent a NULL deref in rtnl_create_link()

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.17%, higher than 5% of CVEs (2026-12-01)
- Published: 2025-07-10T07:41:53.126Z
- Modified: 2026-06-17T09:16:31.407Z
- Weaknesses: CWE-476
- Assigned by: Linux

## Description

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

net: prevent a NULL deref in rtnl_create_link()

At the time rtnl_create_link() is running, dev->netdev_ops is NULL,
we must not use netdev_lock_ops() or risk a NULL deref if
CONFIG_NET_SHAPER is defined.

Use netif_set_group() instead of dev_set_group().

 RIP: 0010:netdev_need_ops_lock include/net/netdev_lock.h:33 [inline]
 RIP: 0010:netdev_lock_ops include/net/netdev_lock.h:41 [inline]
 RIP: 0010:dev_set_group+0xc0/0x230 net/core/dev_api.c:82
Call Trace:
 <TASK>
  rtnl_create_link+0x748/0xd10 net/core/rtnetlink.c:3674
  rtnl_newlink_create+0x25c/0xb00 net/core/rtnetlink.c:3813
  __rtnl_newlink net/core/rtnetlink.c:3940 [inline]
  rtnl_newlink+0x16d6/0x1c70 net/core/rtnetlink.c:4055
  rtnetlink_rcv_msg+0x7cf/0xb70 net/core/rtnetlink.c:6944
  netlink_rcv_skb+0x208/0x470 net/netlink/af_netlink.c:2534
  netlink_unicast_kernel net/netlink/af_netlink.c:1313 [inline]
  netlink_unicast+0x75b/0x8d0 net/netlink/af_netlink.c:1339
  netlink_sendmsg+0x805/0xb30 net/netlink/af_netlink.c:1883
  sock_sendmsg_nosec net/socket.c:712 [inline]

(As written by CVE List.)

## Affected

- Linux Linux: from 7e4d784f5810bba76c4593791028e13cce4af547 before 8a29ae8428a5c26f0b4471c2057d9e9415c53109; from 7e4d784f5810bba76c4593791028e13cce4af547 before feafc73f3e6ae73371777a037d41d2e31c929636; 6.15 (not affected: before 6.15; from 6.15.3 up to 6.15.*; from 6.16 up to *)
- linux linux_kernel: from 6.15 before 6.15.3

## References

- <https://git.kernel.org/stable/c/8a29ae8428a5c26f0b4471c2057d9e9415c53109> (patch)
- <https://git.kernel.org/stable/c/feafc73f3e6ae73371777a037d41d2e31c929636> (patch)

## Sources

- CVE List: [CVE-2025-38271](https://www.cve.org/CVERecord?id=CVE-2025-38271), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2025-38271](https://nvd.nist.gov/vuln/detail/CVE-2025-38271), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-38271 · Whole record: https://cve.day/CVE-2025-38271.json · Rebuilt by cve.day 2026-11-25T22:59:01.048Z
