CyberSecBulletin
CVE-2022-48991NVD status: Modified

Linux: Use After Free

CVE-2022-48991 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 275c626c131cfe141beeb6c575e31fa53d32da19, c23105673228c349739e958fa33955ed8faddcaf, ff2a1a6f869650aec99e9d070b5ab625bfbc5bc3 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.25% 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 275c626c131cfe141beeb6c575e31fa53d32da19 or c23105673228c349739e958fa33955ed8faddcaf or ff2a1a6f869650aec99e9d070b5ab625bfbc5bc3 or 5ffc2a75534d9d74d49760f983f8eb675fa63d69, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 4.9.337 or 4.14.303 or 4.19.270 or 5.4.227, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinuxf3f0e1d2150b2b99da2cbdfaad000089efe9bf30 up to, but not including, 275c626c131cfe141beeb6c575e31fa53d32da19; f3f0e1d2150b2b99da2cbdfaad000089efe9bf30 up to, but not including, c23105673228c349739e958fa33955ed8faddcaf; f3f0e1d2150b2b99da2cbdfaad000089efe9bf30 up to, but not including, ff2a1a6f869650aec99e9d070b5ab625bfbc5bc3; f3f0e1d2150b2b99da2cbdfaad000089efe9bf30 up to, but not including, 5ffc2a75534d9d74d49760f983f8eb675fa63d69; f3f0e1d2150b2b99da2cbdfaad000089efe9bf30 up to, but not including, 7f445ca2e0e59c7971d0b7b853465e50844ab596; f3f0e1d2150b2b99da2cbdfaad000089efe9bf30 up to, but not including, 1a3f8c6cd29d9078cc81b29d39d0e9ae1d6a03c3; f3f0e1d2150b2b99da2cbdfaad000089efe9bf30 up to, but not including, 5450535901d89a5dcca5fbbc59a24fe89caeb465; f3f0e1d2150b2b99da2cbdfaad000089efe9bf30 up to, but not including, f268f6cf875f3220afc77bdd0bf1bb136eb54db9; and 1 more ranges275c626c131cfe141beeb6c575e31fa53d32da19, c23105673228c349739e958fa33955ed8faddcaf, ff2a1a6f869650aec99e9d070b5ab625bfbc5bc3, 5ffc2a75534d9d74d49760f983f8eb675fa63d69, 7f445ca2e0e59c7971d0b7b853465e50844ab596, 1a3f8c6cd29d9078cc81b29d39d0e9ae1d6a03c3
LinuxLinux Kernel4.8 up to, but not including, 4.9.337; 4.10 up to, but not including, 4.14.303; 4.15 up to, but not including, 4.19.270; 4.20 up to, but not including, 5.4.227; 5.5 up to, but not including, 5.10.159; 5.11 up to, but not including, 5.15.83; 5.16 up to, but not including, 6.0.13; 6.14.9.337, 4.14.303, 4.19.270, 5.4.227, 5.10.159, 5.15.83

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.18.8HighCNA
CVSS 3.17.8HighNVD

Official description

In the Linux kernel, the following vulnerability has been resolved: mm/khugepaged: invoke MMU notifiers in shmem/file collapse paths Any codepath that zaps page table entries must invoke MMU notifiers to ensure that secondary MMUs (like KVM) don't keep accessing pages which aren't mapped anymore. Secondary MMUs don't hold their own references to pages that are mirrored over, so failing to notify them can lead to page use-after-free. I'm marking this as addressing an issue introduced in commit f3f0e1d2150b ("khugepaged: add support of collapse for tmpfs/shmem pages"), but most of the security impact of this only came in commit 27e1f8273113 ("khugepaged: enable collapse pmd for pte-mapped THP"), which actually omitted flushes for the removal of present PTEs, not just for the removal of empty page tables.

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.