CVE-2023-3773: Kernel: xfrm: out-of-bounds read of xfrma_mtimer_thresh nlattr

Published Jun 30, 2023
·
Updated

========== 2. OOB read of XFRMAMTIMERTHRESH nlattr ==========

[require privilege]: CAPNETADMIN

[effects]: information leak

[crash stack]: Interesting enough as this OOB read will not be detected by KASan (perhaps why this bug is not detected by the fuzzer), see the details below.

[buggy commit]: 4e484b3e969b ("xfrm: rate limit SA mapping change message to user space")

[root cause]: The mentioned commit above added one additional attribute named XFRMAMTIMERTHRESH and described its type at compatpolicy (net/xfrm/xfrmcompat.c). However, the author forgot to also describe it at xfrmapolicy (net/xfrm/xfrmuser.c). Hence, this suppose NLAU32 (4 bytes) value can be faked as empty (0 bytes) by a malicious user, which lead to 4 bytes overflow read when parsing nlattrs.

The overall buffer skb is created at netlinksendmsg(...). According to the code, it will add another 0x140 skbsharedinfo data behind the skb data so this OOB will not be detected by KASan.

To exploit this (see PoC part), one malicious user can spray the SLUB objects and then leverage this 4 bytes OOB read to leak the heap data into x->mappingmaxage (see xfrmupdateaeparams(...)), and leak it to userspace via copytouserstateextra(...).

[PoC code]: see attachment poc2.c. I have tested it in latest Linux with QEMU. (no effects in ubuntu thanks to CONFIGINITONALLOCDEFAULTON)

[suggest fix]: Just add the type description like below

@@ -3035,6 +3035,7 @@ const struct nlapolicy xfrmapolicy[XFRMAMAX+1] = { [XFRMASETMARK] = { .type = NLAU32 }, [XFRMASETMARKMASK] = { .type = NLAU32 }, [XFRMAIFID] = { .type = NLAU32 }, + [XFRMAMTIMERTHRESH] = { .type = NLAU32 }, };

Other sources

A flaw was found in the Linux kernel’s IP framework for transforming packets (XFRM subsystem). This issue may allow a malicious user with CAPNETADMIN privileges to cause a 4 byte out-of-bounds read of XFRMAMTIMERTHRESH when parsing netlink attributes, leading to potential leakage of sensitive heap data to userspace.

— Ubuntu

Kernel: xfrm: out-of-bounds read of xfrmamtimerthresh nlattr

— Microsoft

Affected Software

