CyberSecBulletin
CVE-2022-48790NVD status: Modified

Linux: Use After Free

CVE-2022-48790 is a high-severity use after free vulnerability in Linux, with a CVSS 3.1 base score of 7.0 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 a25e460fbb0340488d119fb2e28fe3f829b7417e, 70356b756a58704e5c8818cb09da5854af87e765, 0ead57ceb21bbf15963b4874c2ac67143455382f 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.79% chance of exploitation within 30 days, higher than 57% of scored CVEs.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update Linux to a25e460fbb0340488d119fb2e28fe3f829b7417e or 70356b756a58704e5c8818cb09da5854af87e765 or 0ead57ceb21bbf15963b4874c2ac67143455382f or e043fb5a0336ee74614e26f0d9f36f1f5bb6d606, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 4.19.231 or 5.4.181 or 5.10.102 or 5.15.25, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinuxad22c355b707a8d8d48e282aadc01c0b0604b2e9 up to, but not including, a25e460fbb0340488d119fb2e28fe3f829b7417e; ad22c355b707a8d8d48e282aadc01c0b0604b2e9 up to, but not including, 70356b756a58704e5c8818cb09da5854af87e765; ad22c355b707a8d8d48e282aadc01c0b0604b2e9 up to, but not including, 0ead57ceb21bbf15963b4874c2ac67143455382f; ad22c355b707a8d8d48e282aadc01c0b0604b2e9 up to, but not including, e043fb5a0336ee74614e26f0d9f36f1f5bb6d606; ad22c355b707a8d8d48e282aadc01c0b0604b2e9 up to, but not including, 9e956a2596ae276124ef0d96829c013dd0faf861; ad22c355b707a8d8d48e282aadc01c0b0604b2e9 up to, but not including, 0fa0f99fc84e41057cbdd2efbfe91c6b2f47dd9d; 4.15a25e460fbb0340488d119fb2e28fe3f829b7417e, 70356b756a58704e5c8818cb09da5854af87e765, 0ead57ceb21bbf15963b4874c2ac67143455382f, e043fb5a0336ee74614e26f0d9f36f1f5bb6d606, 9e956a2596ae276124ef0d96829c013dd0faf861, 0fa0f99fc84e41057cbdd2efbfe91c6b2f47dd9d
LinuxLinux Kernelbefore 4.19.231; 4.20 up to, but not including, 5.4.181; 5.5 up to, but not including, 5.10.102; 5.11 up to, but not including, 5.15.25; 5.16 up to, but not including, 5.16.114.19.231, 5.4.181, 5.10.102, 5.15.25, 5.16.11

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
HighSuccess depends on conditions outside the attacker's control.
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:H/PR:L/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.

Scoring systemScoreSeverityScored by
CVSS 3.19.8CriticalCNA
CVSS 3.17.0HighNVD

Official description

In the Linux kernel, the following vulnerability has been resolved: nvme: fix a possible use-after-free in controller reset during load Unlike .queue_rq, in .submit_async_event drivers may not check the ctrl readiness for AER submission. This may lead to a use-after-free condition that was observed with nvme-tcp. The race condition may happen in the following scenario: 1. driver executes its reset_ctrl_work 2. -> nvme_stop_ctrl - flushes ctrl async_event_work 3. ctrl sends AEN which is received by the host, which in turn schedules AEN handling 4. teardown admin queue (which releases the queue socket) 5. AEN processed, submits another AER, calling the driver to submit 6. driver attempts to send the cmd ==> use-after-free In order to fix that, add ctrl state check to validate the ctrl is actually able to accept the AER submission. This addresses the above race in controller resets because the driver during teardown should: 1. change ctrl state to RESETTING 2. flush async_event_work (as well as other async work elements) So after 1,2, any other AER command will find the ctrl state to be RESETTING and bail out without submitting the AER.

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.