CVE-2021-47162

EUVD-2021-33810
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.
ProviderTypeBase ScoreAtk. VectorAtk. ComplexityPriv. RequiredVector
NISTPrimary
5.5 MEDIUM
LOCAL
LOW
LOW
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Base Score
CVSS 3.x
EPSS Score
Percentile: 2%
Affected Products (NVD)
VendorProductVersion
linuxlinux_kernel
4.3 ≤
𝑥
< 4.4.271
linuxlinux_kernel
4.5 ≤
𝑥
< 4.9.271
linuxlinux_kernel
4.10 ≤
𝑥
< 4.14.235
linuxlinux_kernel
4.15 ≤
𝑥
< 4.19.193
linuxlinux_kernel
4.20 ≤
𝑥
< 5.4.124
linuxlinux_kernel
5.5 ≤
𝑥
< 5.10.42
linuxlinux_kernel
5.11 ≤
𝑥
< 5.12.9
linuxlinux_kernel
5.13:rc1
linuxlinux_kernel
5.13:rc2
linuxlinux_kernel
5.13:rc3
𝑥
= Vulnerable software versions
Debian logo
Debian Releases
Debian Product
Codename
linux
bookworm
6.1.106-3
fixed
bookworm (security)
6.1.112-1
fixed
bullseye
5.10.223-1
fixed
bullseye (security)
5.10.226-1
fixed
sid
6.11.6-1
fixed
trixie
6.11.5-1
fixed
Ubuntu logo
Ubuntu Releases
Ubuntu Product
Codename
linux
bionic
pending
focal
Fixed 5.4.0-80.90
released
jammy
not-affected
mantic
not-affected
noble
not-affected
trusty
not-affected
xenial
ignored
linux-allwinner-5.19
focal
dne
jammy
ignored
mantic
dne
noble
dne
linux-aws
bionic
pending
focal
Fixed 5.4.0-1054.57
released
jammy
not-affected
mantic
not-affected
noble
not-affected
trusty
ignored
xenial
ignored
linux-aws-5.0
bionic
ignored
focal
dne
jammy
dne
mantic
dne
noble
dne
linux-aws-5.11
focal
ignored
jammy
dne
mantic
dne
noble
dne
linux-aws-5.13
focal
ignored
jammy
dne
mantic
dne
noble
dne
linux-aws-5.15
focal
not-affected
jammy
dne
mantic
dne
noble
dne
linux-aws-5.19
focal
dne
jammy
ignored
mantic
dne
noble
dne
linux-aws-5.3
bionic
ignored
focal
dne
jammy
dne
mantic
dne
noble
dne
linux-aws-5.4
bionic
pending
focal
dne
jammy
dne
mantic
dne
noble
dne
linux-aws-5.8
focal
ignored
jammy
dne
mantic
dne
noble
dne
linux-aws-6.2
focal
dne
jammy
ignored
mantic
dne
noble
dne
linux-aws-6.5
focal
dne
jammy
not-affected
mantic
dne
noble
dne
linux-aws-fips
bionic
dne
focal
dne
jammy
dne
mantic
dne
noble
dne
trusty
dne
xenial
dne
linux-aws-hwe
focal
dne
jammy
dne
mantic
dne
noble
dne
xenial
Fixed 4.15.0-1109.116~16.04.1
released
linux-azure
bionic
ignored
focal
Fixed 5.4.0-1055.57
released
jammy
not-affected
mantic
not-affected
noble
not-affected
trusty
Fixed 4.15.0-1121.134~14.04.1
released
xenial
Fixed 4.15.0-1121.134~16.04.1
released
linux-azure-4.15
bionic
pending
focal
dne
jammy
dne
mantic
dne
noble
dne
linux-azure-5.11
focal
ignored
jammy
dne
mantic
dne
noble
dne
linux-azure-5.13
focal
ignored
jammy
dne
mantic
dne
noble
dne
linux-azure-5.15
focal
not-affected
jammy
dne
mantic
dne
noble
dne
linux-azure-5.19
focal
dne
jammy
ignored
mantic
dne
noble
dne
linux-azure-5.3
bionic
ignored
focal
dne
jammy
dne
mantic
dne
noble
dne
linux-azure-5.4
bionic
pending
focal
dne
jammy
dne
mantic
dne
noble
dne
linux-azure-5.8
focal
ignored
jammy
dne
mantic
dne
noble
dne
linux-azure-6.2
focal
dne
jammy
ignored
mantic
dne
noble
dne
linux-azure-6.5
focal
dne
jammy
not-affected
mantic
dne
noble
dne
linux-azure-edge
bionic
ignored
focal
dne
jammy
dne
mantic
dne
noble
dne
linux-azure-fde
focal
ignored
jammy
not-affected
mantic
dne
noble
dne
linux-azure-fde-5.15
focal
not-affected
jammy
dne
mantic
dne
noble
dne
linux-azure-fde-5.19
focal
dne
jammy
ignored
mantic
dne
noble
dne
linux-azure-fde-6.2
focal
dne
jammy
ignored
mantic
dne
noble
dne
linux-azure-fips
bionic
dne
focal
dne
jammy
dne
mantic
dne
noble
dne
trusty
dne
xenial
dne
linux-bluefield
focal
Fixed 5.4.0-1016.19
released
jammy
dne
mantic
dne
noble
dne
linux-fips
focal
dne
jammy
dne
mantic
dne
noble
dne
linux-gcp
bionic
ignored
focal
Fixed 5.4.0-1049.53
released
jammy
not-affected
mantic
not-affected
noble
not-affected
xenial
Fixed 4.15.0-1106.120~16.04.1
released
linux-gcp-4.15
bionic
pending
focal
dne
jammy
dne
mantic
dne
noble
dne
linux-gcp-5.11
focal
ignored
jammy
dne
mantic
dne
noble
dne
linux-gcp-5.13
focal
ignored
jammy
dne
mantic
dne
noble
dne
linux-gcp-5.15
focal
not-affected
jammy
dne
mantic
dne
noble
dne
linux-gcp-5.19
focal
dne
jammy
ignored
mantic
dne
noble
dne
linux-gcp-5.3
bionic
ignored
focal
dne
jammy
dne
mantic
dne
noble
dne
linux-gcp-5.4
bionic
pending
focal
dne
jammy
dne
mantic
dne
noble
dne
linux-gcp-5.8
focal
ignored
jammy
dne
mantic
dne
noble
dne
linux-gcp-6.2
focal
dne
jammy
ignored
mantic
dne
noble
dne
linux-gcp-6.5
focal
dne
jammy
not-affected
mantic
dne
noble
dne
linux-gcp-fips
bionic
dne
focal
dne
jammy
dne
mantic
dne
noble
dne
trusty
dne
xenial
dne
linux-gke
focal
ignored
jammy
not-affected
mantic
dne
noble
not-affected
linux-gke-4.15
bionic
ignored
focal
dne
jammy
dne
mantic
dne
noble
dne
linux-gke-5.15
focal
ignored
jammy
dne
mantic
dne
noble
dne
linux-gke-5.4
bionic
ignored
focal
dne
jammy
dne
mantic
dne
noble
dne
linux-gkeop
focal
Fixed 5.4.0-1021.22
released
jammy
not-affected
mantic
dne
noble
dne
linux-gkeop-5.15
focal
not-affected
jammy
dne
mantic
dne
noble
dne
linux-gkeop-5.4
bionic
ignored
focal
dne
jammy
dne
mantic
dne
noble
dne
linux-hwe
bionic
ignored
focal
dne
jammy
dne
mantic
dne
noble
dne
xenial
Fixed 4.15.0-151.157~16.04.1
released
linux-hwe-5.11
focal
ignored
jammy
dne
mantic
dne
noble
dne
linux-hwe-5.13
focal
ignored
jammy
dne
mantic
dne
noble
dne
linux-hwe-5.15
focal
not-affected
jammy
dne
mantic
dne
noble
dne
linux-hwe-5.19
focal
dne
jammy
ignored
mantic
dne
noble
dne
linux-hwe-5.4
bionic
pending
focal
dne
jammy
dne
mantic
dne
noble
dne
linux-hwe-5.8
focal
ignored
jammy
dne
mantic
dne
noble
dne
linux-hwe-6.2
focal
dne
jammy
ignored
mantic
dne
noble
dne
linux-hwe-6.5
focal
dne
jammy
not-affected
mantic
dne
noble
dne
linux-hwe-6.8
bionic
dne
focal
dne
jammy
not-affected
noble
dne
trusty
dne
xenial
dne
linux-hwe-edge
bionic
ignored
focal
dne
jammy
dne
mantic
dne
noble
dne
xenial
ignored
linux-ibm
focal
not-affected
jammy
not-affected
mantic
ignored
noble
not-affected
linux-ibm-5.15
focal
not-affected
jammy
dne
mantic
dne
noble
dne
linux-ibm-5.4
bionic
not-affected
focal
dne
jammy
dne
mantic
dne
noble
dne
linux-intel
bionic
dne
focal
dne
jammy
dne
mantic
dne
noble
not-affected
trusty
dne
xenial
dne
linux-intel-5.13
focal
ignored
jammy
dne
mantic
dne
noble
dne
linux-intel-iot-realtime
bionic
dne
focal
dne
jammy
dne
noble
dne
trusty
dne
xenial
dne
linux-intel-iotg
focal
dne
jammy
not-affected
mantic
dne
noble
dne
linux-intel-iotg-5.15
focal
not-affected
jammy
dne
mantic
dne
noble
dne
linux-iot
focal
not-affected
jammy
dne
mantic
dne
noble
dne
linux-kvm
bionic
pending
focal
Fixed 5.4.0-1044.46
released
jammy
not-affected
mantic
dne
noble
dne
xenial
ignored
linux-laptop
focal
dne
jammy
dne
mantic
not-affected
noble
dne
linux-lowlatency
focal
dne
jammy
not-affected
mantic
not-affected
noble
not-affected
linux-lowlatency-hwe-5.15
focal
not-affected
jammy
dne
mantic
dne
noble
dne
linux-lowlatency-hwe-5.19
focal
dne
jammy
ignored
mantic
dne
noble
dne
linux-lowlatency-hwe-6.2
focal
dne
jammy
ignored
mantic
dne
noble
dne
linux-lowlatency-hwe-6.5
focal
dne
jammy
not-affected
mantic
dne
noble
dne
linux-lowlatency-hwe-6.8
bionic
dne
focal
dne
jammy
not-affected
noble
dne
trusty
dne
xenial
dne
linux-lts-xenial
focal
dne
jammy
dne
mantic
dne
noble
dne
trusty
ignored
linux-nvidia
focal
dne
jammy
not-affected
mantic
dne
noble
not-affected
linux-nvidia-6.2
focal
dne
jammy
ignored
mantic
dne
noble
dne
linux-nvidia-6.5
bionic
dne
focal
dne
jammy
not-affected
mantic
dne
noble
dne
trusty
dne
xenial
dne
linux-nvidia-6.8
bionic
dne
focal
dne
jammy
not-affected
noble
dne
trusty
dne
xenial
dne
linux-nvidia-lowlatency
bionic
dne
focal
dne
jammy
dne
noble
not-affected
trusty
dne
xenial
dne
linux-oem
bionic
ignored
focal
dne
jammy
dne
mantic
dne
noble
dne
linux-oem-5.10
focal
ignored
jammy
dne
mantic
dne
noble
dne
linux-oem-5.13
focal
ignored
jammy
dne
mantic
dne
noble
dne
linux-oem-5.14
focal
ignored
jammy
dne
mantic
dne
noble
dne
linux-oem-5.17
focal
dne
jammy
ignored
mantic
dne
noble
dne
linux-oem-5.6
focal
ignored
jammy
dne
mantic
dne
noble
dne
linux-oem-6.0
focal
dne
jammy
ignored
mantic
dne
noble
dne
linux-oem-6.1
focal
dne
jammy
ignored
mantic
dne
noble
dne
linux-oem-6.5
focal
dne
jammy
not-affected
mantic
dne
noble
dne
linux-oem-6.8
bionic
dne
focal
dne
jammy
dne
mantic
dne
noble
not-affected
trusty
dne
xenial
dne
linux-oracle
bionic
pending
focal
Fixed 5.4.0-1052.56
released
jammy
not-affected
mantic
not-affected
noble
not-affected
xenial
Fixed 4.15.0-1078.86~16.04.1
released
linux-oracle-5.0
bionic
ignored
focal
dne
jammy
dne
mantic
dne
noble
dne
linux-oracle-5.11
focal
ignored
jammy
dne
mantic
dne
noble
dne
linux-oracle-5.13
focal
ignored
jammy
dne
mantic
dne
noble
dne
linux-oracle-5.15
focal
not-affected
jammy
dne
mantic
dne
noble
dne
linux-oracle-5.3
bionic
ignored
focal
dne
jammy
dne
mantic
dne
noble
dne
linux-oracle-5.4
bionic
pending
focal
dne
jammy
dne
mantic
dne
noble
dne
linux-oracle-5.8
focal
ignored
jammy
dne
mantic
dne
noble
dne
linux-oracle-6.5
focal
dne
jammy
not-affected
mantic
dne
noble
dne
linux-raspi
focal
Fixed 5.4.0-1041.45
released
jammy
not-affected
mantic
not-affected
noble
not-affected
linux-raspi-5.4
bionic
pending
focal
dne
jammy
dne
mantic
dne
noble
dne
linux-raspi-realtime
bionic
dne
focal
dne
jammy
dne
noble
dne
trusty
dne
xenial
dne
linux-raspi2
focal
ignored
jammy
dne
mantic
dne
noble
dne
linux-realtime
bionic
dne
focal
dne
jammy
ignored
noble
dne
trusty
dne
xenial
dne
linux-riscv
focal
ignored
jammy
ignored
mantic
not-affected
noble
not-affected
linux-riscv-5.11
focal
ignored
jammy
dne
mantic
dne
noble
dne
linux-riscv-5.15
focal
not-affected
jammy
dne
mantic
dne
noble
dne
linux-riscv-5.19
focal
dne
jammy
ignored
mantic
dne
noble
dne
linux-riscv-5.8
focal
ignored
jammy
dne
mantic
dne
noble
dne
linux-riscv-6.5
focal
dne
jammy
not-affected
mantic
dne
noble
dne
linux-riscv-6.8
bionic
dne
focal
dne
jammy
not-affected
noble
dne
trusty
dne
xenial
dne
linux-starfive
focal
dne
jammy
dne
mantic
not-affected
noble
dne
linux-starfive-5.19
focal
dne
jammy
ignored
mantic
dne
noble
dne
linux-starfive-6.2
focal
dne
jammy
ignored
mantic
dne
noble
dne
linux-starfive-6.5
focal
dne
jammy
not-affected
mantic
dne
noble
dne
linux-xilinx-zynqmp
focal
not-affected
jammy
not-affected
mantic
dne
noble
dne