CyberSecBulletin
CVE-2022-49017NVD status: Modified

Linux: Use After Free

CVE-2022-49017 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 a1ba595e35aa3afbe417ff0af353afb9f65559c0, 1daec0815655e110c6f206c5e777a4af8168ff58, e128190adb2edfd5042105b5d1ed4553f295f5ef 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.64% chance of exploitation within 30 days, higher than 51% of scored CVEs.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update Linux to a1ba595e35aa3afbe417ff0af353afb9f65559c0 or 1daec0815655e110c6f206c5e777a4af8168ff58 or e128190adb2edfd5042105b5d1ed4553f295f5ef or 3067bc61fcfe3081bf4807ce65560f499e895e77, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 5.10.158 or 5.15.82 or 6.0.12, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinuxfc1b6d6de2208774efd2a20bf0daddb02d18b1e0 up to, but not including, a1ba595e35aa3afbe417ff0af353afb9f65559c0; fc1b6d6de2208774efd2a20bf0daddb02d18b1e0 up to, but not including, 1daec0815655e110c6f206c5e777a4af8168ff58; fc1b6d6de2208774efd2a20bf0daddb02d18b1e0 up to, but not including, e128190adb2edfd5042105b5d1ed4553f295f5ef; fc1b6d6de2208774efd2a20bf0daddb02d18b1e0 up to, but not including, 3067bc61fcfe3081bf4807ce65560f499e895e77; 5.5a1ba595e35aa3afbe417ff0af353afb9f65559c0, 1daec0815655e110c6f206c5e777a4af8168ff58, e128190adb2edfd5042105b5d1ed4553f295f5ef, 3067bc61fcfe3081bf4807ce65560f499e895e77
LinuxLinux Kernel5.5 up to, but not including, 5.10.158; 5.11 up to, but not including, 5.15.82; 5.16 up to, but not including, 6.0.12; 6.15.10.158, 5.15.82, 6.0.12

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: tipc: re-fetch skb cb after tipc_msg_validate As the call trace shows, the original skb was freed in tipc_msg_validate(), and dereferencing the old skb cb would cause an use-after-free crash. BUG: KASAN: use-after-free in tipc_crypto_rcv_complete+0x1835/0x2240 [tipc] Call Trace: <IRQ> tipc_crypto_rcv_complete+0x1835/0x2240 [tipc] tipc_crypto_rcv+0xd32/0x1ec0 [tipc] tipc_rcv+0x744/0x1150 [tipc] ... Allocated by task 47078: kmem_cache_alloc_node+0x158/0x4d0 __alloc_skb+0x1c1/0x270 tipc_buf_acquire+0x1e/0xe0 [tipc] tipc_msg_create+0x33/0x1c0 [tipc] tipc_link_build_proto_msg+0x38a/0x2100 [tipc] tipc_link_timeout+0x8b8/0xef0 [tipc] tipc_node_timeout+0x2a1/0x960 [tipc] call_timer_fn+0x2d/0x1c0 ... Freed by task 47078: tipc_msg_validate+0x7b/0x440 [tipc] tipc_crypto_rcv_complete+0x4b5/0x2240 [tipc] tipc_crypto_rcv+0xd32/0x1ec0 [tipc] tipc_rcv+0x744/0x1150 [tipc] This patch fixes it by re-fetching the skb cb from the new allocated skb after calling tipc_msg_validate().

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.