CVE-2023-3111: Use After Free

Published Jun 5, 2023
·
Updated

A use after free vulnerability was found in preparetorelocate in fs/btrfs/relocation.c in btrfs in the Linux Kernel. This possible flaw can be triggered by calling btrfsioctlbalance() before calling btrfsioctldefrag().

Affected Software

153 affected componentsFixes available
Linux Linux kernel>=2.6.31<4.14.318
Linux Linux kernel>=4.15<4.19.286
Linux Linux kernel>=4.20<5.4.247
Linux Linux kernel>=5.5<5.10.184
Linux Linux kernel>=5.11<5.15.63
Linux Linux kernel>=5.16<5.19.4
NetApp Hci Baseboard Management Controller=h300s
NetApp Hci Baseboard Management Controller=h410c
NetApp Hci Baseboard Management Controller=h410s
NetApp Hci Baseboard Management Controller=h500s
NetApp Hci Baseboard Management Controller=h700s
Debian Debian Linux=10.0
Debian Debian Linux=11.0
All of the following
NetApp H300s Firmware
NetApp H300s
All of the following
NetApp H410c Firmware
NetApp H410c
All of the following
NetApp H410s Firmware
NetApp H410s
All of the following
NetApp H500s Firmware
NetApp H500s
All of the following
NetApp H700s Firmware
NetApp H700s
debian/linux
6.1.176-16.1.190-16.12.107-16.12.116-17.2.15-17.3.3-1
ubuntu/linux-aws<4.4.0-1120.126
4.4.0-1120.126
ubuntu/linux-azure<4.15.0-1168.183~14.04.1
4.15.0-1168.183~14.04.1
ubuntu/linux-lts-xenial<4.4.0-242.276~14.04.1
4.4.0-242.276~14.04.1
ubuntu/linux*
ubuntu/linux<4.4.0-242.276
4.4.0-242.276
ubuntu/linux-aws<4.4.0-1158.173
4.4.0-1158.173
ubuntu/linux-aws-hwe<4.15.0-1159.172~16.04.1
4.15.0-1159.172~16.04.1
ubuntu/linux-azure<4.15.0-1168.183~16.04.1
4.15.0-1168.183~16.04.1
ubuntu/linux-gcp<4.15.0-1153.170~16.04.1
4.15.0-1153.170~16.04.1
ubuntu/linux-hwe<4.15.0-214.225~16.04.1
4.15.0-214.225~16.04.1
ubuntu/linux-kvm<4.4.0-1121.131
4.4.0-1121.131
ubuntu/linux-oracle<4.15.0-1122.133~16.04.1
4.15.0-1122.133~16.04.1
ubuntu/linux-hwe-edge*
ubuntu/linux-fips<4.4.0-1090.97
4.4.0-1090.97
ubuntu/linux-fips*
ubuntu/linux<4.15.0-214.225
4.15.0-214.225
ubuntu/linux-aws<4.15.0-1159.172
4.15.0-1159.172
ubuntu/linux-aws-5.0*
ubuntu/linux-aws-5.3*
ubuntu/linux-aws-5.4<5.4.0-1107.115~18.04.1
5.4.0-1107.115~18.04.1
ubuntu/linux-azure*
ubuntu/linux-azure-4.15<4.15.0-1168.183
4.15.0-1168.183
ubuntu/linux-azure-5.3*
ubuntu/linux-azure-5.4<5.4.0-1113.119~18.04.1
5.4.0-1113.119~18.04.1
ubuntu/linux-azure-edge*
ubuntu/linux-gcp*
ubuntu/linux-gcp-4.15<4.15.0-1153.170
4.15.0-1153.170
ubuntu/linux-gcp-5.3*
ubuntu/linux-gcp-5.4<5.4.0-1110.119~18.04.1
5.4.0-1110.119~18.04.1
ubuntu/linux-gke-4.15*
ubuntu/linux-gke-5.4*
ubuntu/linux-gkeop-5.4*
ubuntu/linux-hwe*
ubuntu/linux-hwe-5.4<5.4.0-156.173~18.04.1
5.4.0-156.173~18.04.1
ubuntu/linux-hwe-edge*
ubuntu/linux-ibm-5.4<5.4.0-1054.59~18.04.1
5.4.0-1054.59~18.04.1
ubuntu/linux-kvm<4.15.0-1143.148
4.15.0-1143.148
ubuntu/linux-oem*
ubuntu/linux-oracle<4.15.0-1122.133
4.15.0-1122.133
ubuntu/linux-oracle-5.0*
ubuntu/linux-oracle-5.3*
ubuntu/linux-oracle-5.4<5.4.0-1106.115~18.04.1
5.4.0-1106.115~18.04.1
ubuntu/linux-raspi-5.4<5.4.0-1091.102~18.04.1
5.4.0-1091.102~18.04.1
ubuntu/linux-aws-fips<4.15.0-2098.104
4.15.0-2098.104
ubuntu/linux-azure-fips<4.15.0-2077.83
4.15.0-2077.83
ubuntu/linux-fips<4.15.0-1114.125
4.15.0-1114.125
ubuntu/linux-gcp-fips<4.15.0-2061.66
4.15.0-2061.66
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-fips*
ubuntu/linux-gcp-fips*
ubuntu/linux<5.4.0-156.173
5.4.0-156.173
ubuntu/linux-aws<5.4.0-1107.115
5.4.0-1107.115
ubuntu/linux-aws-5.15<5.15.0-1023.27~20.04.1
5.15.0-1023.27~20.04.1
ubuntu/linux-azure<5.4.0-1114.120
5.4.0-1114.120
ubuntu/linux-azure-5.15<5.15.0-1023.29~20.04.1
5.15.0-1023.29~20.04.1
ubuntu/linux-bluefield<5.4.0-1068.74
5.4.0-1068.74
ubuntu/linux-gcp<5.4.0-1110.119
5.4.0-1110.119
ubuntu/linux-gcp-5.15<5.15.0-1022.29~20.04.1
5.15.0-1022.29~20.04.1
ubuntu/linux-gke<5.4.0-1105.112
5.4.0-1105.112
ubuntu/linux-gke-5.15<5.15.0-1020.25~20.04.1
5.15.0-1020.25~20.04.1
ubuntu/linux-gkeop<5.4.0-1074.78
5.4.0-1074.78
ubuntu/linux-gkeop-5.15<5.15.0-1008.12~20.04.1
5.15.0-1008.12~20.04.1
ubuntu/linux-hwe-5.15<5.15.0-53.59~20.04.1
5.15.0-53.59~20.04.1
ubuntu/linux-ibm<5.4.0-1054.59
5.4.0-1054.59
ubuntu/linux-intel-iotg-5.15<5.15.0-1018.23~20.04.1
5.15.0-1018.23~20.04.1
ubuntu/linux-iot<5.4.0-1019.20
5.4.0-1019.20
ubuntu/linux-kvm<5.4.0-1096.102
5.4.0-1096.102
ubuntu/linux-lowlatency-hwe-5.15<5.15.0-53.59~20.04.1
5.15.0-53.59~20.04.1
ubuntu/linux-oracle<5.4.0-1106.115
5.4.0-1106.115
ubuntu/linux-oracle-5.15<5.15.0-1022.28~20.04.1
5.15.0-1022.28~20.04.1
ubuntu/linux-raspi<5.4.0-1091.102
5.4.0-1091.102
ubuntu/linux-riscv-5.15<5.15.0-1023.27~20.04.1
5.15.0-1023.27~20.04.1
ubuntu/linux-xilinx-zynqmp<5.4.0-1027.31
5.4.0-1027.31
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-azure-fde*
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-aws-fips<5.4.0-1107.115+fips1
5.4.0-1107.115+fips1
ubuntu/linux-azure-fips<5.4.0-1113.119+fips1
5.4.0-1113.119+fips1
ubuntu/linux-fips<5.4.0-1082.91
5.4.0-1082.91
ubuntu/linux-gcp-fips<5.4.0-1110.119+fips1
5.4.0-1110.119+fips1
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-fips*
ubuntu/linux-gcp-fips*
ubuntu/linux<5.15.0-53.59
5.15.0-53.59
ubuntu/linux-aws<5.15.0-1023.27
5.15.0-1023.27
ubuntu/linux-azure<5.15.0-1023.29
5.15.0-1023.29
ubuntu/linux-azure-5.19*
ubuntu/linux-azure-fde<5.15.0-1024.30.1
5.15.0-1024.30.1
ubuntu/linux-azure-fde-5.19*
ubuntu/linux-gcp<5.15.0-1022.29
5.15.0-1022.29
ubuntu/linux-gke<5.15.0-1020.25
5.15.0-1020.25
ubuntu/linux-gkeop<5.15.0-1008.12
5.15.0-1008.12
ubuntu/linux-ibm<5.15.0-1018.21
5.15.0-1018.21
ubuntu/linux-intel-iot-realtime*
ubuntu/linux-intel-iotg<5.15.0-1018.23
5.15.0-1018.23
ubuntu/linux-kvm<5.15.0-1021.26
5.15.0-1021.26
ubuntu/linux-lowlatency<5.15.0-53.59
5.15.0-53.59
ubuntu/linux-nvidia<5.15.0-1015.15
5.15.0-1015.15
ubuntu/linux-oem-5.17*
ubuntu/linux-oracle<5.15.0-1022.28
5.15.0-1022.28
ubuntu/linux-raspi<5.15.0-1018.20
5.15.0-1018.20
ubuntu/linux-realtime*
ubuntu/linux-riscv*
ubuntu/linux-realtime<5.15.0-1025.28
5.15.0-1025.28
ubuntu/linux-raspi-realtime*
ubuntu/linux-vmware*

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

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

    Fixed in 4.4.0-1120.126
  2. Upgrade

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

    Fixed in 4.15.0-1168.183~14.04.1
  3. Upgrade

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

    Fixed in 4.4.0-242.276~14.04.1
  4. Upgrade

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

    Fixed in 4.4.0-242.276
  5. Upgrade

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

    Fixed in 4.4.0-1158.173
  6. Upgrade

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

    Fixed in 4.15.0-1159.172~16.04.1
  7. Upgrade

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

    Fixed in 4.15.0-1168.183~16.04.1
  8. Upgrade

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

    Fixed in 4.15.0-1153.170~16.04.1
  9. Upgrade

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

    Fixed in 4.15.0-214.225~16.04.1
  10. Upgrade

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

    Fixed in 4.4.0-1121.131
  11. Upgrade

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

    Fixed in 4.15.0-1122.133~16.04.1
  12. Upgrade

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

    Fixed in 4.4.0-1090.97
  13. Upgrade

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

    Fixed in 4.15.0-214.225
  14. Upgrade

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

    Fixed in 4.15.0-1159.172
  15. Upgrade

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

    Fixed in 5.4.0-1107.115~18.04.1
  16. Upgrade

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

    Fixed in 4.15.0-1168.183
  17. Upgrade

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

    Fixed in 5.4.0-1113.119~18.04.1
  18. Upgrade

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

    Fixed in 4.15.0-1153.170
  19. Upgrade

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

    Fixed in 5.4.0-1110.119~18.04.1
  20. Upgrade

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

    Fixed in 5.4.0-156.173~18.04.1
  21. Upgrade

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

    Fixed in 5.4.0-1054.59~18.04.1
  22. Upgrade

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

    Fixed in 4.15.0-1143.148
  23. Upgrade

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

    Fixed in 4.15.0-1122.133
  24. Upgrade

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

    Fixed in 5.4.0-1106.115~18.04.1
  25. Upgrade

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

    Fixed in 5.4.0-1091.102~18.04.1
  26. Upgrade

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

    Fixed in 4.15.0-2098.104
  27. Upgrade

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

    Fixed in 4.15.0-2077.83
  28. Upgrade

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

    Fixed in 4.15.0-1114.125
  29. Upgrade

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

    Fixed in 4.15.0-2061.66
  30. Upgrade

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

    Fixed in 5.4.0-156.173
  31. Upgrade

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

    Fixed in 5.4.0-1107.115
  32. Upgrade

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

    Fixed in 5.15.0-1023.27~20.04.1
  33. Upgrade

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

    Fixed in 5.4.0-1114.120
  34. Upgrade

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

    Fixed in 5.15.0-1023.29~20.04.1
  35. Upgrade

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

    Fixed in 5.4.0-1068.74
  36. Upgrade

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

    Fixed in 5.4.0-1110.119
  37. Upgrade

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

    Fixed in 5.15.0-1022.29~20.04.1
  38. Upgrade

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

    Fixed in 5.4.0-1105.112
  39. Upgrade

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

    Fixed in 5.15.0-1020.25~20.04.1
  40. Upgrade

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

    Fixed in 5.4.0-1074.78
  41. Upgrade

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

    Fixed in 5.15.0-1008.12~20.04.1
  42. Upgrade

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

    Fixed in 5.15.0-53.59~20.04.1
  43. Upgrade

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

    Fixed in 5.4.0-1054.59
  44. Upgrade

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

    Fixed in 5.15.0-1018.23~20.04.1
  45. Upgrade

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

    Fixed in 5.4.0-1019.20
  46. Upgrade

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

    Fixed in 5.4.0-1096.102
  47. Upgrade

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

    Fixed in 5.15.0-53.59~20.04.1
  48. Upgrade

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

    Fixed in 5.4.0-1106.115
  49. Upgrade

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

    Fixed in 5.15.0-1022.28~20.04.1
  50. Upgrade

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

    Fixed in 5.4.0-1091.102
  51. Upgrade

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

    Fixed in 5.15.0-1023.27~20.04.1
  52. Upgrade

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

    Fixed in 5.4.0-1027.31
  53. Upgrade

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

    Fixed in 5.4.0-1107.115+fips1
  54. Upgrade

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

    Fixed in 5.4.0-1113.119+fips1
  55. Upgrade

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

    Fixed in 5.4.0-1082.91
  56. Upgrade

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

    Fixed in 5.4.0-1110.119+fips1
  57. Upgrade

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

    Fixed in 5.15.0-53.59
  58. Upgrade

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

    Fixed in 5.15.0-1023.27
  59. Upgrade

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

    Fixed in 5.15.0-1023.29
  60. Upgrade

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

    Fixed in 5.15.0-1024.30.1
  61. Upgrade

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

    Fixed in 5.15.0-1022.29
  62. Upgrade

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

    Fixed in 5.15.0-1020.25
  63. Upgrade

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

    Fixed in 5.15.0-1008.12
  64. Upgrade

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

    Fixed in 5.15.0-1018.21
  65. Upgrade

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

    Fixed in 5.15.0-1018.23
  66. Upgrade

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

    Fixed in 5.15.0-1021.26
  67. Upgrade

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

    Fixed in 5.15.0-53.59
  68. Upgrade

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

    Fixed in 5.15.0-1015.15
  69. Upgrade

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

    Fixed in 5.15.0-1022.28
  70. Upgrade

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

    Fixed in 5.15.0-1018.20
  71. Upgrade

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

    Fixed in 5.15.0-1025.28
  72. Upgrade

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

    Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.116-1Fixed in 7.2.15-1Fixed in 7.3.4-1

Event History

Jun 5, 2023
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionWeakness
Data Sourced
via Ubuntu·12:00 AM
RemedyDescriptionSeverityAffected Software
Data Sourced
via OSV·09:15 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·09:15 PM
DescriptionSeverityWeaknessAffected 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-3111?

CVE-2023-3111 is classified as a use after free vulnerability, which can lead to potential arbitrary code execution.

2

How do I fix CVE-2023-3111?

To remediate CVE-2023-3111, users should upgrade to the latest patched version of the Linux Kernel, such as 5.10.223-1 or higher.

3

Which versions of the Linux Kernel are affected by CVE-2023-3111?

CVE-2023-3111 affects various versions of the Linux Kernel from 2.6.31 to 5.19.4.

4

What functionality is impacted by CVE-2023-3111?

CVE-2023-3111 can be triggered by calling btrfs_ioctl_balance() before btrfs_ioctl_defrag(), which may result in memory corruption.

5

Who is affected by CVE-2023-3111?

Users of the affected Linux Kernel versions, including those on Debian and various NetApp devices, are at risk from CVE-2023-3111.

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