CVE-2022-42720: Use After Free

Published Oct 13, 2022
·
Updated

A use-after-free flaw was found in bssrefget in the net/wireless/scan.c in the Linux kernel. This issue can lead to a denial of service or arbitrary code execution.

Other sources

In multiple functions of scan.c, there is a possible way to inject WLAN frames due to a use after free. This could lead to remote code execution with no additional execution privileges needed. User interaction is not needed for exploitation.

— OSV

There are multiple refcounting bugs related to multi-BSSID: - In bssrefget(), if the BSS has a hiddenbeaconbss, then the bss pointer is overwritten before checking for the transmitted BSS, which is clearly wrong. Fix this by using the bssfrompub() macro.

- In cfg80211bssupdate() we copy the transmittedbss pointer from tmp into new, but then if we release new, we'll unref it erroneously. We already set the pointer and ref it, but need to NULL it since it was copied from the tmp data.

- In cfg80211informsinglebssdata(), if adding to the non- transmitted list fails, we unlink the BSS and yet still we return it, but this results in returning an entry without a reference. We shouldn't return it anyway if it was broken enough to not get added there.

— Red Hat

Various refcounting bugs in the multi-BSS handling in the mac80211 stack in the Linux kernel 5.1 through 5.19.x before 5.19.16 could be used by local attackers (able to inject WLAN frames) to trigger use-after-free conditions to potentially execute code.

— Ubuntu

Affected Software

