CVE-2023-31248: (Pwn2Own) Linux Kernel nftables Use-After-Free Local Privilege Escalation Vulnerability

Published Jul 5, 2023
·
Updated

Linux Kernel nftables Use-After-Free Local Privilege Escalation Vulnerability; nftchainlookupbyid() failed to check whether a chain was active and CAPNETADMIN is in any user or network namespace

Other sources

This vulnerability allows local attackers to escalate privileges on affected installations of Linux Kernel. An attacker must first obtain the ability to execute low-privileged code on the target system in order to exploit this vulnerability. The specific flaw exists within the handling of nftchains. The issue results from the lack of validating the status of a chain while processing lookup on the chain. An attacker can leverage this vulnerability to escalate privileges and execute arbitrary code in the context of the kernel.

— ZDI

Affected Software

106 affected componentsFixes available
Linux Linux kernel>=5.9<5.10.188
Linux Linux kernel>=5.11<5.15.121
Linux Linux kernel>=5.16<6.1.39
Linux Linux kernel>=6.2<6.4.4
Fedoraproject Fedora=37
Fedoraproject Fedora=38
Debian Debian Linux=11.0
Canonical Ubuntu Linux=14.04
Canonical Ubuntu Linux=16.04
Canonical Ubuntu Linux=18.04
Canonical Ubuntu Linux=20.04
Canonical Ubuntu Linux=22.04
Linux Linux kernel=5.9.0-rc1
Linux Kernel
ubuntu/linux-hwe-edge*
ubuntu/linux-aws-5.0*
ubuntu/linux-aws-5.3*
ubuntu/linux-azure*
ubuntu/linux-azure-5.3*
ubuntu/linux-azure-edge*
ubuntu/linux-gcp*
ubuntu/linux-gcp-5.3*
ubuntu/linux-gke-4.15*
ubuntu/linux-gke-5.4*
ubuntu/linux-gkeop-5.4*
ubuntu/linux-hwe*
ubuntu/linux-oem*
ubuntu/linux-oracle-5.0*
ubuntu/linux-oracle-5.3*
ubuntu/linux-aws-5.15<5.15.0-1040.45~20.04.1
5.15.0-1040.45~20.04.1
ubuntu/linux-azure-5.15<5.15.0-1042.49~20.04.1
5.15.0-1042.49~20.04.1
ubuntu/linux-gcp-5.15<5.15.0-1038.46~20.04.1
5.15.0-1038.46~20.04.1
ubuntu/linux-gke-5.15<5.15.0-1038.43~20.04.1
5.15.0-1038.43~20.04.1
ubuntu/linux-gkeop-5.15<5.15.0-1024.29~20.04.1
5.15.0-1024.29~20.04.1
ubuntu/linux-hwe-5.15<5.15.0-78.85~20.04.1
5.15.0-78.85~20.04.1
ubuntu/linux-intel-iotg-5.15<5.15.0-1036.41~20.04.1
5.15.0-1036.41~20.04.1
ubuntu/linux-lowlatency-hwe-5.15<5.15.0-78.85~20.04.1
5.15.0-78.85~20.04.1
ubuntu/linux-nvidia-tegra-5.15<5.15.0-1016.16~20.04.1
5.15.0-1016.16~20.04.1
ubuntu/linux-oracle-5.15<5.15.0-1039.45~20.04.1
5.15.0-1039.45~20.04.1
ubuntu/linux-riscv-5.15<5.15.0-1037.41~20.04.2
5.15.0-1037.41~20.04.2
ubuntu/linux-aws-5.11*
ubuntu/linux-aws-5.13*
ubuntu/linux-aws-5.8*
ubuntu/linux-azure-5.11*
ubuntu/linux-azure-5.13*
ubuntu/linux-azure-5.8*
ubuntu/linux-gcp-5.11*
ubuntu/linux-gcp-5.13*
ubuntu/linux-gcp-5.8*
ubuntu/linux-hwe-5.11*
ubuntu/linux-hwe-5.13*
ubuntu/linux-hwe-5.8*
ubuntu/linux-intel-5.13*
ubuntu/linux-oem-5.10*
ubuntu/linux-oem-5.13*
ubuntu/linux-oem-5.6*
ubuntu/linux-oracle-5.11*
ubuntu/linux-oracle-5.13*
ubuntu/linux-oracle-5.8*
ubuntu/linux-raspi2*
ubuntu/linux-riscv*
ubuntu/linux-riscv-5.11*
ubuntu/linux-riscv-5.8*
ubuntu/linux<5.15.0-78.85
5.15.0-78.85
ubuntu/linux-aws<5.15.0-1040.45
5.15.0-1040.45
ubuntu/linux-aws-5.19<5.19.0-1029.30~22.04.1
5.19.0-1029.30~22.04.1
ubuntu/linux-aws-6.2*
ubuntu/linux-azure<5.15.0-1042.49
5.15.0-1042.49
ubuntu/linux-azure-5.19*
ubuntu/linux-azure-6.2*
ubuntu/linux-azure-fde<5.15.0-1042.49.1
5.15.0-1042.49.1
ubuntu/linux-azure-fde-5.19*
ubuntu/linux-azure-fde-6.2*
ubuntu/linux-gcp<5.15.0-1038.46
5.15.0-1038.46
ubuntu/linux-gcp-5.19<5.19.0-1030.32~22.04.1
5.19.0-1030.32~22.04.1
ubuntu/linux-gcp-6.2*
ubuntu/linux-gke<5.15.0-1038.43
5.15.0-1038.43
ubuntu/linux-gkeop<5.15.0-1024.29
5.15.0-1024.29
ubuntu/linux-hwe-5.19<5.19.0-50.50
5.19.0-50.50
ubuntu/linux-hwe-6.2<6.2.0-26.26~22.04.1
6.2.0-26.26~22.04.1
ubuntu/linux-ibm<5.15.0-1034.37
5.15.0-1034.37
ubuntu/linux-intel-iotg<5.15.0-1036.41
5.15.0-1036.41
ubuntu/linux-kvm<5.15.0-1038.43
5.15.0-1038.43
ubuntu/linux-lowlatency<5.15.0-78.85
5.15.0-78.85
ubuntu/linux-lowlatency-hwe-5.19*
ubuntu/linux-lowlatency-hwe-6.2*
ubuntu/linux-nvidia<5.15.0-1029.29
5.15.0-1029.29
ubuntu/linux-nvidia-6.2*
ubuntu/linux-nvidia-tegra<5.15.0-1016.16
5.15.0-1016.16
ubuntu/linux-nvidia-tegra-igx<5.15.0-1002.2
5.15.0-1002.2
ubuntu/linux-oem-5.17<5.17.0-1035.36
5.17.0-1035.36
ubuntu/linux-oem-6.0<6.0.0-1020.20
6.0.0-1020.20
ubuntu/linux-oem-6.1<6.1.0-1019.19
6.1.0-1019.19
ubuntu/linux-oracle<5.15.0-1039.45
5.15.0-1039.45
ubuntu/linux-raspi<5.15.0-1034.37
5.15.0-1034.37
ubuntu/linux-realtime*
ubuntu/linux-riscv*
ubuntu/linux-riscv-5.19*
ubuntu/linux-xilinx-zynqmp<5.15.0-1025.29
5.15.0-1025.29
ubuntu/linux-bluefield<5.15.0-1021.23
5.15.0-1021.23
ubuntu/linux-intel-iot-realtime<5.15.0-1035.37
5.15.0-1035.37
ubuntu/linux-realtime<5.15.0-1042.47
5.15.0-1042.47
ubuntu/linux-fips*
ubuntu/linux-raspi-realtime*
debian/linux
5.10.179-26.1.38-16.4.4-1
debian/linux-5.10
5.10.179-3~deb10u1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade ubuntu/linux-aws-5.15 to a version that resolves this vulnerability.

    Fixed in 5.15.0-1040.45~20.04.1
  2. Upgrade

    Upgrade ubuntu/linux-azure-5.15 to a version that resolves this vulnerability.

    Fixed in 5.15.0-1042.49~20.04.1
  3. Upgrade

    Upgrade ubuntu/linux-gcp-5.15 to a version that resolves this vulnerability.

    Fixed in 5.15.0-1038.46~20.04.1
  4. Upgrade

    Upgrade ubuntu/linux-gke-5.15 to a version that resolves this vulnerability.

    Fixed in 5.15.0-1038.43~20.04.1
  5. Upgrade

    Upgrade ubuntu/linux-gkeop-5.15 to a version that resolves this vulnerability.

    Fixed in 5.15.0-1024.29~20.04.1
  6. Upgrade

    Upgrade ubuntu/linux-hwe-5.15 to a version that resolves this vulnerability.

    Fixed in 5.15.0-78.85~20.04.1
  7. Upgrade

    Upgrade ubuntu/linux-intel-iotg-5.15 to a version that resolves this vulnerability.

    Fixed in 5.15.0-1036.41~20.04.1
  8. Upgrade

    Upgrade ubuntu/linux-lowlatency-hwe-5.15 to a version that resolves this vulnerability.

    Fixed in 5.15.0-78.85~20.04.1
  9. Upgrade

    Upgrade ubuntu/linux-nvidia-tegra-5.15 to a version that resolves this vulnerability.

    Fixed in 5.15.0-1016.16~20.04.1
  10. Upgrade

    Upgrade ubuntu/linux-oracle-5.15 to a version that resolves this vulnerability.

    Fixed in 5.15.0-1039.45~20.04.1
  11. Upgrade

    Upgrade ubuntu/linux-riscv-5.15 to a version that resolves this vulnerability.

    Fixed in 5.15.0-1037.41~20.04.2
  12. Upgrade

    Upgrade ubuntu/linux to a version that resolves this vulnerability.

    Fixed in 5.15.0-78.85
  13. Upgrade

    Upgrade ubuntu/linux-aws to a version that resolves this vulnerability.

    Fixed in 5.15.0-1040.45
  14. Upgrade

    Upgrade ubuntu/linux-aws-5.19 to a version that resolves this vulnerability.

    Fixed in 5.19.0-1029.30~22.04.1
  15. Upgrade

    Upgrade ubuntu/linux-azure to a version that resolves this vulnerability.

    Fixed in 5.15.0-1042.49
  16. Upgrade

    Upgrade ubuntu/linux-azure-fde to a version that resolves this vulnerability.

    Fixed in 5.15.0-1042.49.1
  17. Upgrade

    Upgrade ubuntu/linux-gcp to a version that resolves this vulnerability.

    Fixed in 5.15.0-1038.46
  18. Upgrade

    Upgrade ubuntu/linux-gcp-5.19 to a version that resolves this vulnerability.

    Fixed in 5.19.0-1030.32~22.04.1
  19. Upgrade

    Upgrade ubuntu/linux-gke to a version that resolves this vulnerability.

    Fixed in 5.15.0-1038.43
  20. Upgrade

    Upgrade ubuntu/linux-gkeop to a version that resolves this vulnerability.

    Fixed in 5.15.0-1024.29
  21. Upgrade

    Upgrade ubuntu/linux-hwe-5.19 to a version that resolves this vulnerability.

    Fixed in 5.19.0-50.50
  22. Upgrade

    Upgrade ubuntu/linux-hwe-6.2 to a version that resolves this vulnerability.

    Fixed in 6.2.0-26.26~22.04.1
  23. Upgrade

    Upgrade ubuntu/linux-ibm to a version that resolves this vulnerability.

    Fixed in 5.15.0-1034.37
  24. Upgrade

    Upgrade ubuntu/linux-intel-iotg to a version that resolves this vulnerability.

    Fixed in 5.15.0-1036.41
  25. Upgrade

    Upgrade ubuntu/linux-kvm to a version that resolves this vulnerability.

    Fixed in 5.15.0-1038.43
  26. Upgrade

    Upgrade ubuntu/linux-lowlatency to a version that resolves this vulnerability.

    Fixed in 5.15.0-78.85
  27. Upgrade

    Upgrade ubuntu/linux-nvidia to a version that resolves this vulnerability.

    Fixed in 5.15.0-1029.29
  28. Upgrade

    Upgrade ubuntu/linux-nvidia-tegra to a version that resolves this vulnerability.

    Fixed in 5.15.0-1016.16
  29. Upgrade

    Upgrade ubuntu/linux-nvidia-tegra-igx to a version that resolves this vulnerability.

    Fixed in 5.15.0-1002.2
  30. Upgrade

    Upgrade ubuntu/linux-oem-5.17 to a version that resolves this vulnerability.

    Fixed in 5.17.0-1035.36
  31. Upgrade

    Upgrade ubuntu/linux-oem-6.0 to a version that resolves this vulnerability.

    Fixed in 6.0.0-1020.20
  32. Upgrade

    Upgrade ubuntu/linux-oem-6.1 to a version that resolves this vulnerability.

    Fixed in 6.1.0-1019.19
  33. Upgrade

    Upgrade ubuntu/linux-oracle to a version that resolves this vulnerability.

    Fixed in 5.15.0-1039.45
  34. Upgrade

    Upgrade ubuntu/linux-raspi to a version that resolves this vulnerability.

    Fixed in 5.15.0-1034.37
  35. Upgrade

    Upgrade ubuntu/linux-xilinx-zynqmp to a version that resolves this vulnerability.

    Fixed in 5.15.0-1025.29
  36. Upgrade

    Upgrade ubuntu/linux-bluefield to a version that resolves this vulnerability.

    Fixed in 5.15.0-1021.23
  37. Upgrade

    Upgrade ubuntu/linux-intel-iot-realtime to a version that resolves this vulnerability.

    Fixed in 5.15.0-1035.37
  38. Upgrade

    Upgrade ubuntu/linux-realtime to a version that resolves this vulnerability.

    Fixed in 5.15.0-1042.47
  39. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 5.10.179-2Fixed in 6.1.38-1Fixed in 6.4.4-1
  40. Upgrade

    Upgrade debian/linux-5.10 to a version that resolves this vulnerability.

    Fixed in 5.10.179-3~deb10u1
  41. Configuration

    Disable unprivileged user namespaces by setting kernel.unprivileged_userns_clone=0; apply temporarily with `sudo sysctl -w kernel.unprivileged_userns_clone=0` and persist across reboots by writing `kernel.unprivileged_userns_clone=0` to `/etc/sysctl.d/99-disable-unpriv-userns.conf`.

    Linux kernel kernel.unprivileged_userns_clone = 0

