CyberSecBulletin
CVE-2023-53515NVD status: Analyzed

Linux: Use After Free

CVE-2023-53515 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 97a2d55ead76358245b446efd87818e919196d7a, b788ad3b2468512339c05f23692e36860264e674, 3ff54d904fafabd0912796785e53cce4e69ca123 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.15% 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 97a2d55ead76358245b446efd87818e919196d7a or b788ad3b2468512339c05f23692e36860264e674 or 3ff54d904fafabd0912796785e53cce4e69ca123 or 5b7d5c2dd664eb8b9a06ecbc06e28d39359c422e, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 4.19.293 or 5.4.255 or 5.10.192 or 5.15.128, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinux7eb781b1bbb7136fe78fb8c28c1c223c61fa32b5 up to, but not including, 97a2d55ead76358245b446efd87818e919196d7a; 7eb781b1bbb7136fe78fb8c28c1c223c61fa32b5 up to, but not including, b788ad3b2468512339c05f23692e36860264e674; 7eb781b1bbb7136fe78fb8c28c1c223c61fa32b5 up to, but not including, 3ff54d904fafabd0912796785e53cce4e69ca123; 7eb781b1bbb7136fe78fb8c28c1c223c61fa32b5 up to, but not including, 5b7d5c2dd664eb8b9a06ecbc06e28d39359c422e; 7eb781b1bbb7136fe78fb8c28c1c223c61fa32b5 up to, but not including, af5818c35173e096085c6ae2e3aac605d3d15e41; 7eb781b1bbb7136fe78fb8c28c1c223c61fa32b5 up to, but not including, 2dcb368fe5a8eee498ca75c93a18ce2f3b0d6a8e; 7eb781b1bbb7136fe78fb8c28c1c223c61fa32b5 up to, but not including, 55c91fedd03d7b9cf0c5199b2eb12b9b8e95281a; 4.1597a2d55ead76358245b446efd87818e919196d7a, b788ad3b2468512339c05f23692e36860264e674, 3ff54d904fafabd0912796785e53cce4e69ca123, 5b7d5c2dd664eb8b9a06ecbc06e28d39359c422e, af5818c35173e096085c6ae2e3aac605d3d15e41, 2dcb368fe5a8eee498ca75c93a18ce2f3b0d6a8e
LinuxLinux Kernel4.15.1 up to, but not including, 4.19.293; 4.20 up to, but not including, 5.4.255; 5.5 up to, but not including, 5.10.192; 5.11 up to, but not including, 5.15.128; 5.16 up to, but not including, 6.1.47; 6.2 up to, but not including, 6.4.12; 4.15; 6.54.19.293, 5.4.255, 5.10.192, 5.15.128, 6.1.47, 6.4.12

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: virtio-mmio: don't break lifecycle of vm_dev vm_dev has a separate lifecycle because it has a 'struct device' embedded. Thus, having a release callback for it is correct. Allocating the vm_dev struct with devres totally breaks this protection, though. Instead of waiting for the vm_dev release callback, the memory is freed when the platform_device is removed. Resulting in a use-after-free when finally the callback is to be called. To easily see the problem, compile the kernel with CONFIG_DEBUG_KOBJECT_RELEASE and unbind with sysfs. The fix is easy, don't use devres in this case. Found during my research about object lifetime problems.

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

References

Recent Use After Free vulnerabilities

Spotted an error? Tell us.