137 affected componentsFixes available
redhat/kernel-rt<0:4.18.0-477.10.1.rt7.274.el8_8
0:4.18.0-477.10.1.rt7.274.el8_8
redhat/kernel<0:4.18.0-477.10.1.el8_8
0:4.18.0-477.10.1.el8_8
redhat/kernel<0:5.14.0-284.11.1.el9_2
0:5.14.0-284.11.1.el9_2
redhat/kernel-rt<0:5.14.0-284.11.1.rt14.296.el9_2
0:5.14.0-284.11.1.rt14.296.el9_2
Linux Linux kernel>=5.1<5.4.218
Linux Linux kernel>=5.5<5.10.148
Linux Linux kernel>=5.11<5.15.74
Linux Linux kernel>=5.16<5.19.16
Linux Linux kernel>=6.0<6.0.2
Fedoraproject Fedora=36
Fedoraproject Fedora=37
Debian Debian Linux=10.0
Debian Debian Linux=11.0
Google Android
ubuntu/linux-hwe-edge*
ubuntu/linux-aws-5.4<5.4.0-1088.96~18.04.1
5.4.0-1088.96~18.04.1
ubuntu/linux-azure-5.4<5.4.0-1094.100~18.04.1
5.4.0-1094.100~18.04.1
ubuntu/linux-gcp-5.4<5.4.0-1092.101~18.04.1
5.4.0-1092.101~18.04.1
ubuntu/linux-hwe-5.4<5.4.0-131.147~18.04.1
5.4.0-131.147~18.04.1
ubuntu/linux-ibm-5.4<5.4.0-1036.41~18.04.1
5.4.0-1036.41~18.04.1
ubuntu/linux-oracle-5.4<5.4.0-1086.95~18.04.1
5.4.0-1086.95~18.04.1
ubuntu/linux-raspi-5.4<5.4.0-1073.84~18.04.1
5.4.0-1073.84~18.04.1
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-hwe-edge*
ubuntu/linux-oem*
ubuntu/linux-oracle-5.0*
ubuntu/linux-oracle-5.3*
ubuntu/backport-iwlwifi-dkms*
ubuntu/backport-iwlwifi-dkms<8324-0ubuntu3~20.04.5
8324-0ubuntu3~20.04.5
ubuntu/linux<5.4.0-131.147
5.4.0-131.147
ubuntu/linux-aws<5.4.0-1088.96
5.4.0-1088.96
ubuntu/linux-aws-5.15<5.15.0-1022.26~20.04.1
5.15.0-1022.26~20.04.1
ubuntu/linux-azure<5.4.0-1094.100
5.4.0-1094.100
ubuntu/linux-azure-5.15<5.15.0-1022.27~20.04.1
5.15.0-1022.27~20.04.1
ubuntu/linux-bluefield<5.4.0-1049.55
5.4.0-1049.55
ubuntu/linux-gcp<5.4.0-1092.101
5.4.0-1092.101
ubuntu/linux-gcp-5.15<5.15.0-1021.28~20.04.1
5.15.0-1021.28~20.04.1
ubuntu/linux-gke<5.4.0-1086.93
5.4.0-1086.93
ubuntu/linux-gke-5.15<5.15.0-1019.23~20.04.1
5.15.0-1019.23~20.04.1
ubuntu/linux-gkeop<5.4.0-1056.60
5.4.0-1056.60
ubuntu/linux-gkeop-5.15<5.15.0-1007.10~20.04.1
5.15.0-1007.10~20.04.1
ubuntu/linux-hwe-5.15<5.15.0-52.58~20.04.1
5.15.0-52.58~20.04.1
ubuntu/linux-ibm<5.4.0-1036.41
5.4.0-1036.41
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-1006.8
5.4.0-1006.8
ubuntu/linux-kvm<5.4.0-1078.84
5.4.0-1078.84
ubuntu/linux-lowlatency-hwe-5.15<5.15.0-52.58~20.04.1
5.15.0-52.58~20.04.1
ubuntu/linux-oem-5.14<5.14.0-1054.61
5.14.0-1054.61
ubuntu/linux-oracle<5.4.0-1086.95
5.4.0-1086.95
ubuntu/linux-oracle-5.15<5.15.0-1021.27~20.04.1
5.15.0-1021.27~20.04.1
ubuntu/linux-raspi<5.4.0-1073.84
5.4.0-1073.84
ubuntu/linux-riscv-5.15<5.15.0-1022.26~20.04.1
5.15.0-1022.26~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-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-1088.96+fips1
5.4.0-1088.96+fips1
ubuntu/linux-azure-fips<5.4.0-1094.100+fips1
5.4.0-1094.100+fips1
ubuntu/linux-fips<5.4.0-1064.73
5.4.0-1064.73
ubuntu/linux-gcp-fips<5.4.0-1092.101+fips1
5.4.0-1092.101+fips1
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-fips*
ubuntu/linux-gcp-fips*
ubuntu/backport-iwlwifi-dkms<9858-0ubuntu3.1
9858-0ubuntu3.1
ubuntu/linux<5.15.0-52.58
5.15.0-52.58
ubuntu/linux-aws<5.15.0-1022.26
5.15.0-1022.26
ubuntu/linux-aws-6.2*
ubuntu/linux-azure<5.15.0-1022.27
5.15.0-1022.27
ubuntu/linux-azure-fde<5.15.0-1024.30.1
5.15.0-1024.30.1
ubuntu/linux-gcp<5.15.0-1021.28
5.15.0-1021.28
ubuntu/linux-gcp-6.2*
ubuntu/linux-gke<5.15.0-1019.23
5.15.0-1019.23
ubuntu/linux-gkeop<5.15.0-1007.10
5.15.0-1007.10
ubuntu/linux-ibm<5.15.0-1017.20
5.15.0-1017.20
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-1020.24
5.15.0-1020.24
ubuntu/linux-lowlatency<5.15.0-52.58
5.15.0-52.58
ubuntu/linux-lowlatency-hwe-6.2*
ubuntu/linux-nvidia<5.15.0-1015.15
5.15.0-1015.15
ubuntu/linux-oem-5.17<5.17.0-1020.21
5.17.0-1020.21
ubuntu/linux-oem-6.1*
ubuntu/linux-oracle<5.15.0-1021.27
5.15.0-1021.27
ubuntu/linux-raspi<5.15.0-1017.19
5.15.0-1017.19
ubuntu/linux-realtime*
ubuntu/linux-riscv<5.15.0-1022.26
5.15.0-1022.26
ubuntu/linux-realtime<5.15.0-1024.25
5.15.0-1024.25
ubuntu/backport-iwlwifi-dkms*
ubuntu/linux-raspi-realtime*
ubuntu/backport-iwlwifi-dkms*
ubuntu/backport-iwlwifi-dkms*
ubuntu/backport-iwlwifi-dkms*
android/:linux_kernel:>=:0<:2023-01-05
:2023-01-05
alpine/linux-lts<5.15.74-r0
5.15.74-r0
alpine/linux-lts<5.15.74-r0
5.15.74-r0
alpine/linux-lts<5.15.74-r0
5.15.74-r0
alpine/linux-lts<5.15.74-r0
5.15.74-r0
alpine/linux-lts<5.15.74-r0
5.15.74-r0
alpine/linux-lts<5.15.74-r0
5.15.74-r0
alpine/linux-lts<5.15.74-r0
5.15.74-r0
alpine/linux-lts<5.15.74-r0
5.15.74-r0
alpine/linux-lts<5.15.74-r0
5.15.74-r0
debian/linux<6.0.2-1
6.0.2-1
debian/linux<6.0.2-1
6.0.2-1
debian/linux<6.0.2-1
6.0.2-1
debian/linux
5.10.149-16.0.2-1
debian/linux-5.10
5.10.149-2~deb10u1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/kernel-rt to a version that resolves this vulnerability.

    Fixed in 0:4.18.0-477.10.1.rt7.274.el8_8
  2. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 0:4.18.0-477.10.1.el8_8
  3. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 0:5.14.0-284.11.1.el9_2
  4. Upgrade

    Upgrade redhat/kernel-rt to a version that resolves this vulnerability.

    Fixed in 0:5.14.0-284.11.1.rt14.296.el9_2
  5. Upgrade

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

    Fixed in 5.4.0-1088.96~18.04.1
  6. Upgrade

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

    Fixed in 5.4.0-1094.100~18.04.1
  7. Upgrade

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

    Fixed in 5.4.0-1092.101~18.04.1
  8. Upgrade

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

    Fixed in 5.4.0-131.147~18.04.1
  9. Upgrade

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

    Fixed in 5.4.0-1036.41~18.04.1
  10. Upgrade

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

    Fixed in 5.4.0-1086.95~18.04.1
  11. Upgrade

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

    Fixed in 5.4.0-1073.84~18.04.1
  12. Upgrade

    Upgrade ubuntu/backport-iwlwifi-dkms to a version that resolves this vulnerability.

    Fixed in 8324-0ubuntu3~20.04.5
  13. Upgrade

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

    Fixed in 5.4.0-131.147
  14. Upgrade

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

    Fixed in 5.4.0-1088.96
  15. Upgrade

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

    Fixed in 5.15.0-1022.26~20.04.1
  16. Upgrade

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

    Fixed in 5.4.0-1094.100
  17. Upgrade

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

    Fixed in 5.15.0-1022.27~20.04.1
  18. Upgrade

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

    Fixed in 5.4.0-1049.55
  19. Upgrade

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

    Fixed in 5.4.0-1092.101
  20. Upgrade

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

    Fixed in 5.15.0-1021.28~20.04.1
  21. Upgrade

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

    Fixed in 5.4.0-1086.93
  22. Upgrade

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

    Fixed in 5.15.0-1019.23~20.04.1
  23. Upgrade

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

    Fixed in 5.4.0-1056.60
  24. Upgrade

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

    Fixed in 5.15.0-1007.10~20.04.1
  25. Upgrade

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

    Fixed in 5.15.0-52.58~20.04.1
  26. Upgrade

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

    Fixed in 5.4.0-1036.41
  27. 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
  28. Upgrade

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

    Fixed in 5.4.0-1006.8
  29. Upgrade

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

    Fixed in 5.4.0-1078.84
  30. Upgrade

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

    Fixed in 5.15.0-52.58~20.04.1
  31. Upgrade

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

    Fixed in 5.14.0-1054.61
  32. Upgrade

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

    Fixed in 5.4.0-1086.95
  33. Upgrade

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

    Fixed in 5.15.0-1021.27~20.04.1
  34. Upgrade

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

    Fixed in 5.4.0-1073.84
  35. Upgrade

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

    Fixed in 5.15.0-1022.26~20.04.1
  36. Upgrade

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

    Fixed in 5.4.0-1088.96+fips1
  37. Upgrade

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

    Fixed in 5.4.0-1094.100+fips1
  38. Upgrade

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

    Fixed in 5.4.0-1064.73
  39. Upgrade

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

    Fixed in 5.4.0-1092.101+fips1
  40. Upgrade

    Upgrade ubuntu/backport-iwlwifi-dkms to a version that resolves this vulnerability.

    Fixed in 9858-0ubuntu3.1
  41. Upgrade

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

    Fixed in 5.15.0-52.58
  42. Upgrade

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

    Fixed in 5.15.0-1022.26
  43. Upgrade

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

    Fixed in 5.15.0-1022.27
  44. Upgrade

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

    Fixed in 5.15.0-1024.30.1
  45. Upgrade

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

    Fixed in 5.15.0-1021.28
  46. Upgrade

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

    Fixed in 5.15.0-1019.23
  47. Upgrade

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

    Fixed in 5.15.0-1007.10
  48. Upgrade

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

    Fixed in 5.15.0-1017.20
  49. Upgrade

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

    Fixed in 5.15.0-1018.23
  50. Upgrade

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

    Fixed in 5.15.0-1020.24
  51. Upgrade

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

    Fixed in 5.15.0-52.58
  52. Upgrade

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

    Fixed in 5.15.0-1015.15
  53. Upgrade

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

    Fixed in 5.17.0-1020.21
  54. Upgrade

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

    Fixed in 5.15.0-1021.27
  55. Upgrade

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

    Fixed in 5.15.0-1017.19
  56. Upgrade

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

    Fixed in 5.15.0-1022.26
  57. Upgrade

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

    Fixed in 5.15.0-1024.25
  58. Upgrade

    Upgrade android/:linux_kernel: to a version that resolves this vulnerability.

    Fixed in :2023-01-05
  59. Upgrade

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

    Fixed in 5.15.74-r0
  60. Upgrade

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

    Fixed in 6.0.2-1
  61. Upgrade

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

    Fixed in 5.10.149-1Fixed in 6.0.2-1
  62. Upgrade

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

    Fixed in 5.10.149-2~deb10u1
  63. Upgrade

    Upgrade Linux kernel to a version that resolves this vulnerability.

    Fixed in 5.19.16

