CyberSecBulletin
CVE-2022-48742NVD status: Modified

Linux: Use After Free

CVE-2022-48742 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 2cf180360d66bd657e606c1217e0e668e6faa303, 7d9211678c0f0624f74cdff36117ab8316697bb8, a01e60a1ec6bef9be471fb7182a33c6d6f124e93 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.24% 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 2cf180360d66bd657e606c1217e0e668e6faa303 or 7d9211678c0f0624f74cdff36117ab8316697bb8 or a01e60a1ec6bef9be471fb7182a33c6d6f124e93 or bd43771ee9759dd9dfae946bff190e2c5a120de5, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 4.9.300 or 4.14.265 or 4.19.228 or 5.4.177, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinuxba7d49b1f0f8e5f24294a880ed576964059af5ef up to, but not including, 2cf180360d66bd657e606c1217e0e668e6faa303; ba7d49b1f0f8e5f24294a880ed576964059af5ef up to, but not including, 7d9211678c0f0624f74cdff36117ab8316697bb8; ba7d49b1f0f8e5f24294a880ed576964059af5ef up to, but not including, a01e60a1ec6bef9be471fb7182a33c6d6f124e93; ba7d49b1f0f8e5f24294a880ed576964059af5ef up to, but not including, bd43771ee9759dd9dfae946bff190e2c5a120de5; ba7d49b1f0f8e5f24294a880ed576964059af5ef up to, but not including, 3bbe2019dd12b8d13671ee6cda055d49637b4c39; ba7d49b1f0f8e5f24294a880ed576964059af5ef up to, but not including, def5e7070079b2a214b3b1a2fbec623e6fbfe34a; ba7d49b1f0f8e5f24294a880ed576964059af5ef up to, but not including, 36a9a0aee881940476b254e0352581401b23f210; ba7d49b1f0f8e5f24294a880ed576964059af5ef up to, but not including, c6f6f2444bdbe0079e41914a35081530d0409963; and 1 more ranges2cf180360d66bd657e606c1217e0e668e6faa303, 7d9211678c0f0624f74cdff36117ab8316697bb8, a01e60a1ec6bef9be471fb7182a33c6d6f124e93, bd43771ee9759dd9dfae946bff190e2c5a120de5, 3bbe2019dd12b8d13671ee6cda055d49637b4c39, def5e7070079b2a214b3b1a2fbec623e6fbfe34a
LinuxLinux Kernel3.14 up to, but not including, 4.9.300; 4.10 up to, but not including, 4.14.265; 4.15 up to, but not including, 4.19.228; 4.20 up to, but not including, 5.4.177; 5.5 up to, but not including, 5.10.97; 5.11 up to, but not including, 5.15.20; 5.16 up to, but not including, 5.16.64.9.300, 4.14.265, 4.19.228, 5.4.177, 5.10.97, 5.15.20

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

Official description

In the Linux kernel, the following vulnerability has been resolved: rtnetlink: make sure to refresh master_dev/m_ops in __rtnl_newlink() While looking at one unrelated syzbot bug, I found the replay logic in __rtnl_newlink() to potentially trigger use-after-free. It is better to clear master_dev and m_ops inside the loop, in case we have to replay it.

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.