Skip to content
Fencer Vulns
high 7.0

CVE-2021-3640 json

A flaw use-after-free in function sco_sock_sendmsg() of the Linux kernel HCI subsystem was found in the way user calls ioct UFFDIO_REGISTER…

published 2022-03-03 4 y ago modified 2026-06-17 4 mo ago also EUVD-2021-26940

cvss
7.0
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
0.4%
EPSS 0.4% chance of exploitation in 30 days, percentile 31%
public exploits
0
none known

Summary

A flaw use-after-free in function sco_sock_sendmsg() of the Linux kernel HCI subsystem was found in the way user calls ioct UFFDIO_REGISTER or other way triggers race condition of the call sco_conn_del() together with the call sco_sock_sendmsg() with the expected controllable faulting memory page. A privileged local user could use this flaw to crash the system or escalate their privileges on the system.

Patch / fix

  • linux linux_kernel 4.4.293, 4.9.291, 4.14.256, 4.19.218, 5.4.160, 5.10.80, 5.14.19, 5.15.3
  • linux Debian 14, Debian 13, Debian 12 5.15.3-1

debian advisories DEBIAN-CVE-2021-3640

  • linux Ubuntu 18.04 LTS 4.15.0-167.175
  • linux Ubuntu 20.04 LTS 5.4.0-97.110
  • linux-aws Ubuntu 18.04 LTS 4.15.0-1119.127
  • linux-aws Ubuntu 20.04 LTS 5.4.0-1064.67
  • linux-gcp Ubuntu 20.04 LTS 5.4.0-1063.67
  • linux-gke Ubuntu 20.04 LTS 5.4.0-1061.64
  • linux-ibm Ubuntu 20.04 LTS 5.4.0-1013.14
  • linux-kvm Ubuntu 18.04 LTS 4.15.0-1106.108

ubuntu advisories UBUNTU-CVE-2021-3640

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • kernel RHEL 9 5.14.0-162.6.1.el9_1
  • perf RHEL 9 5.14.0-162.6.1.el9_1
  • bpftool RHEL 9 5.14.0-162.6.1.el9_1
  • kernel-core RHEL 9 5.14.0-162.6.1.el9_1
  • kernel-tools RHEL 9 5.14.0-162.6.1.el9_1
  • python3-perf RHEL 9 5.14.0-162.6.1.el9_1
  • kernel-modules RHEL 9 5.14.0-162.6.1.el9_1
  • kernel-zfcpdump RHEL 9 5.14.0-162.6.1.el9_1

red hat advisories RHSA-2022:8267RHSA-2022:7933RHSA-2024:0724RHSA-2022:7683RHSA-2022:7444

  • kernel-syms SLES for SAP 12 SP4, SLES 12 SP4-LTSS, OpenStack Cloud Crowbar 9 +1 more 4.12.14-95.83.2
  • kernel-source SLES for SAP 12 SP4, SLES 12 SP4-LTSS, OpenStack Cloud Crowbar 9 +1 more 4.12.14-95.83.2
  • kernel-default SLES for SAP 12 SP4, SLES 12 SP4-LTSS, SLE Live Patching 12 SP4 +3 more 4.12.14-95.83.2
  • kernel-syms SLES for SAP 15, SLES 15-LTSS, SLE High Performance Computing 15-LTSS +1 more 4.12.14-150.78.1
  • kernel-source SLES for SAP 15, SLES 15-LTSS, SLE High Performance Computing 15-LTSS +1 more 4.12.14-150.78.1
  • kernel-default SLES for SAP 15, SLES 15-LTSS, SLE Live Patching 15 +3 more 4.12.14-150.78.1
  • kernel-vanilla SLES for SAP 15, SLES 15-LTSS, SLE High Performance Computing 15-LTSS +1 more 4.12.14-150.78.1
  • kernel-obs-build SLES for SAP 15, SLES 15-LTSS, SLE High Performance Computing 15-LTSS +1 more 4.12.14-150.78.2

suse advisories SUSE-SU-2021:3972-1SUSE-SU-2021:3969-1SUSE-SU-2021:3935-1SUSE-SU-2021:3929-1SUSE-SU-2021:3876-1SUSE-SU-2021:14849-1

  • kernel-source openSUSE Tumbleweed 5.14.6-1.4
  • kernel-source openSUSE Tumbleweed 6.6.17-1.1
  • kernel-default openSUSE Leap 15.3 4.12.14-197.102.2
  • kernel-vanilla openSUSE Leap 15.3 4.12.14-197.102.2
  • kernel-kvmsmall openSUSE Leap 15.3 4.12.14-197.102.2
  • kernel-zfcpdump openSUSE Leap 15.3 4.12.14-197.102.2
  • dtb-aarch64 openSUSE Leap 15.3 5.3.18-59.24.1
  • kernel-64kb openSUSE Leap 15.3 5.3.18-59.24.1