Event History

Jul 5, 2023
CVE Published
12:00 AM
Data Sourced
12:00 AM
RemedyDescriptionSeverityAffected Software
Data Sourced
via OSV·12:00 AM
DescriptionSeverityAffected Software
Updated
12:00 AM
Affected Software
Updated
via Ubuntu·12:00 AM
RemedyDescriptionAffected Software
Updated
via Ubuntu·12:00 AM
Description
CVE Published
via MITRE·06:33 PM
Data Sourced
via MITRE·06:33 PM
DescriptionSeverityWeakness
Data Sourced
07:15 PM
Weakness
Jul 6, 2023
Advisory Published
12:00 AM
Data Sourced
via ZDI·12:00 AM
DescriptionSeverityAffected Software
Updated
via ZDI·12:00 AM
Affected Software
Oct 10, 2023
Data Sourced
via Red Hat·07:32 PM
DescriptionSeverityAffected Software
Dec 12, 2023
Updated
02:39 PM
Affected Software
Feb 1, 2024
Data Sourced
via NVD·05:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Updated
via NVD·05:15 PM
Affected Software
Nov 21, 2024
Updated
via NVD·08:01 AM
RemedyAffected Software
Jun 17, 2026
Updated
via NVD·05:56 AM
Affected Software
Oct 22, 2026
Updated
via Ubuntu·12:00 AM
Description
Nov 12, 2026
Updated
via OSV·05:23 PM
Affected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2023-31248?

CVE-2023-31248 is considered a high severity local privilege escalation vulnerability.

2

How do I fix CVE-2023-31248?

To mitigate CVE-2023-31248, update to a patched version of the Linux kernel, such as 5.10.223-1 or 6.1.123-1.

3

Which versions of the Linux kernel are affected by CVE-2023-31248?

CVE-2023-31248 impacts Linux kernel versions between 5.9 and 6.4.4, including specific distributions like Fedora and Ubuntu.

4

Can CVE-2023-31248 be exploited remotely?

CVE-2023-31248 requires local access for exploitation, meaning an attacker must have local user capabilities.

5

What does the CVE-2023-31248 vulnerability involve?

CVE-2023-31248 involves a use-after-free condition in the nftables subsystem of the Linux kernel that could lead to privilege escalation.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203