CVE-2025-38678
kernel: netfilter: nf_tables: reject duplicate device on updates
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · September 3, 2025
Updated · July 30, 2026
Description
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nf_tables: reject duplicate device on updates
A chain/flowtable update with duplicated devices in the same batch is possible. Unfortunately, netdev event path only removes the first device that is found, leaving unregistered the hook of the duplicated device.
Check if a duplicated device exists in the transaction batch, bail out with EEXIST in such case.
WARNING is hit when unregistering the hook:
[49042.221275] WARNING: CPU: 4 PID: 8425 at net/netfilter/core.c:340 nf_hook_entry_head+0xaa/0x150 [49042.221375] CPU: 4 UID: 0 PID: 8425 Comm: nft Tainted: G S 6.16.0+ #170 PREEMPT(full) [...] [49042.221382] RIP: 0010:nf_hook_entry_head+0xaa/0x150
Statement
A flaw in nf_tables allowed a chain/flowtable update batch to include the same netdevice more than once. This left the hook lists in an inconsistent state (one duplicate not properly unregistered), triggering kernel WARNs and risking a later crash during hook teardown. Exploitation requires local CAP_NET_ADMIN (e.g., via nft in the host or a privileged netns). High privileges are required because only processes with administrative capabilities (e.g., CAP_NET_ADMIN) can create or update nftables chains or flowtables, so unprivileged users cannot directly trigger this condition.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
In order to trigger the issue, it requires the ability to create user/net namespaces.
On non-containerized deployments of Red Hat Enterprise Linux 8, you can disable user namespaces by setting user.max_user_namespaces to 0:
echo "user.max_user_namespaces=0" > /etc/sysctl.d/userns.conf
sysctl -p /etc/sysctl.d/userns.conf
On containerized deployments, such as Red Hat OpenShift Container Platform, do not use this mitigation as the functionality is needed to be enabled.
CVSS / CWE
CVSS 3.1 · 4.4CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H
CWE-20 · Improper Input Validation