Linux: Use After Free
CVE-2022-50179 is a high-severity use after free vulnerability in Linux, with a CVSS 3.1 base score of 7.8 out of 10. It can be exploited with local access to the system by an attacker with a low-privileged account, without any action from a user. The record lists versions 62bc1ea5c7401d77eaf73d0c6a15f3d2e742856e, ab7a0ddf5f1cdec63cb21840369873806fc36d80, e9e21206b8ea62220b486310c61277e7ebfe7cec as the first without the flaw, so updating Linux to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.27% chance of exploitation within 30 days, which is low compared with other CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update Linux to 62bc1ea5c7401d77eaf73d0c6a15f3d2e742856e or ab7a0ddf5f1cdec63cb21840369873806fc36d80 or e9e21206b8ea62220b486310c61277e7ebfe7cec or eccd7c3e2596b574241a7670b5b53f5322f470e5, whichever matches your release line, or a later version.
- Update Linux Kernel to 4.14.291 or 4.19.256 or 5.4.211 or 5.10.137, whichever matches your release line, or a later version.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Linux | Linux | fb9987d0f748c983bb795a86f47522313f701a08 up to, but not including, 62bc1ea5c7401d77eaf73d0c6a15f3d2e742856e; fb9987d0f748c983bb795a86f47522313f701a08 up to, but not including, ab7a0ddf5f1cdec63cb21840369873806fc36d80; fb9987d0f748c983bb795a86f47522313f701a08 up to, but not including, e9e21206b8ea62220b486310c61277e7ebfe7cec; fb9987d0f748c983bb795a86f47522313f701a08 up to, but not including, eccd7c3e2596b574241a7670b5b53f5322f470e5; fb9987d0f748c983bb795a86f47522313f701a08 up to, but not including, 03ca957c5f7b55660957eda20b5db4110319ac7a; fb9987d0f748c983bb795a86f47522313f701a08 up to, but not including, 6b14ab47937ba441e75e8dbb9fbfc9c55efa41c6; fb9987d0f748c983bb795a86f47522313f701a08 up to, but not including, b66ebac40f64336ae2d053883bee85261060bd27; fb9987d0f748c983bb795a86f47522313f701a08 up to, but not including, 0ac4827f78c7ffe8eef074bc010e7e34bc22f533; and 1 more ranges | 62bc1ea5c7401d77eaf73d0c6a15f3d2e742856e, ab7a0ddf5f1cdec63cb21840369873806fc36d80, e9e21206b8ea62220b486310c61277e7ebfe7cec, eccd7c3e2596b574241a7670b5b53f5322f470e5, 03ca957c5f7b55660957eda20b5db4110319ac7a, 6b14ab47937ba441e75e8dbb9fbfc9c55efa41c6 |
| Linux | Linux Kernel | 2.6.35 up to, but not including, 4.14.291; 4.15 up to, but not including, 4.19.256; 4.20 up to, but not including, 5.4.211; 5.5 up to, but not including, 5.10.137; 5.11 up to, but not including, 5.15.61; 5.16 up to, but not including, 5.18.18; 5.19 up to, but not including, 5.19.2 | 4.14.291, 4.19.256, 5.4.211, 5.10.137, 5.15.61, 5.18.18 |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- LocalThe attacker needs local access or must trick a user into running something.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- LowA basic user account is enough.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.
Official description
In the Linux kernel, the following vulnerability has been resolved: ath9k: fix use-after-free in ath9k_hif_usb_rx_cb Syzbot reported use-after-free Read in ath9k_hif_usb_rx_cb() [0]. The problem was in incorrect htc_handle->drv_priv initialization. Probable call trace which can trigger use-after-free: ath9k_htc_probe_device() /* htc_handle->drv_priv = priv; */ ath9k_htc_wait_for_target() <--- Failed ieee80211_free_hw() <--- priv pointer is freed <IRQ> ... ath9k_hif_usb_rx_cb() ath9k_hif_usb_rx_stream() RX_STAT_INC() <--- htc_handle->drv_priv access In order to not add fancy protection for drv_priv we can move htc_handle->drv_priv initialization at the end of the ath9k_htc_probe_device() and add helper macro to make all *_STAT_* macros NULL safe, since syzbot has reported related NULL deref in that macros [1]
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Use After Free
The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory belongs to the code that operates on the new pointer.
How developers prevent this class of flaw
- Choose a language that provides automatic memory management.
- When freeing pointers, be sure to set them to NULL once they are freed. However, the utilization of multiple or complex data structures may lower the usefulness of this strategy.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- git.kernel.org/stable/c/03ca957c5f7b55660957eda20b5db4110319ac7a
- git.kernel.org/stable/c/0ac4827f78c7ffe8eef074bc010e7e34bc22f533
- git.kernel.org/stable/c/62bc1ea5c7401d77eaf73d0c6a15f3d2e742856e
- git.kernel.org/stable/c/6b14ab47937ba441e75e8dbb9fbfc9c55efa41c6
- git.kernel.org/stable/c/ab7a0ddf5f1cdec63cb21840369873806fc36d80
- git.kernel.org/stable/c/b66ebac40f64336ae2d053883bee85261060bd27
- git.kernel.org/stable/c/e9e21206b8ea62220b486310c61277e7ebfe7cec
- git.kernel.org/stable/c/eccd7c3e2596b574241a7670b5b53f5322f470e5
Recent Use After Free vulnerabilities
- 8.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
Spotted an error? Tell us.