Event History

Oct 13, 2022
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
Description
Data Sourced
10:00 AM
RemedyDescriptionSeverityWeaknessAffected Software
Oct 14, 2022
Data Sourced
via Ubuntu·12:00 AM
RemedyDescriptionSeverityAffected Software
Updated
via Ubuntu·12:00 AM
Affected Software
Updated
via Ubuntu·12:00 AM
RemedyDescriptionAffected Software
Updated
via Ubuntu·12:00 AM
Description
Data Sourced
via OSV·12:15 AM
DescriptionSeverityAffected Software
Jan 1, 2023
Advisory Published
via OSV·12:00 AM
Oct 27, 2023
Data Sourced
via Android·12:00 AM
SeverityWeaknessAffected Software
Updated
via Android·12:00 AM
Affected Software
Nov 7, 2023
Data Sourced
via NVD·03:53 AM
RemedyDescriptionSeverityWeaknessAffected Software
Updated
03:53 AM
Affected Software
Dec 7, 2023
Data Sourced
via Red Hat·03:13 PM
DescriptionSeverityAffected Software
Feb 7, 2024
Updated
via Android·12:00 AM
Affected Software
Mar 11, 2024
Updated
via Android·12:00 AM
Affected Software
Mar 18, 2024
Updated
via Android·12:00 AM
Affected Software
Apr 29, 2024
Updated
via Android·12:00 AM
Affected Software
May 21, 2024
Updated
via Android·12:00 AM
Affected Software
Aug 26, 2024
Updated
via Android·12:00 AM
Affected Software
Nov 21, 2024
Updated
via NVD·07:25 AM
RemedyAffected Software
Jun 17, 2026
Updated
via NVD·05:05 AM
Affected Software
Sep 30, 2026
Updated
via Android·12:00 AM
Affected Software
Oct 14, 2026
Updated
via NVD·07:16 PM
SeverityWeaknessAffected 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-2022-42720?

CVE-2022-42720 has been classified as a critical vulnerability due to its potential for denial of service and arbitrary code execution.

2

How do I fix CVE-2022-42720?

To address CVE-2022-42720, update to the latest kernel versions: 0:4.18.0-477.10.1.rt7.274.el8_8, 0:4.18.0-477.10.1.el8_8, 0:5.14.0-284.11.1.el9_2, or 0:5.14.0-284.11.1.rt14.296.el9_2 as appropriate.

3

What software versions are affected by CVE-2022-42720?

CVE-2022-42720 affects multiple software versions of the Linux kernel, including various Red Hat and Debian releases.

4

Which products are impacted by CVE-2022-42720?

CVE-2022-42720 impacts products such as Red Hat kernel, Red Hat kernel-rt, and Debian Linux distributions.

5

Can CVE-2022-42720 lead to data compromise?

Yes, CVE-2022-42720 can potentially lead to arbitrary code execution, which may result in data compromise.

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