CyberSecBulletin
CVE-2023-53596NVD status: Analyzed

Linux: Double Free

CVE-2023-53596 is a high-severity double 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 83e2ec36a92432e9445e853c12becbbae353b511, b9ef4b0aa91d2f9f5951faafdbbd47cf01799ec3, 297992e5c63528e603666e36081836204fc36ec9 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 83e2ec36a92432e9445e853c12becbbae353b511 or b9ef4b0aa91d2f9f5951faafdbbd47cf01799ec3 or 297992e5c63528e603666e36081836204fc36ec9 or 3bcc4c2a096e8342c8c719e595ce15de212694dd, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 5.10.258 or 5.15.209 or 6.1.53 or 6.4.16, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinuxa525a3ddeaca69f405d98442ab3c0746e53168dc up to, but not including, 83e2ec36a92432e9445e853c12becbbae353b511; a525a3ddeaca69f405d98442ab3c0746e53168dc up to, but not including, b9ef4b0aa91d2f9f5951faafdbbd47cf01799ec3; a525a3ddeaca69f405d98442ab3c0746e53168dc up to, but not including, 297992e5c63528e603666e36081836204fc36ec9; a525a3ddeaca69f405d98442ab3c0746e53168dc up to, but not including, 3bcc4c2a096e8342c8c719e595ce15de212694dd; a525a3ddeaca69f405d98442ab3c0746e53168dc up to, but not including, c8c426fae26086a0ca8ab6cc6da2de79810ec038; a525a3ddeaca69f405d98442ab3c0746e53168dc up to, but not including, 699fb50d99039a50e7494de644f96c889279aca3; 3.783e2ec36a92432e9445e853c12becbbae353b511, b9ef4b0aa91d2f9f5951faafdbbd47cf01799ec3, 297992e5c63528e603666e36081836204fc36ec9, 3bcc4c2a096e8342c8c719e595ce15de212694dd, c8c426fae26086a0ca8ab6cc6da2de79810ec038, 699fb50d99039a50e7494de644f96c889279aca3
LinuxLinux Kernel3.7 up to, but not including, 5.10.258; 5.11 up to, but not including, 5.15.209; 5.16 up to, but not including, 6.1.53; 6.2 up to, but not including, 6.4.16; 6.5 up to, but not including, 6.5.35.10.258, 5.15.209, 6.1.53, 6.4.16, 6.5.3

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: drivers: base: Free devm resources when unregistering a device In the current code, devres_release_all() only gets called if the device has a bus and has been probed. This leads to issues when using bus-less or driver-less devices where the device might never get freed if a managed resource holds a reference to the device. This is happening in the DRM framework for example. We should thus call devres_release_all() in the device_del() function to make sure that the device-managed actions are properly executed when the device is unregistered, even if it has neither a bus nor a driver. This is effectively the same change than commit 2f8d16a996da ("devres: release resources on device_del()") that got reverted by commit a525a3ddeaca ("driver core: free devres in device_release") over memory leaks concerns. This patch effectively combines the two commits mentioned above to release the resources both on device_del() and device_release() and get the best of both worlds.

Source: the CVE record as published by its numbering authority, via NVD and CVE.org.

The underlying weakness: Double Free

The product calls free() twice on the same memory address.

How developers prevent this class of flaw

  • Choose a language that provides automatic memory management.
  • Ensure that each allocation is freed only once. After freeing a chunk, set the pointer to NULL to ensure the pointer cannot be freed again. In complicated error conditions, be sure that clean-up routines respect the state of allocation properly. If the language is object oriented, ensure that object destructors delete each chunk of memory only once.
  • Use a static analysis tool to find double free instances.

More Double Free vulnerabilities (CWE-415)

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 Double Free vulnerabilities

Spotted an error? Tell us.