CVE-2023-5197
kernel: netfilter: nf_tables: use-after-free due to addition and removal of rules from chain bindings within the same transaction
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · September 27, 2023
Updated · August 7, 2026
Description
A use-after-free vulnerability was found in net/netfilter/nf_tables_api.c in the netfilter component in the Linux Kernel. This flaw can be exploited to achieve local privilege escalation. Adding and removing rules from chain bindings within the same transaction leads to a use-after-free issue.
Statement
Exploiting this flaw will require CAP_NET_ADMIN access privilege in any user or network namespace.
Also, on non-containerized deployments of Red Hat Enterprise Linux, you can disable user namespaces by setting the 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 needs to be enabled.
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
Mitigation for this issue is to skip loading the affected module "netfilter" onto the system until we have a fix available. This can be done by a blacklist mechanism and will ensure the driver is not loaded at the boot time.
How do I blacklist a kernel module to prevent it from loading automatically?
https://access.redhat.com/solutions/41278
CVSS / CWE
CVSS 3.1 · 6.6CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H
CWE-416 · Use After Free