CyberSecBulletin
CVE-2023-52852NVD status: Modified

Linux: Use After Free

CVE-2023-52852 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 8c4504cc0c64862740a6acb301e0cfa59580dbc5, 9375ea7f269093d7c884857ae1f47633a91f429c, 932ddb5c29e884cc6fac20417ece72ba4a35c401 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.24% chance of exploitation within 30 days, which is low compared with other CVEs.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update Linux to 8c4504cc0c64862740a6acb301e0cfa59580dbc5 or 9375ea7f269093d7c884857ae1f47633a91f429c or 932ddb5c29e884cc6fac20417ece72ba4a35c401 or 9d065aa52b6ee1b06f9c4eca881c9b4425a12ba2, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 5.15.139 or 6.1.63 or 6.5.12 or 6.6.2, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinux6ce19aff0b8cd386860855185c6cd79337fc4d2b up to, but not including, 8c4504cc0c64862740a6acb301e0cfa59580dbc5; 6ce19aff0b8cd386860855185c6cd79337fc4d2b up to, but not including, 9375ea7f269093d7c884857ae1f47633a91f429c; 6ce19aff0b8cd386860855185c6cd79337fc4d2b up to, but not including, 932ddb5c29e884cc6fac20417ece72ba4a35c401; 6ce19aff0b8cd386860855185c6cd79337fc4d2b up to, but not including, 9d065aa52b6ee1b06f9c4eca881c9b4425a12ba2; 6ce19aff0b8cd386860855185c6cd79337fc4d2b up to, but not including, b0327c84e91a0f4f0abced8cb83ec86a7083f086; a23706426da9b611be5beae0f3faa260fb453b4e; 5.13.19 up to, but not including, 5.14; 5.148c4504cc0c64862740a6acb301e0cfa59580dbc5, 9375ea7f269093d7c884857ae1f47633a91f429c, 932ddb5c29e884cc6fac20417ece72ba4a35c401, 9d065aa52b6ee1b06f9c4eca881c9b4425a12ba2, b0327c84e91a0f4f0abced8cb83ec86a7083f086, 5.14
LinuxLinux Kernel5.13.19 up to, but not including, 5.15.139; 5.16 up to, but not including, 6.1.63; 6.2 up to, but not including, 6.5.12; 6.6 up to, but not including, 6.6.25.15.139, 6.1.63, 6.5.12, 6.6.2

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 systemScoreSeverityScored by
CVSS 3.17.8HighCNA
CVSS 3.17.8HighNVD

Official description

In the Linux kernel, the following vulnerability has been resolved: f2fs: compress: fix to avoid use-after-free on dic Call trace: __memcpy+0x128/0x250 f2fs_read_multi_pages+0x940/0xf7c f2fs_mpage_readpages+0x5a8/0x624 f2fs_readahead+0x5c/0x110 page_cache_ra_unbounded+0x1b8/0x590 do_sync_mmap_readahead+0x1dc/0x2e4 filemap_fault+0x254/0xa8c f2fs_filemap_fault+0x2c/0x104 __do_fault+0x7c/0x238 do_handle_mm_fault+0x11bc/0x2d14 do_mem_abort+0x3a8/0x1004 el0_da+0x3c/0xa0 el0t_64_sync_handler+0xc4/0xec el0t_64_sync+0x1b4/0x1b8 In f2fs_read_multi_pages(), once f2fs_decompress_cluster() was called if we hit cached page in compress_inode's cache, dic may be released, it needs break the loop rather than continuing it, in order to avoid accessing invalid dic pointer.

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.

More Use After Free vulnerabilities (CWE-416)

Timeline

  1. CVE record published.
  2. CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
  3. Record last changed materially (score, affected products, status or references).

References

Recent Use After Free vulnerabilities

Spotted an error? Tell us.