CyberSecBulletin
CVE-2023-53537NVD status: Modified

Linux: Use After Free

CVE-2023-53537 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 b2f423fda64fb49213aa0ed5056079cf295a5df2, 9a7f63283af6befc0f91d549f4f6917dff7479a9, 7d058f0ab161437369ad6e45a4b67c2886e71373 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.16% 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 b2f423fda64fb49213aa0ed5056079cf295a5df2 or 9a7f63283af6befc0f91d549f4f6917dff7479a9 or 7d058f0ab161437369ad6e45a4b67c2886e71373 or 97ec6f1788cc6bee3f8c89cb908e1a2a1cd859bb, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 5.10.180 or 5.15.111 or 6.1.28 or 6.2.15, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinux0b20fcec8651569935a10afe03fedc0b812d044e up to, but not including, b2f423fda64fb49213aa0ed5056079cf295a5df2; 0b20fcec8651569935a10afe03fedc0b812d044e up to, but not including, 9a7f63283af6befc0f91d549f4f6917dff7479a9; 0b20fcec8651569935a10afe03fedc0b812d044e up to, but not including, 7d058f0ab161437369ad6e45a4b67c2886e71373; 0b20fcec8651569935a10afe03fedc0b812d044e up to, but not including, 97ec6f1788cc6bee3f8c89cb908e1a2a1cd859bb; 0b20fcec8651569935a10afe03fedc0b812d044e up to, but not including, af4ce124d7bd74cb839bbdaccffbb416771a56b5; 0b20fcec8651569935a10afe03fedc0b812d044e up to, but not including, 5cdb422c839134273866208dad5360835ddb9794; 5.5b2f423fda64fb49213aa0ed5056079cf295a5df2, 9a7f63283af6befc0f91d549f4f6917dff7479a9, 7d058f0ab161437369ad6e45a4b67c2886e71373, 97ec6f1788cc6bee3f8c89cb908e1a2a1cd859bb, af4ce124d7bd74cb839bbdaccffbb416771a56b5, 5cdb422c839134273866208dad5360835ddb9794
LinuxLinux Kernel5.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.25.10.180, 5.15.111, 6.1.28, 6.2.15, 6.3.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: fix to avoid use-after-free for cached IPU bio xfstest generic/019 reports a bug: kernel BUG at mm/filemap.c:1619! RIP: 0010:folio_end_writeback+0x8a/0x90 Call Trace: end_page_writeback+0x1c/0x60 f2fs_write_end_io+0x199/0x420 bio_endio+0x104/0x180 submit_bio_noacct+0xa5/0x510 submit_bio+0x48/0x80 f2fs_submit_write_bio+0x35/0x300 f2fs_submit_merged_ipu_write+0x2a0/0x2b0 f2fs_write_single_data_page+0x838/0x8b0 f2fs_write_cache_pages+0x379/0xa30 f2fs_write_data_pages+0x30c/0x340 do_writepages+0xd8/0x1b0 __writeback_single_inode+0x44/0x370 writeback_sb_inodes+0x233/0x4d0 __writeback_inodes_wb+0x56/0xf0 wb_writeback+0x1dd/0x2d0 wb_workfn+0x367/0x4a0 process_one_work+0x21d/0x430 worker_thread+0x4e/0x3c0 kthread+0x103/0x130 ret_from_fork+0x2c/0x50 The root cause is: after cp_error is set, f2fs_submit_merged_ipu_write() in f2fs_write_single_data_page() tries to flush IPU bio in cache, however f2fs_submit_merged_ipu_write() missed to check validity of @bio parameter, result in submitting random cached bio which belong to other IO context, then it will cause use-after-free issue, fix it by adding additional validity check.

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. Record last changed materially (score, affected products, status or references).

References

Recent Use After Free vulnerabilities

Spotted an error? Tell us.