Junglewise Threat Intelligence

CVE-2025-21865: Linux kernel list corruption in GTP network namespace cleanup

CVE-2025-21865 · Severity: medium · CVSS 5.5 · Published 2025-03-12

Technologies: Linux Kernel. Vendors: Linux.

Executive brief

A vulnerability in the Linux kernel's GPRS Tunneling Protocol (GTP) implementation could allow a local user to cause a system crash. The issue occurs during the cleanup of network namespaces, where certain internal data structures are processed incorrectly. This leads to a kernel panic, resulting in a denial-of-service condition that disrupts all operations on the affected system.

Technical details

A double-free or double-unlinking vulnerability exists in the GTP (GPRS Tunneling Protocol) driver within the Linux kernel. The root cause is in gtp_net_exit_batch_rtnl(), where a loop iterating over network devices could trigger the dellink() function twice for the same device if that device's UDP socket resides in a different namespace than the device itself. This results in a list_del() corruption splat and a kernel BUG at lib/list_debug.c:58 when CONFIG_DEBUG_LIST is enabled, or potential memory corruption otherwise. The fix removes the redundant for_each_netdev() loop and delegates device destruction to the default batch exit handler.

Affected products

  • Linux Linux kernel 6.12.13 and earlier

Timeline

  • 2025-02-17: patched: Initial patch submitted to kernel.org
  • 2025-03-12: disclosed: CVE published

References

Related threats