title: Kernel: netfilter: use-after-free in nft_trans_gc_catchall_sync leads to privilege escalation
description: A use-after-free flaw was found in the netfilter subsystem of the Linux kernel. If the catchall element is garbage-collected when the pipapo set is removed, the element can be deactivated twice. This can cause a use-after-free issue on an NFT_CHAIN object or NFT_OBJECT object, allowing a local unprivileged user with CAP_NET_ADMIN capability to escalate their privileges on the system.
problem types: Use After Free
affected:
{
product: kernel
vendor: n/a
defaultStatus: affected
}
{
vendor: Red Hat
product: Red Hat Enterprise Linux 9
collectionURL: https://access.redhat.com/downloads/content/package-browser/
packageName: kernel
defaultStatus: affected
versions:
version: 0:5.14.0-362.24.1.el9_3, lessThan: *, versionType: rpm, status: unaffected
cpe: [cpe:/a:redhat:enterprise_linux:9::realtime, cpe:/a:redhat:enterprise_linux:9::crb, cpe:/a:redhat:enterprise_linux:9::appstream, cpe:/o:redhat:enterprise_linux:9::baseos, cpe:/a:redhat:enterprise_linux:9::nfv]
}
{
vendor: Red Hat
product: Red Hat Enterprise Linux 9
collectionURL: https://access.redhat.com/downloads/content/package-browser/
packageName: kernel
defaultStatus: affected
versions:
version: 0:5.14.0-362.24.1.el9_3, lessThan: *, versionType: rpm, status: unaffected
cpe: [cpe:/a:redhat:enterprise_linux:9::realtime, cpe:/a:redhat:enterprise_linux:9::crb, cpe:/a:redhat:enterprise_linux:9::appstream, cpe:/o:redhat:enterprise_linux:9::baseos, cpe:/a:redhat:enterprise_linux:9::nfv]
}
{
vendor: Red Hat
product: Red Hat Enterprise Linux 9.2 Extended Update Support
collectionURL: https://access.redhat.com/downloads/content/package-browser/
packageName: kernel
defaultStatus: affected
versions:
version: 0:5.14.0-284.55.1.el9_2, lessThan: *, versionType: rpm, status: unaffected
cpe: [cpe:/a:redhat:rhel_eus:9.2::crb, cpe:/o:redhat:rhel_eus:9.2::baseos, cpe:/a:redhat:rhel_eus:9.2::appstream]
}
{
vendor: Red Hat
product: Red Hat Enterprise Linux 9.2 Extended Update Support
collectionURL: https://access.redhat.com/downloads/content/package-browser/
packageName: kernel-rt
defaultStatus: affected
versions:
version: 0:5.14.0-284.55.1.rt14.340.el9_2, lessThan: *, versionType: rpm, status: unaffected
cpe: [cpe:/a:redhat:rhel_eus:9.2::realtime, cpe:/a:redhat:rhel_eus:9.2::nfv]
}
{
vendor: Red Hat
product: Red Hat Enterprise Linux 6
collectionURL: https://access.redhat.com/downloads/content/package-browser/
packageName: kernel
defaultStatus: unaffected
cpes: cpe:/o:redhat:enterprise_linux:6
}
{
vendor: Red Hat
product: Red Hat Enterprise Linux 7
collectionURL: https://access.redhat.com/downloads/content/package-browser/
packageName: kernel
defaultStatus: unaffected
cpes: cpe:/o:redhat:enterprise_linux:7
}
{
vendor: Red Hat
product: Red Hat Enterprise Linux 7
collectionURL: https://access.redhat.com/downloads/content/package-browser/
packageName: kernel-rt
defaultStatus: unaffected
cpes: cpe:/o:redhat:enterprise_linux:7
}
{
vendor: Red Hat
product: Red Hat Enterprise Linux 8
collectionURL: https://access.redhat.com/downloads/content/package-browser/
packageName: kernel
defaultStatus: unaffected
cpes: cpe:/o:redhat:enterprise_linux:8
}
{
vendor: Red Hat
product: Red Hat Enterprise Linux 8
collectionURL: https://access.redhat.com/downloads/content/package-browser/
packageName: kernel-rt
defaultStatus: unaffected
cpes: cpe:/o:redhat:enterprise_linux:8
}
{
vendor: Red Hat
product: Red Hat Enterprise Linux 9
collectionURL: https://access.redhat.com/downloads/content/package-browser/
packageName: kernel-rt
defaultStatus: affected
cpes: cpe:/o:redhat:enterprise_linux:9
}
{
product: Fedora
vendor: Fedora
collectionURL: https://packages.fedoraproject.org/
packageName: kernel
defaultStatus: affected
}
metrics:
other: [
content: {'value': 'Important', 'namespace': 'https://access.redhat.com/security/updates/classification/'}
type: Red Hat severity rating
]
workarounds: 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.