opensuse advisories openSUSE-SU-2024:10728-1openSUSE-SU-2024:13704-1openSUSE-SU-2021:3876-1openSUSE-SU-2021:3205-1openSUSE-SU-2021:3179-1openSUSE-SU-2021:1271-1

  • kernel-rt AlmaLinux 9 5.14.0-162.6.1.rt21.168.el9_1
  • kernel-rt-kvm AlmaLinux 9 5.14.0-162.6.1.rt21.168.el9_1
  • kernel-rt-core AlmaLinux 9 5.14.0-162.6.1.rt21.168.el9_1
  • kernel-rt-modules AlmaLinux 9 5.14.0-162.6.1.rt21.168.el9_1
  • kernel-rt-debug-kvm AlmaLinux 9 5.14.0-162.6.1.rt21.168.el9_1
  • kernel-rt-debug-core AlmaLinux 9 5.14.0-162.6.1.rt21.168.el9_1
  • kernel-rt-debug-modules AlmaLinux 9 5.14.0-162.6.1.rt21.168.el9_1
  • kernel-rt-modules-extra AlmaLinux 9 5.14.0-162.6.1.rt21.168.el9_1

almalinux advisories ALSA-2022:7933ALSA-2022:8267ALSA-2022:7444ALSA-2022:7683

  • kernel Rocky Linux 8 4.18.0-425.3.1.el8
  • kernel-rt Rocky Linux 8 4.18.0-425.3.1.rt7.213.el8

rocky linux advisories RLSA-2022:7683RLSA-2022:7444

  • linux-lts Arch Linux 5.10.80-1
  • linux Arch Linux 5.15.3.arch1-1
  • linux-zen Arch Linux 5.15.3.zen1-1
  • linux-hardened Arch Linux 5.14.21.hardened1-1

arch linux advisories AVG-2568AVG-2570AVG-2571AVG-2588

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2021-3640 updated cvss 6.7

kernel: use-after-free vulnerability in function sco_sock_sendmsg()

  • Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, kernel-alt, python-perf, +9 more
    affected: workaround, no fix planned “Out of support scope”
  • Red Hat CodeReady Linux Builder (v. 8) kernel-debuginfo-common-x86_64 4.18.0-425.3.1.el8, kernel-debuginfo-common-aarch64 4.18.0-425.3.1.el8, kernel-debuginfo-common-ppc64le 4.18.0-425.3.1.el8
    fixed: vendor fix RHSA-2022:7683
  • Red Hat CodeReady Linux Builder (v. 9) kernel-debuginfo-common-s390x 5.14.0-162.6.1.el9_1, kernel-debuginfo-common-x86_64 5.14.0-162.6.1.el9_1, kernel-debuginfo-common-aarch64 5.14.0-162.6.1.el9_1, kernel-debuginfo-common-ppc64le 5.14.0-162.6.1.el9_1
    fixed: vendor fix RHSA-2022:8267
  • Red Hat CodeReady Linux Builder EUS (v.8.6) kernel-debuginfo-common-x86_64 4.18.0-372.91.1.el8_6, kernel-debuginfo-common-aarch64 4.18.0-372.91.1.el8_6, kernel-debuginfo-common-ppc64le 4.18.0-372.91.1.el8_6
    fixed: vendor fix RHSA-2024:0724
  • Red Hat Enterprise Linux AppStream (v. 9) perf 5.14.0-162.6.1.el9_1, kernel-devel-matched 5.14.0-162.6.1.el9_1, kernel-debug-devel-matched 5.14.0-162.6.1.el9_1, kernel-debuginfo-common-s390x 5.14.0-162.6.1.el9_1, kernel-zfcpdump-devel-matched 5.14.0-162.6.1.el9_1, kernel-debuginfo-common-x86_64 5.14.0-162.6.1.el9_1, +2 more
    fixed: vendor fix RHSA-2022:8267
  • Red Hat Enterprise Linux BaseOS (v. 8) perf 4.18.0-425.3.1.el8, kernel 4.18.0-425.3.1.el8, bpftool 4.18.0-425.3.1.el8, kernel-core 4.18.0-425.3.1.el8, kernel-tools 4.18.0-425.3.1.el8, python3-perf 4.18.0-425.3.1.el8, +15 more
    fixed: vendor fix RHSA-2022:7683
  • Red Hat Enterprise Linux BaseOS (v. 9) kernel 5.14.0-162.6.1.el9_1, bpftool 5.14.0-162.6.1.el9_1, kernel-core 5.14.0-162.6.1.el9_1, kernel-tools 5.14.0-162.6.1.el9_1, python3-perf 5.14.0-162.6.1.el9_1, kernel-modules 5.14.0-162.6.1.el9_1, +14 more
    fixed: vendor fix RHSA-2022:8267
  • Red Hat Enterprise Linux BaseOS EUS (v.8.6) perf 4.18.0-372.91.1.el8_6, kernel 4.18.0-372.91.1.el8_6, bpftool 4.18.0-372.91.1.el8_6, kernel-core 4.18.0-372.91.1.el8_6, kernel-tools 4.18.0-372.91.1.el8_6, python3-perf 4.18.0-372.91.1.el8_6, +15 more
    fixed: vendor fix RHSA-2024:0724
