Linux: Use After Free
CVE-2022-50542 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 146bd005ebb01ae190c22af050cb98623958c373, 8c6151b8e8dd2d98ad2cd725d26d1e103d989891, 52f54fe78cca24850a30865037250f63eb3d5bf7 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.17% 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 146bd005ebb01ae190c22af050cb98623958c373 or 8c6151b8e8dd2d98ad2cd725d26d1e103d989891 or 52f54fe78cca24850a30865037250f63eb3d5bf7 or 0ca298d548461d29615f9a2b1309e8dcf4a352c6, whichever matches your release line, or a later version.
- Update Linux Kernel to 4.9.337 or 4.14.303 or 4.19.270 or 5.4.229, whichever matches your release line, or a later version.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Linux | Linux | 779471110c6f0f7f7c223fc696170ec750ac3531 up to, but not including, 146bd005ebb01ae190c22af050cb98623958c373; 779471110c6f0f7f7c223fc696170ec750ac3531 up to, but not including, 8c6151b8e8dd2d98ad2cd725d26d1e103d989891; 779471110c6f0f7f7c223fc696170ec750ac3531 up to, but not including, 52f54fe78cca24850a30865037250f63eb3d5bf7; 779471110c6f0f7f7c223fc696170ec750ac3531 up to, but not including, 0ca298d548461d29615f9a2b1309e8dcf4a352c6; 779471110c6f0f7f7c223fc696170ec750ac3531 up to, but not including, 1c6447d0fc68650e51586dde79b5090d9d77f13a; 779471110c6f0f7f7c223fc696170ec750ac3531 up to, but not including, 6c8aee0c8fcc6dda94315f7908e8fa9bc75abe75; 779471110c6f0f7f7c223fc696170ec750ac3531 up to, but not including, 63648a7bd1a7599bcc2040a6d1792363ae4c2e1b; 779471110c6f0f7f7c223fc696170ec750ac3531 up to, but not including, 92b0888398e4ba51d93b618a6506781f4e3879c9; and 2 more ranges | 146bd005ebb01ae190c22af050cb98623958c373, 8c6151b8e8dd2d98ad2cd725d26d1e103d989891, 52f54fe78cca24850a30865037250f63eb3d5bf7, 0ca298d548461d29615f9a2b1309e8dcf4a352c6, 1c6447d0fc68650e51586dde79b5090d9d77f13a, 6c8aee0c8fcc6dda94315f7908e8fa9bc75abe75 |
| Linux | Linux Kernel | 3.6 up to, but not including, 4.9.337; 4.10 up to, but not including, 4.14.303; 4.15 up to, but not including, 4.19.270; 4.20 up to, but not including, 5.4.229; 5.5 up to, but not including, 5.10.163; 5.11 up to, but not including, 5.15.86; 5.16 up to, but not including, 6.0.16; 6.1 up to, but not including, 6.1.2 | 4.9.337, 4.14.303, 4.19.270, 5.4.229, 5.10.163, 5.15.86 |
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: media: si470x: Fix use-after-free in si470x_int_in_callback() syzbot reported use-after-free in si470x_int_in_callback() [1]. This indicates that urb->context, which contains struct si470x_device object, is freed when si470x_int_in_callback() is called. The cause of this issue is that si470x_int_in_callback() is called for freed urb. si470x_usb_driver_probe() calls si470x_start_usb(), which then calls usb_submit_urb() and si470x_start(). If si470x_start_usb() fails, si470x_usb_driver_probe() doesn't kill urb, but it just frees struct si470x_device object, as depicted below: si470x_usb_driver_probe() ... si470x_start_usb() ... usb_submit_urb() retval = si470x_start() return retval if (retval < 0) free struct si470x_device object, but don't kill urb This patch fixes this issue by killing urb when si470x_start_usb() fails and urb is submitted. If si470x_start_usb() fails and urb is not submitted, i.e. submitting usb fails, it just frees struct si470x_device object.
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.
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- git.kernel.org/stable/c/0ca298d548461d29615f9a2b1309e8dcf4a352c6
- git.kernel.org/stable/c/146bd005ebb01ae190c22af050cb98623958c373
- git.kernel.org/stable/c/1c6447d0fc68650e51586dde79b5090d9d77f13a
- git.kernel.org/stable/c/52f54fe78cca24850a30865037250f63eb3d5bf7
- git.kernel.org/stable/c/63648a7bd1a7599bcc2040a6d1792363ae4c2e1b
- git.kernel.org/stable/c/6c8aee0c8fcc6dda94315f7908e8fa9bc75abe75
- git.kernel.org/stable/c/7d21e0b1b41b21d628bf2afce777727bd4479aa5
- git.kernel.org/stable/c/8c6151b8e8dd2d98ad2cd725d26d1e103d989891
- git.kernel.org/stable/c/92b0888398e4ba51d93b618a6506781f4e3879c9
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.