tipc: re-fetch skb cb after tipc_msg_validate
Published Oct 21, 2024
8.8
HIGHCVSS 3.1
EPSS 0.64%
Description
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().
Affected products
-
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version
-
- Version 5.5StatusaffectedConstraints-
- Version 0StatusunaffectedConstraints<5.5
- Version 5.10.158StatusunaffectedConstraints<=5.10.*
- Version 5.15.82StatusunaffectedConstraints<=5.15.*
- Version 6.0.12StatusunaffectedConstraints<=6.0.*
- Version 6.1StatusunaffectedConstraints<=*
- Version
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
- ≥ 5.5 · < 5.10.158
- ≥ 5.11 · < 5.15.82
- ≥ 5.16 · < 6.0.12
- 6.1
- 6.1
- 6.1
- 6.1
- 6.1
- 6.1
- 6.1
No data.
Red Hat Enterprise Linux 6
kernel
Not affected
Red Hat Enterprise Linux 7
kernel
Not affected
Red Hat Enterprise Linux 7
kernel-rt
Not affected
Red Hat Enterprise Linux 8
kernel
Out of support scope
Red Hat Enterprise Linux 8
kernel-rt
Out of support scope
Red Hat Enterprise Linux 9
kernel
Affected
Red Hat Enterprise Linux 9
kernel-rt
Affected
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 6 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 7 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 7 | kernel-rt | Not affected | n/a |
| Red Hat Enterprise Linux 8 | kernel | Out of support scope | n/a |
| Red Hat Enterprise Linux 8 | kernel-rt | Out of support scope | n/a |
| Red Hat Enterprise Linux 9 | kernel | Affected | n/a |
| Red Hat Enterprise Linux 9 | kernel-rt | Affected | n/a |
No package ranges for this CVE.
Remediation
Red Hat statement
This issue is considered to be a moderate impact flaw, as the reproducer for this issue is not available to cause an Intigrity (I:L) threat. The bug could happen only if TIPC encryption being used. Being used as Inter-process Communication (IPC) service for cluster-wide operation. Actual only for latest versions of Red Hat Enterprise Linux 8 and Red Hat Enterprise Linux 9.
References (10)
- https://access.redhat.com/security/cve/CVE-2022-49017 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=2320674 Issue Tracking
- https://euvd.enisa.europa.eu/vulnerability/EUVD-2022-53901 Advisory
- https://git.kernel.org/stable/c/1daec0815655e110c6f206c5e777a4af8168ff58 Patch
- https://git.kernel.org/stable/c/3067bc61fcfe3081bf4807ce65560f499e895e77 Patch
- https://git.kernel.org/stable/c/a1ba595e35aa3afbe417ff0af353afb9f65559c0 Patch
- https://git.kernel.org/stable/c/e128190adb2edfd5042105b5d1ed4553f295f5ef Patch
- https://lore.kernel.org/linux-cve-announce/2024102153-CVE-2022-49017-ae90@gregkh/T
- https://nvd.nist.gov/vuln/detail/CVE-2022-49017
- https://www.cve.org/CVERecord?id=CVE-2022-49017
Change history (0)
No recorded changes yet.