109 affected componentsFixes available
redhat Enterprise Linux=8.0
redhat Enterprise Linux=9.0
Fedoraproject Fedora
Linux Linux kernel
Microsoft cbl2 hyperv-daemons 5.15.158.1-1
Microsoft cbl2 hyperv-daemons 5.15.153.1-1
Microsoft cbl2 hyperv-daemons 5.15.153.1-1
Debian Debian Linux=10.0
Debian Debian Linux=12.0
debian/linux<6.1.52-1
6.1.52-1
debian/linux<6.4.13-1
6.4.13-1
debian/linux<6.4.13-1
6.4.13-1
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-1051.56~20.04.1
5.15.0-1051.56~20.04.1
ubuntu/linux-azure-5.15<5.15.0-1053.61~20.04.1
5.15.0-1053.61~20.04.1
ubuntu/linux-gcp-5.15<5.15.0-1048.56~20.04.1
5.15.0-1048.56~20.04.1
ubuntu/linux-gkeop-5.15<5.15.0-1034.40~20.04.1
5.15.0-1034.40~20.04.1
ubuntu/linux-hwe-5.15<5.15.0-91.101~20.04.1
5.15.0-91.101~20.04.1
ubuntu/linux-ibm-5.15<5.15.0-1044.47~20.04.1
5.15.0-1044.47~20.04.1
ubuntu/linux-intel-iotg-5.15<5.15.0-1046.52~20.04.1
5.15.0-1046.52~20.04.1
ubuntu/linux-lowlatency-hwe-5.15<5.15.0-91.101~20.04.1
5.15.0-91.101~20.04.1
ubuntu/linux-nvidia-tegra-5.15<5.15.0-1020.20~20.04.1
5.15.0-1020.20~20.04.1
ubuntu/linux-oracle-5.15<5.15.0-1049.55~20.04.1
5.15.0-1049.55~20.04.1
ubuntu/linux-riscv-5.15<5.15.0-1047.51~20.04.1
5.15.0-1047.51~20.04.1
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-gke*
ubuntu/linux-gke-5.15*
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-91.101
5.15.0-91.101
ubuntu/linux-allwinner-5.19*
ubuntu/linux-aws<5.15.0-1051.56
5.15.0-1051.56
ubuntu/linux-aws-5.19*
ubuntu/linux-aws-6.2<6.2.0-1017.17~22.04.1
6.2.0-1017.17~22.04.1
ubuntu/linux-azure<5.15.0-1053.61
5.15.0-1053.61
ubuntu/linux-azure-5.19*
ubuntu/linux-azure-6.2<6.2.0-1018.18~22.04.1
6.2.0-1018.18~22.04.1
ubuntu/linux-azure-fde<5.15.0-1053.61.1
5.15.0-1053.61.1
ubuntu/linux-azure-fde-5.19*
ubuntu/linux-azure-fde-6.2<6.2.0-1018.18~22.04.1.1
6.2.0-1018.18~22.04.1.1
ubuntu/linux-gcp<5.15.0-1048.56
5.15.0-1048.56
ubuntu/linux-gcp-5.19*
ubuntu/linux-gcp-6.2*
ubuntu/linux-gke<5.15.0-1048.53
5.15.0-1048.53
ubuntu/linux-gkeop<5.15.0-1034.40
5.15.0-1034.40
ubuntu/linux-hwe-5.19*
ubuntu/linux-hwe-6.2<6.2.0-39.40~22.04.1
6.2.0-39.40~22.04.1
ubuntu/linux-ibm<5.15.0-1044.47
5.15.0-1044.47
ubuntu/linux-intel-iotg<5.15.0-1046.52
5.15.0-1046.52
ubuntu/linux-kvm<5.15.0-1048.53
5.15.0-1048.53
ubuntu/linux-lowlatency<5.15.0-91.101
5.15.0-91.101
ubuntu/linux-lowlatency-hwe-5.19*
ubuntu/linux-lowlatency-hwe-6.2<6.2.0-1018.18~22.04.1
6.2.0-1018.18~22.04.1
ubuntu/linux-nvidia<5.15.0-1042.42
5.15.0-1042.42
ubuntu/linux-nvidia-6.2<6.2.0-1013.13
6.2.0-1013.13
ubuntu/linux-nvidia-tegra<5.15.0-1020.20
5.15.0-1020.20
ubuntu/linux-nvidia-tegra-igx<5.15.0-1007.7
5.15.0-1007.7
ubuntu/linux-oem-5.17*
ubuntu/linux-oem-6.0*
ubuntu/linux-oem-6.1<6.1.0-1023.23
6.1.0-1023.23
ubuntu/linux-oracle<5.15.0-1049.55
5.15.0-1049.55
ubuntu/linux-raspi<5.15.0-1044.47
5.15.0-1044.47
ubuntu/linux-realtime*
ubuntu/linux-riscv*
ubuntu/linux-riscv-5.19*
ubuntu/linux-starfive-5.19*
ubuntu/linux-starfive-6.2*
ubuntu/linux-xilinx-zynqmp<5.15.0-1027.31
5.15.0-1027.31
ubuntu/linux-bluefield<5.15.0-1033.35
5.15.0-1033.35
ubuntu/linux-intel-iot-realtime<5.15.0-1044.46
5.15.0-1044.46
ubuntu/linux-realtime<5.15.0-1052.58
5.15.0-1052.58
ubuntu/linux-fips*
ubuntu/linux-raspi-realtime*
debian/linux
5.10.197-16.1.52-16.4.13-1
debian/linux-5.10
5.10.197-1~deb10u1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

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

    Fixed in 6.1.52-1
  2. Upgrade

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

    Fixed in 6.4.13-1
  3. Upgrade

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

    Fixed in 5.15.0-1051.56~20.04.1
  4. Upgrade

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

    Fixed in 5.15.0-1053.61~20.04.1
  5. Upgrade

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

    Fixed in 5.15.0-1048.56~20.04.1
  6. Upgrade

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

    Fixed in 5.15.0-1034.40~20.04.1
  7. Upgrade

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

    Fixed in 5.15.0-91.101~20.04.1
  8. Upgrade

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

    Fixed in 5.15.0-1044.47~20.04.1
  9. Upgrade

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

    Fixed in 5.15.0-1046.52~20.04.1
  10. Upgrade

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

    Fixed in 5.15.0-91.101~20.04.1
  11. Upgrade

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

    Fixed in 5.15.0-1020.20~20.04.1
  12. Upgrade

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

    Fixed in 5.15.0-1049.55~20.04.1
  13. Upgrade

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

    Fixed in 5.15.0-1047.51~20.04.1
  14. Upgrade

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

    Fixed in 5.15.0-91.101
  15. Upgrade

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

    Fixed in 5.15.0-1051.56
  16. Upgrade

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

    Fixed in 6.2.0-1017.17~22.04.1
  17. Upgrade

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

    Fixed in 5.15.0-1053.61
  18. Upgrade

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

    Fixed in 6.2.0-1018.18~22.04.1
  19. Upgrade

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

    Fixed in 5.15.0-1053.61.1
  20. Upgrade

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

    Fixed in 6.2.0-1018.18~22.04.1.1
  21. Upgrade

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

    Fixed in 5.15.0-1048.56
  22. Upgrade

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

    Fixed in 5.15.0-1048.53
  23. Upgrade

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

    Fixed in 5.15.0-1034.40
  24. Upgrade

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

    Fixed in 6.2.0-39.40~22.04.1
  25. Upgrade

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

    Fixed in 5.15.0-1044.47
  26. Upgrade

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

    Fixed in 5.15.0-1046.52
  27. Upgrade

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

    Fixed in 5.15.0-1048.53
  28. Upgrade

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

    Fixed in 5.15.0-91.101
  29. Upgrade

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

    Fixed in 6.2.0-1018.18~22.04.1
  30. Upgrade

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

    Fixed in 5.15.0-1042.42
  31. Upgrade

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

    Fixed in 6.2.0-1013.13
  32. Upgrade

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

    Fixed in 5.15.0-1020.20
  33. Upgrade

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

    Fixed in 5.15.0-1007.7
  34. Upgrade

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

    Fixed in 6.1.0-1023.23
  35. Upgrade

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

    Fixed in 5.15.0-1049.55
  36. Upgrade

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

    Fixed in 5.15.0-1044.47
  37. Upgrade

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

    Fixed in 5.15.0-1027.31
  38. Upgrade

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

    Fixed in 5.15.0-1033.35
  39. Upgrade

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

    Fixed in 5.15.0-1044.46
  40. Upgrade

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

    Fixed in 5.15.0-1052.58
  41. Upgrade

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

    Fixed in 5.10.197-1Fixed in 6.1.52-1Fixed in 6.4.13-1
  42. Upgrade

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

    Fixed in 5.10.197-1~deb10u1
  43. Configuration

    Add the XFRMA_MTIMER_THRESH policy entry to xfrma_policy in net/xfrm/xfrm_user.c with type NLA_U32.

    Linux kernel XFRM subsystem xfrma_policy[XFRMA_MTIMER_THRESH] = NLA_U32

