Linux: Use After Free
CVE-2022-49755 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 facf353c9e8d7885b686d9a4b173d4e0af6441d2, e9036e951f93fb8d7b5e9d6e2c7f94a4da312ae4, a8d40942df074f4ebcb9bd3413596d92f323b064 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.23% 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 facf353c9e8d7885b686d9a4b173d4e0af6441d2 or e9036e951f93fb8d7b5e9d6e2c7f94a4da312ae4 or a8d40942df074f4ebcb9bd3413596d92f323b064 or 6dd9ea05534f323668db94fcc2726c7a84547e78, whichever matches your release line, or a later version.
- Update Linux Kernel to 4.14.305 or 4.19.272 or 5.4.231 or 5.10.166, whichever matches your release line, or a later version.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Linux | Linux | ddf8abd2599491cbad959c700b90ba72a5dce8d0 up to, but not including, facf353c9e8d7885b686d9a4b173d4e0af6441d2; ddf8abd2599491cbad959c700b90ba72a5dce8d0 up to, but not including, e9036e951f93fb8d7b5e9d6e2c7f94a4da312ae4; ddf8abd2599491cbad959c700b90ba72a5dce8d0 up to, but not including, a8d40942df074f4ebcb9bd3413596d92f323b064; ddf8abd2599491cbad959c700b90ba72a5dce8d0 up to, but not including, 6dd9ea05534f323668db94fcc2726c7a84547e78; ddf8abd2599491cbad959c700b90ba72a5dce8d0 up to, but not including, ae8e136bcaae96163b5821984de1036efc9abb1a; ddf8abd2599491cbad959c700b90ba72a5dce8d0 up to, but not including, 6aee197b7fbcd61596a78b47d553f2f99111f217; ddf8abd2599491cbad959c700b90ba72a5dce8d0 up to, but not including, 6a19da111057f69214b97c62fb0ac59023970850; 2.6.35 | facf353c9e8d7885b686d9a4b173d4e0af6441d2, e9036e951f93fb8d7b5e9d6e2c7f94a4da312ae4, a8d40942df074f4ebcb9bd3413596d92f323b064, 6dd9ea05534f323668db94fcc2726c7a84547e78, ae8e136bcaae96163b5821984de1036efc9abb1a, 6aee197b7fbcd61596a78b47d553f2f99111f217 |
| Linux | Linux Kernel | 2.6.35 up to, but not including, 4.14.305; 4.15 up to, but not including, 4.19.272; 4.20 up to, but not including, 5.4.231; 5.5 up to, but not including, 5.10.166; 5.11 up to, but not including, 5.15.91; 5.16 up to, but not including, 6.1.9; 6.2 | 4.14.305, 4.19.272, 5.4.231, 5.10.166, 5.15.91, 6.1.9 |
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 CISA (ADP).
Official description
In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_fs: Prevent race during ffs_ep0_queue_wait While performing fast composition switch, there is a possibility that the process of ffs_ep0_write/ffs_ep0_read get into a race condition due to ep0req being freed up from functionfs_unbind. Consider the scenario that the ffs_ep0_write calls the ffs_ep0_queue_wait by taking a lock &ffs->ev.waitq.lock. However, the functionfs_unbind isn't bounded so it can go ahead and mark the ep0req to NULL, and since there is no NULL check in ffs_ep0_queue_wait we will end up in use-after-free. Fix this by making a serialized execution between the two functions using a mutex_lock(ffs->mutex).
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: total).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- git.kernel.org/stable/c/6a19da111057f69214b97c62fb0ac59023970850
- git.kernel.org/stable/c/6aee197b7fbcd61596a78b47d553f2f99111f217
- git.kernel.org/stable/c/6dd9ea05534f323668db94fcc2726c7a84547e78
- git.kernel.org/stable/c/a8d40942df074f4ebcb9bd3413596d92f323b064
- git.kernel.org/stable/c/ae8e136bcaae96163b5821984de1036efc9abb1a
- git.kernel.org/stable/c/e9036e951f93fb8d7b5e9d6e2c7f94a4da312ae4
- git.kernel.org/stable/c/facf353c9e8d7885b686d9a4b173d4e0af6441d2
Recent Use After Free vulnerabilities
- 7.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.