show 6 more
  • Red Hat Enterprise Linux Real Time (v. 8) kernel-rt 4.18.0-425.3.1.rt7.213.el8, kernel-rt-core 4.18.0-425.3.1.rt7.213.el8, kernel-rt-modules 4.18.0-425.3.1.rt7.213.el8, kernel-rt-debug-core 4.18.0-425.3.1.rt7.213.el8, kernel-rt-debug-modules 4.18.0-425.3.1.rt7.213.el8, kernel-rt-modules-extra 4.18.0-425.3.1.rt7.213.el8, +2 more
    fixed: vendor fix RHSA-2022:7444
  • Red Hat Enterprise Linux Real Time (v. 9) kernel-rt 5.14.0-162.6.1.rt21.168.el9_1, kernel-rt-core 5.14.0-162.6.1.rt21.168.el9_1, kernel-rt-modules 5.14.0-162.6.1.rt21.168.el9_1, kernel-rt-debug-core 5.14.0-162.6.1.rt21.168.el9_1, kernel-rt-debug-modules 5.14.0-162.6.1.rt21.168.el9_1, kernel-rt-modules-extra 5.14.0-162.6.1.rt21.168.el9_1, +2 more
    fixed: vendor fix RHSA-2022:7933
  • Red Hat Enterprise Linux Real Time for NFV (v. 8) kernel-rt 4.18.0-425.3.1.rt7.213.el8, kernel-rt-kvm 4.18.0-425.3.1.rt7.213.el8, kernel-rt-core 4.18.0-425.3.1.rt7.213.el8, kernel-rt-modules 4.18.0-425.3.1.rt7.213.el8, kernel-rt-debug-kvm 4.18.0-425.3.1.rt7.213.el8, kernel-rt-debug-core 4.18.0-425.3.1.rt7.213.el8, +4 more
    fixed: vendor fix RHSA-2022:7444
  • Red Hat Enterprise Linux Real Time for NFV (v. 9) kernel-rt 5.14.0-162.6.1.rt21.168.el9_1, kernel-rt-kvm 5.14.0-162.6.1.rt21.168.el9_1, kernel-rt-core 5.14.0-162.6.1.rt21.168.el9_1, kernel-rt-modules 5.14.0-162.6.1.rt21.168.el9_1, kernel-rt-debug-kvm 5.14.0-162.6.1.rt21.168.el9_1, kernel-rt-debug-core 5.14.0-162.6.1.rt21.168.el9_1, +4 more
    fixed: vendor fix RHSA-2022:7933
  • Red Hat Virtualization 4 Hypervisor for RHEL 8 perf 4.18.0-372.91.1.el8_6, kernel-debuginfo-common-x86_64 4.18.0-372.91.1.el8_6
    fixed: vendor fix RHSA-2024:0724
  • Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

0.37% chance of exploitation in the next 30 days, higher than 31% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • openwall.com https://www.openwall.com/lists/oss-security/2021/07/22/1 referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
NVD 3.1 7.0 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD 2.0 6.9 AV:L/AC:M/Au:N/C:C/I:C/A:C

Affected products

  • n/a kernel

Classification

Weakness
  • CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization
  • CWE-416 Use After Free
Technology feeds

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.