CyberSecBulletin
CVE-2023-52457NVD status: Modified

Linux: Use After Free

CVE-2023-52457 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 b502fb43f7fb55aaf07f6092ab44657595214b93, bc57f3ef8a9eb0180606696f586a6dcfaa175ed0, 828cd829483f0cda920710997aed79130b0af690 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.23% 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 b502fb43f7fb55aaf07f6092ab44657595214b93 or bc57f3ef8a9eb0180606696f586a6dcfaa175ed0 or 828cd829483f0cda920710997aed79130b0af690 or d74173bda29aba58f822175d983d07c8ed335494, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 5.4.268 or 5.10.209 or 5.15.148 or 6.1.75, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinux2d66412563ef8953e2bac2d98d2d832b3f3f49cd up to, but not including, b502fb43f7fb55aaf07f6092ab44657595214b93; d833cba201adf9237168e19f0d76e4d7aa69f303 up to, but not including, bc57f3ef8a9eb0180606696f586a6dcfaa175ed0; e0db709a58bdeb8966890882261a3f8438c5c9b7 up to, but not including, 828cd829483f0cda920710997aed79130b0af690; e3f0c638f428fd66b5871154b62706772045f91a up to, but not including, d74173bda29aba58f822175d983d07c8ed335494; e3f0c638f428fd66b5871154b62706772045f91a up to, but not including, 887a558d0298d36297daea039954c39940228d9b; e3f0c638f428fd66b5871154b62706772045f91a up to, but not including, 95e4e0031effad9837af557ecbfd4294a4d8aeee; e3f0c638f428fd66b5871154b62706772045f91a up to, but not including, ad90d0358bd3b4554f243a425168fc7cebe7d04e; 02eed6390dbe61115f3e3f63829c95c611aee67b; and 5 more rangesb502fb43f7fb55aaf07f6092ab44657595214b93, bc57f3ef8a9eb0180606696f586a6dcfaa175ed0, 828cd829483f0cda920710997aed79130b0af690, d74173bda29aba58f822175d983d07c8ed335494, 887a558d0298d36297daea039954c39940228d9b, 95e4e0031effad9837af557ecbfd4294a4d8aeee
LinuxLinux Kernel5.4.225 up to, but not including, 5.4.268; 5.10.156 up to, but not including, 5.10.209; 5.15.80 up to, but not including, 5.15.148; 6.0.10 up to, but not including, 6.1.75; 6.2 up to, but not including, 6.6.14; 6.7 up to, but not including, 6.7.25.4.268, 5.10.209, 5.15.148, 6.1.75, 6.6.14, 6.7.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.

Official description

In the Linux kernel, the following vulnerability has been resolved: serial: 8250: omap: Don't skip resource freeing if pm_runtime_resume_and_get() failed Returning an error code from .remove() makes the driver core emit the little helpful error message: remove callback returned a non-zero value. This will be ignored. and then remove the device anyhow. So all resources that were not freed are leaked in this case. Skipping serial8250_unregister_port() has the potential to keep enough of the UART around to trigger a use-after-free. So replace the error return (and with it the little helpful error message) by a more useful error message and continue to cleanup.

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.