CVE Catalog

CVE-2025-21858

High
Published: Translated: NVD NIST

Summary

A use-after-free vulnerability has been identified in the Linux kernel in the geneve_find_dev() function. The issue arises when the geneve_dev.next structure is linked to a backend UDP socket that has already been freed.

Risk Assessment

This vulnerability could lead to unpredictable system behavior, including potential crashes or security breaches when a new geneve dev instance is created in the same network namespace.

Recommendation

It is recommended to update the Linux kernel to the latest version where this vulnerability has been fixed to minimize the risk of issues related to the use of freed resources.

Other vulnerabilities in Linux kernel

See all
Original NVD description (English source)

In the Linux kernel, the following vulnerability has been resolved: geneve: Fix use-after-free in geneve_find_dev(). syzkaller reported a use-after-free in geneve_find_dev() [0] without repro. geneve_configure() links struct geneve_dev.next to net_generic(net, geneve_net_id)->geneve_list. The net here could differ from dev_net(dev) if IFLA_NET_NS_PID, IFLA_NET_NS_FD, or IFLA_TARGET_NETNSID is set. When dev_net(dev) is dismantled, geneve_exit_batch_rtnl() finally calls unregister_netdevice_queue() for each dev in the netns, and later the dev is freed. However, its geneve_dev.next is still linked to the backend UDP socket netns. Then, use-after-free will occur when another geneve dev is created in the netns. Let's call geneve_dellink() instead in geneve_destroy_tunnels(). [0]: BUG: KASAN: slab-use-after-free in geneve_find_dev drivers/net/geneve.c:1295 [inline] BUG: KASAN: slab-use-after-free in geneve_configure+0x234/0x858 drivers/net/geneve.c:1343 Read of size 2 at addr ffff00

Vulnerability data from NVD (NIST) · CISA KEV · EPSS