{"id":"CVE-2025-38271","summary":"net: prevent a NULL deref in rtnl_create_link()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: prevent a NULL deref in rtnl_create_link()\n\nAt the time rtnl_create_link() is running, dev-\u003enetdev_ops is NULL,\nwe must not use netdev_lock_ops() or risk a NULL deref if\nCONFIG_NET_SHAPER is defined.\n\nUse netif_set_group() instead of dev_set_group().\n\n RIP: 0010:netdev_need_ops_lock include/net/netdev_lock.h:33 [inline]\n RIP: 0010:netdev_lock_ops include/net/netdev_lock.h:41 [inline]\n RIP: 0010:dev_set_group+0xc0/0x230 net/core/dev_api.c:82\nCall Trace:\n \u003cTASK\u003e\n  rtnl_create_link+0x748/0xd10 net/core/rtnetlink.c:3674\n  rtnl_newlink_create+0x25c/0xb00 net/core/rtnetlink.c:3813\n  __rtnl_newlink net/core/rtnetlink.c:3940 [inline]\n  rtnl_newlink+0x16d6/0x1c70 net/core/rtnetlink.c:4055\n  rtnetlink_rcv_msg+0x7cf/0xb70 net/core/rtnetlink.c:6944\n  netlink_rcv_skb+0x208/0x470 net/netlink/af_netlink.c:2534\n  netlink_unicast_kernel net/netlink/af_netlink.c:1313 [inline]\n  netlink_unicast+0x75b/0x8d0 net/netlink/af_netlink.c:1339\n  netlink_sendmsg+0x805/0xb30 net/netlink/af_netlink.c:1883\n  sock_sendmsg_nosec net/socket.c:712 [inline]","modified":"2026-04-02T12:47:53.956590Z","published":"2025-07-10T07:41:53.126Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38271.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/8a29ae8428a5c26f0b4471c2057d9e9415c53109"},{"type":"WEB","url":"https://git.kernel.org/stable/c/feafc73f3e6ae73371777a037d41d2e31c929636"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38271.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38271"},{"type":"PACKAGE","url":"https://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"}}],"schema_version":"1.7.5"}