Event History

Jun 30, 2023
Data Sourced
04:47 PM
DescriptionSeverityAffected Software
Jul 25, 2023
CVE Published
12:00 AM
Data Sourced
12:00 AM
Remedy
Data Sourced
via Ubuntu·12:00 AM
RemedyDescriptionSeverityAffected 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·03:47 PM
Data Sourced
via OSV·04:15 PM
DescriptionSeverityAffected Software
Event
via OSV·04:15 PM
Nov 7, 2023
Data Sourced
01:42 PM
Weakness
Updated
02:15 PM
WeaknessAffected Software
Updated
02:15 PM
Affected Software
Nov 9, 2023
Data Sourced
via Red Hat·07:11 AM
DescriptionSeverityAffected Software
Jan 21, 2024
Data Sourced
via Microsoft·08:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·08:00 AM
Affected Software
Jan 23, 2024
Data Sourced
via MITRE·01:06 AM
DescriptionSeverityWeakness
Sep 16, 2024
Data Sourced
via NVD·11:15 AM
DescriptionSeverityWeaknessAffected Software
Updated
via NVD·11:15 AM
WeaknessAffected Software
Updated
via NVD·11:15 AM
Affected Software
Nov 21, 2024
Updated
via NVD·08:18 AM
Affected Software
Oct 14, 2026
Updated
via NVD·10:17 PM
Affected Software
Oct 23, 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-3773?

The severity of CVE-2023-3773 is medium.

2

What software is affected by CVE-2023-3773?

Redhat Enterprise Linux 8.0 and 9.0, Fedoraproject Fedora, Linux Linux Kernel, and Debian Linux are affected by CVE-2023-3773.

3

How can a malicious user exploit CVE-2023-3773?

A malicious user with CAP_NET_ADMIN privileges can exploit CVE-2023-3773 by causing an out-of-bounds read of XFRMA_MTIMER_THRESH, potentially leading to sensitive information leakage.

4

Is there a fix available for CVE-2023-3773?

Yes, there are fixes available for CVE-2023-3773. Apply the relevant security updates provided by Redhat, Fedoraproject, Linux Kernel, or Debian.

5

Where can I find more information about CVE-2023-3773?

You can find more information about CVE-2023-3773 at the following references: [Link 1](https://access.redhat.com/security/cve/CVE-2023-3773), [Link 2](https://bugzilla.redhat.com/show_bug.cgi?id=2218944), [Link 3](https://lore.kernel.org/all/20230723074110.3705047-1-linma@zju.edu.cn/T/#u).

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