Linux: Use After Free
CVE-2023-53587 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 372c5ee537b8366b64b691ba29e9335525e1655e, 2702b67f59d455072a08dc40312f9b090d4dec04, 2399b1fda025e939b6fb1ac94505bcf718534e65 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 372c5ee537b8366b64b691ba29e9335525e1655e or 2702b67f59d455072a08dc40312f9b090d4dec04 or 2399b1fda025e939b6fb1ac94505bcf718534e65 or 1c99f65d6af2a454bfd5207b4f6a97c8474a1191, whichever matches your release line, or a later version.
- Update Linux Kernel to 4.14.315 or 4.19.283 or 5.4.243 or 5.10.180, whichever matches your release line, or a later version.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Linux | Linux | 15693458c4bc0693fd63a50d60f35b628fcf4e29 up to, but not including, 372c5ee537b8366b64b691ba29e9335525e1655e; 15693458c4bc0693fd63a50d60f35b628fcf4e29 up to, but not including, 2702b67f59d455072a08dc40312f9b090d4dec04; 15693458c4bc0693fd63a50d60f35b628fcf4e29 up to, but not including, 2399b1fda025e939b6fb1ac94505bcf718534e65; 15693458c4bc0693fd63a50d60f35b628fcf4e29 up to, but not including, 1c99f65d6af2a454bfd5207b4f6a97c8474a1191; 15693458c4bc0693fd63a50d60f35b628fcf4e29 up to, but not including, c63741e872fcfb10e153517750f7908f0c00f60d; 15693458c4bc0693fd63a50d60f35b628fcf4e29 up to, but not including, d9834abd8b24d1fe8092859e436fe1e0fd467c61; 15693458c4bc0693fd63a50d60f35b628fcf4e29 up to, but not including, fc6858b7f8e1221f62ce8c6ff8a13a349c32cd76; 15693458c4bc0693fd63a50d60f35b628fcf4e29 up to, but not including, 0a65165bd24ee9231191597b7c232376fcd70cdb; and 2 more ranges | 372c5ee537b8366b64b691ba29e9335525e1655e, 2702b67f59d455072a08dc40312f9b090d4dec04, 2399b1fda025e939b6fb1ac94505bcf718534e65, 1c99f65d6af2a454bfd5207b4f6a97c8474a1191, c63741e872fcfb10e153517750f7908f0c00f60d, d9834abd8b24d1fe8092859e436fe1e0fd467c61 |
| Linux | Linux Kernel | 3.10 up to, but not including, 4.14.315; 4.15 up to, but not including, 4.19.283; 4.20 up to, but not including, 5.4.243; 5.5 up to, but not including, 5.10.180; 5.11 up to, but not including, 5.15.111; 5.16 up to, but not including, 6.1.28; 6.2 up to, but not including, 6.2.15; 6.3 up to, but not including, 6.3.2 | 4.14.315, 4.19.283, 5.4.243, 5.10.180, 5.15.111, 6.1.28 |
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.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.8 | High | CNA |
| CVSS 3.1 | 7.8 | High | NVD |
Official description
In the Linux kernel, the following vulnerability has been resolved: ring-buffer: Sync IRQ works before buffer destruction If something was written to the buffer just before destruction, it may be possible (maybe not in a real system, but it did happen in ARCH=um with time-travel) to destroy the ringbuffer before the IRQ work ran, leading this KASAN report (or a crash without KASAN): BUG: KASAN: slab-use-after-free in irq_work_run_list+0x11a/0x13a Read of size 8 at addr 000000006d640a48 by task swapper/0 CPU: 0 PID: 0 Comm: swapper Tainted: G W O 6.3.0-rc1 #7 Stack: 60c4f20f 0c203d48 41b58ab3 60f224fc 600477fa 60f35687 60c4f20f 601273dd 00000008 6101eb00 6101eab0 615be548 Call Trace: [<60047a58>] show_stack+0x25e/0x282 [<60c609e0>] dump_stack_lvl+0x96/0xfd [<60c50d4c>] print_report+0x1a7/0x5a8 [<603078d3>] kasan_report+0xc1/0xe9 [<60308950>] __asan_report_load8_noabort+0x1b/0x1d [<60232844>] irq_work_run_list+0x11a/0x13a [<602328b4>] irq_work_tick+0x24/0x34 [<6017f9dc>] update_process_times+0x162/0x196 [<6019f335>] tick_sched_handle+0x1a4/0x1c3 [<6019fd9e>] tick_sched_timer+0x79/0x10c [<601812b9>] __hrtimer_run_queues.constprop.0+0x425/0x695 [<60182913>] hrtimer_interrupt+0x16c/0x2c4 [<600486a3>] um_timer+0x164/0x183 [...] Allocated by task 411: save_stack_trace+0x99/0xb5 stack_trace_save+0x81/0x9b kasan_save_stack+0x2d/0x54 kasan_set_track+0x34/0x3e kasan_save_alloc_info+0x25/0x28 ____kasan_kmalloc+0x8b/0x97 __kasan_kmalloc+0x10/0x12 __kmalloc+0xb2/0xe8 load_elf_phdrs+0xee/0x182 [...] The buggy address belongs to the object at 000000006d640800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 584 bytes inside of freed 1024-byte region [000000006d640800, 000000006d640c00) Add the appropriate irq_work_sync() so the work finishes before the buffers are destroyed. Prior to the commit in the Fixes tag below, there was only a single global IRQ work, so this issue didn't exist.
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/0a65165bd24ee9231191597b7c232376fcd70cdb
- git.kernel.org/stable/c/1c99f65d6af2a454bfd5207b4f6a97c8474a1191
- git.kernel.org/stable/c/2399b1fda025e939b6fb1ac94505bcf718534e65
- git.kernel.org/stable/c/2702b67f59d455072a08dc40312f9b090d4dec04
- git.kernel.org/stable/c/372c5ee537b8366b64b691ba29e9335525e1655e
- git.kernel.org/stable/c/675751bb20634f981498c7d66161584080cc061e
- git.kernel.org/stable/c/c63741e872fcfb10e153517750f7908f0c00f60d
- git.kernel.org/stable/c/d9834abd8b24d1fe8092859e436fe1e0fd467c61
- git.kernel.org/stable/c/fc6858b7f8e1221f62ce8c6ff8a13a349c32cd76
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.