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

Published Jul 10, 2025
·
Updated

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 CONFIGNETSHAPER 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]

Affected Software

86 affected components
Linux Foundation Linux Kernel
Linux Linux kernel>=6.15<6.15.3
ubuntu/linux-hwe-edge*
ubuntu/linux-aws-5.0*
ubuntu/linux-aws-5.3*
ubuntu/linux-azure*
ubuntu/linux-azure-5.3*
ubuntu/linux-azure-edge*
ubuntu/linux-gcp*
ubuntu/linux-gcp-5.3*
ubuntu/linux-gke-4.15*
ubuntu/linux-gke-5.4*
ubuntu/linux-gkeop-5.4*
ubuntu/linux-hwe*
ubuntu/linux-hwe-edge*
ubuntu/linux-oem*
ubuntu/linux-oracle-5.0*
ubuntu/linux-oracle-5.3*
ubuntu/linux-aws-5.11*
ubuntu/linux-aws-5.13*
ubuntu/linux-aws-5.8*
ubuntu/linux-azure-5.11*
ubuntu/linux-azure-5.13*
ubuntu/linux-azure-5.8*
ubuntu/linux-azure-fde*
ubuntu/linux-gcp-5.11*
ubuntu/linux-gcp-5.13*
ubuntu/linux-gcp-5.8*
ubuntu/linux-gke*
ubuntu/linux-gke-5.15*
ubuntu/linux-gkeop*
ubuntu/linux-gkeop-5.15*
ubuntu/linux-hwe-5.11*
ubuntu/linux-hwe-5.13*
ubuntu/linux-hwe-5.8*
ubuntu/linux-intel-5.13*
ubuntu/linux-oem-5.10*
ubuntu/linux-oem-5.13*
ubuntu/linux-oem-5.6*
ubuntu/linux-oracle-5.11*
ubuntu/linux-oracle-5.13*
ubuntu/linux-oracle-5.8*
ubuntu/linux-raspi2*
ubuntu/linux-riscv*
ubuntu/linux-riscv-5.11*
ubuntu/linux-riscv-5.8*
ubuntu/linux-allwinner-5.19*
ubuntu/linux-aws-5.19*
ubuntu/linux-aws-6.2*
ubuntu/linux-aws-6.5*
ubuntu/linux-azure-5.19*
ubuntu/linux-azure-6.2*
ubuntu/linux-azure-6.5*
ubuntu/linux-azure-fde-5.19*
ubuntu/linux-azure-fde-6.2*
ubuntu/linux-gcp-5.19*
ubuntu/linux-gcp-6.2*
ubuntu/linux-gcp-6.5*
ubuntu/linux-hwe-5.19*
ubuntu/linux-hwe-6.2*
ubuntu/linux-hwe-6.5*
ubuntu/linux-intel-iot-realtime*
ubuntu/linux-lowlatency-hwe-5.19*
ubuntu/linux-lowlatency-hwe-6.2*
ubuntu/linux-lowlatency-hwe-6.5*
ubuntu/linux-nvidia-6.2*
ubuntu/linux-nvidia-6.5*
ubuntu/linux-oem-5.17*
ubuntu/linux-oem-6.0*
ubuntu/linux-oem-6.1*
ubuntu/linux-oem-6.5*
ubuntu/linux-oracle-6.5*
ubuntu/linux-realtime*
ubuntu/linux-riscv*
ubuntu/linux-riscv-5.19*
ubuntu/linux-riscv-6.5*
ubuntu/linux-starfive-5.19*
ubuntu/linux-starfive-6.2*
ubuntu/linux-starfive-6.5*
ubuntu/linux-azure-6.11*
ubuntu/linux-gcp-6.11*
ubuntu/linux-hwe-6.11*
ubuntu/linux-lowlatency-hwe-6.11*
ubuntu/linux-raspi-realtime*
ubuntu/linux-realtime*
ubuntu/linux-riscv*

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In rtnl_create_link(), use netif_set_group() instead of dev_set_group() to avoid calling netdev_lock_ops() while dev->netdev_ops is NULL.

Event History

Jul 10, 2025
CVE Published
via MITRE·07:41 AM
Data Sourced
via MITRE·07:41 AM
Description
Data Sourced
via OSV·08:15 AM
DescriptionSeverityAffected Software
Data Sourced
via NVD·08:15 AM
Description
Nov 20, 2025
Data Sourced
via NVD·04:53 PM
RemedySeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-38271?

CVE-2025-38271 is classified as a medium severity vulnerability due to its exploitation potential leading to a NULL dereference.

2

How do I fix CVE-2025-38271?

To fix CVE-2025-38271, ensure that your Linux kernel is updated to the latest stable version where this vulnerability has been resolved.

3

Which versions of the Linux kernel are affected by CVE-2025-38271?

CVE-2025-38271 affects versions of the Linux kernel prior to the patch that addresses this specific vulnerability.

4

What components are involved in CVE-2025-38271?

CVE-2025-38271 involves the networking stack, specifically the rtnl_create_link() function in the Linux kernel.

5

What type of attack can CVE-2025-38271 lead to?

CVE-2025-38271 can potentially lead to denial of service through a NULL dereference, causing a crash in the affected system.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203