cve.bz

CVE-2021-47162 linux linux kernel: Use After Free

5.5 mediumEPSS 0.7%Fix available

Medium (5.5) in linux linux kernel. EPSS 0.7% estimated probability of exploitation activity in the next 30 days.

On this page
In the Linux kernel, the following vulnerability has been resolved: tipc: skb_linearize the head skb when reassembling msgs It's not a good idea to append the frag skb to a skb's frag_list if the frag_list already has skbs from elsewhere, such as this skb was created by pskb_copy() where the frag_list was cloned (all the skbs in it were skb_get'ed) and shared by multiple skbs. However, the new appended frag skb should have been only seen by the current skb. Otherwise, it will cause use after free crashes as this appended frag skb are seen by multiple skbs but it only got skb_get called once. The same thing happens with a skb updated by pskb_may_pull() with a skb_cloned skb. Li Shuang has reported quite a few crashes caused by this when doing testing over macvlan devices: [] kernel BUG at net/core/skbuff.c:1970! [] Call Trace: [] skb_clone+0x4d/0xb0 [] macvlan_broadcast+0xd8/0x160 [macvlan] [] macvlan_process_broadcast+0x148/0x150 [macvlan] [] process_one_work+0x1a7/0x360 [] worker_thread+0x30/0x390 [] kernel BUG at mm/usercopy.c:102! [] Call Trace: [] __check_heap_object+0xd3/0x100 [] __check_object_size+0xff/0x16b [] simple_copy_to_iter+0x1c/0x30 [] __skb_datagram_iter+0x7d/0x310 [] __skb_datagram_iter+0x2a5/0x310 [] skb_copy_datagram_iter+0x3b/0x90 [] tipc_recvmsg+0x14a/0x3a0 [tipc] [] ____sys_recvmsg+0x91/0x150 [] ___sys_recvmsg+0x7b/0xc0 [] kernel BUG at mm/slub.c:305! [] Call Trace: [] <IRQ> [] kmem_cache_free+0x3ff/0x400 [] __netif_receive_skb_core+0x12c/0xc40 [] ? kmem_cache_alloc+0x12e/0x270 [] netif_receive_skb_internal+0x3d/0xb0 [] ? get_rx_page_info+0x8e/0xa0 [be2net] [] be_poll+0x6ef/0xd00 [be2net] [] ? irq_exit+0x4f/0x100 [] net_rx_action+0x149/0x3b0 ... This patch is to fix it by linearizing the head skb if it has frag_list set in tipc_buf_append(). Note that we choose to do this before calling skb_unshare(), as __skb_linearize() will avoid skb_copy(). Also, we can not just drop the frag_list either as the early time.

Severity

CVSS 3.1

5.5 medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS
0.7% (unchanged from 0.7% a week ago; 0.7% 30 days ago) estimated probability of exploitation activity in the next 30 days; 56th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2024-06-26. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-416 Use After Free
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-47162 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-47162?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-47162?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-47162 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Linuxfrom 4.1.14 before 4.2
Linuxfrom 4.2.7 before 4.3
Linux4.3 and later

Fixed in

ProductRelease lineFixed in
Linux4.44.4.271
Linux4.94.9.271
Linux4.144.14.235
Linux4.194.19.193
Linux5.45.4.124
Linux5.105.10.42
Linux5.125.12.9
Linuxlater releases5.13

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14linux5.14.6-1DEBIAN-CVE-2021-47162
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2021-47162
Ubuntu18.04:LTSlinux4.15.0-151.157UBUNTU-CVE-2021-47162
Ubuntu18.04:LTSlinux-aws4.15.0-1109.116UBUNTU-CVE-2021-47162
Ubuntu18.04:LTSlinux-aws-5.45.4.0-1054.57~18.04.1UBUNTU-CVE-2021-47162
Ubuntu18.04:LTSlinux-azure-4.154.15.0-1121.134UBUNTU-CVE-2021-47162
Ubuntu18.04:LTSlinux-azure-5.45.4.0-1055.57~18.04.1UBUNTU-CVE-2021-47162
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 12 moreno fix listedUBUNTU-CVE-2021-47162
Ubuntu18.04:LTSlinux-gcp-4.154.15.0-1106.120UBUNTU-CVE-2021-47162
Ubuntu18.04:LTSlinux-gcp-5.45.4.0-1049.53~18.04.1UBUNTU-CVE-2021-47162
Ubuntu18.04:LTSlinux-hwe-5.45.4.0-80.90~18.04.1UBUNTU-CVE-2021-47162
Ubuntu18.04:LTSlinux-kvm4.15.0-1097.99UBUNTU-CVE-2021-47162
Ubuntu18.04:LTSlinux-oracle4.15.0-1078.86UBUNTU-CVE-2021-47162
32 more for Ubuntu in the JSON and on Ubuntu's page.
SUSELinux Enterprise High Availability Extension 12 SP5, Linux Enterprise Live Patching 12 SP5, Linux Enterprise Workstation Extension 12 SP5kernel-default4.12.14-122.216.1SUSE-SU-2024:1870-1
SUSELinux Enterprise High Availability Extension 12 SP5, Linux Enterprise Live Patching 12 SP5, Linux Enterprise Workstation Extension 12 SP5kernel-default4.12.14-122.219.1SUSE-SU-2024:2184-1
SUSELinux Enterprise Live Patching 12 SP5kernel-default4.12.14-122.237.1SUSE-SU-2024:4367-1
SUSELinux Enterprise Live Patching 12 SP5kgraft-patch-SLE12-SP5_Update_561-8.3.1SUSE-SU-2024:1870-1
SUSELinux Enterprise Live Patching 12 SP5kgraft-patch-SLE12-SP5_Update_571-8.3.1SUSE-SU-2024:2184-1
SUSELinux Enterprise Live Patching 12 SP5kgraft-patch-SLE12-SP5_Update_631-8.3.1SUSE-SU-2024:4367-1
SUSELinux Enterprise Real Time 12 SP5kernel-rt, kernel-syms-rt, kernel-rt_debug and 1 more4.12.14-10.182.1SUSE-SU-2024:1646-1
SUSELinux Enterprise Real Time 12 SP5kernel-rt, kernel-syms-rt, kernel-rt_debug and 1 more4.12.14-10.188.1SUSE-SU-2024:1983-1
SUSELinux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5kernel-azure, kernel-syms-azure, kernel-source-azure4.12.14-16.182.1SUSE-SU-2024:1643-1
SUSELinux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5kernel-azure, kernel-syms-azure, kernel-source-azure4.12.14-16.188.1SUSE-SU-2024:1979-1
SUSELinux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5kernel-syms, kernel-source, kernel-default4.12.14-122.216.1SUSE-SU-2024:1870-1
SUSELinux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5kernel-syms, kernel-source, kernel-default4.12.14-122.219.1SUSE-SU-2024:2184-1
3 more for SUSE in the JSON and on SUSE's page.

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE.

Red Hat

Red Hat rates this Low.

Red Hat's statement

This vulnerability is rated as having a Low impact because the TIPC protocol is not loaded or configured by default on Red Hat Enterprise Linux systems. Exploitation requires the tipc kernel module to be actively loaded and processing fragmented network traffic, which limits exposure to non-standard environments utilizing this protocol. Under these conditions, an attacker could trigger improper buffer handling during message reassembly, resulting in a denial of service through a kernel crash without compromising data confidentiality or integrity.

ProductPackageStateAdvisory
Migration Toolkit for Virtualizationmigration-toolkit-virtualization/mtv-deep-inspection-rhel9Fix deferred
Migration Toolkit for Virtualizationmigration-toolkit-virtualization/mtv-virt-v2v-rhel9Fix deferred
Red Hat Certification Program for Red Hat Enterprise Linux 9rhcertification/redhat-certification-baremetalFix deferred
Red Hat Certification Program for Red Hat Enterprise Linux 9rhcertification/redhat-certification-system-ai-10Fix deferred
Red Hat Certification Program for Red Hat Enterprise Linux 9rhcertification/redhat-certification-system-ai-9Fix deferred
Red Hat Enterprise Linux 10rhel10-eus/rhel-10.0-bootcFix deferred
Red Hat Enterprise Linux 10rhel10-eus/rhel-10.2-bootcFix deferred
Red Hat Enterprise Linux 10rhel10/rhel-bootcFix deferred
Red Hat Enterprise Linux 6kernelNot affected
Red Hat Enterprise Linux 7kernelNot affected
Red Hat Enterprise Linux 7kernel-rtNot affected
Red Hat Enterprise Linux 8kernelFix deferred
Red Hat Enterprise Linux 8kernel-rtAffected
Red Hat Enterprise Linux 9kernelNot affected
Red Hat Enterprise Linux 9kernel-rtNot affected
Red Hat Enterprise Linux 9rhel9-eus/rhel-9.4-bootcFix deferred
Red Hat Enterprise Linux 9rhel9-eus/rhel-9.6-bootcFix deferred
Red Hat Enterprise Linux 9rhel9-eus/rhel-9.8-bootcFix deferred
Red Hat Enterprise Linux 9rhel9/rhel-bootcFix deferred
Red Hat OpenShift Container Platform 4openshift4/driver-toolkit-rhel9Fix deferred
7 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-47162.

References

Check your stackJSON