CVE & CISA-KEV Catalog

CVE-2021-47131

HIGH
7.8
CVSS v3
NVD

Description

In the Linux kernel, the following vulnerability has been resolved: net/tls: Fix use-after-free after the TLS device goes down and up When a netdev with active TLS offload goes down, tls_device_down is called to stop the offload and tear down the TLS context. However, the socket stays alive, and it still points to the TLS context, which is now deallocated. If a netdev goes up, while the connection is still active, and the data flow resumes after a number of TCP retransmissions, it will lead to a use-after-free of the TLS context. This commit addresses this bug by keeping the context alive until its normal destruction, and implements the necessary fallbacks, so that the connection can resume in software (non-offloaded) kTLS mode. On the TX side tls_sw_fallback is used to encrypt all packets. The RX side already has all the necessary fallbacks, because receiving non-decrypted packets is supported. The thing needed on the RX side is to block resync requests, which are normally produced after receiving non-decrypted packets. The necessary synchronization is implemented for a graceful teardown: first the fallbacks are deployed, then the driver resources are released (it used to be possible to have a tls_dev_resync after tls_dev_del). A new flag called TLS_RX_DEV_DEGRADED is added to indicate the fallback mode. It's used to skip the RX resync logic completely, as it becomes useless, and some objects may be released (for example, resync_async, which is allocated and freed by the driver).

How to fix

Remediation Available
linuxDebian
Fixed in:5.10.46-1CVE-2021-47131
Fixed in:5.10.46-1CVE-2021-47131
Fixed in:5.10.46-1CVE-2021-47131
Fixed in:5.10.46-1CVE-2021-47131
linuxUbuntu
Fixed in:5.4.0-190.210USN-6924-1
linux-awsUbuntu
Fixed in:5.4.0-1129.139USN-6924-2
linux-aws-5.4Ubuntu
Fixed in:5.4.0-1129.139~18.04.1USN-6924-2
linux-azureUbuntu
Fixed in:5.4.0-1134.141USN-6924-1
linux-azure-5.4Ubuntu
Fixed in:5.4.0-1134.141~18.04.1USN-6924-1
linux-bluefieldUbuntu
Fixed in:5.4.0-1089.96USN-6924-1
linux-gcpUbuntu
Fixed in:5.4.0-1133.142USN-6924-1
linux-gcp-5.4Ubuntu
Fixed in:5.4.0-1133.142~18.04.1USN-6924-1
linux-gkeopUbuntu
Fixed in:5.4.0-1096.100USN-6924-1
linux-hwe-5.4Ubuntu
Fixed in:5.4.0-190.210~18.04.1USN-6924-1
linux-ibmUbuntu
Fixed in:5.4.0-1076.81USN-6924-1
linux-ibm-5.4Ubuntu
Fixed in:5.4.0-1076.81~18.04.1USN-6924-1
linux-image-5.4.0-1041-iotUbuntu
Fixed in:5.4.0-1041.42USN-6924-1
linux-image-5.4.0-1048-xilinx-zynqmpUbuntu
Fixed in:5.4.0-1048.52USN-6924-1
linux-image-5.4.0-1076-ibmUbuntu
Fixed in:5.4.0-1076.81~18.04.1USN-6924-1
Fixed in:5.4.0-1076.81USN-6924-1
linux-image-5.4.0-1089-bluefieldUbuntu
Fixed in:5.4.0-1089.96USN-6924-1
linux-image-5.4.0-1096-gkeopUbuntu
Fixed in:5.4.0-1096.100USN-6924-1
linux-image-5.4.0-1113-raspiUbuntu
Fixed in:5.4.0-1113.125USN-6924-1
linux-image-5.4.0-1114-raspiUbuntu
Fixed in:5.4.0-1114.126~18.04.1USN-6979-1
linux-image-5.4.0-1117-kvmUbuntu
Fixed in:5.4.0-1117.124USN-6924-1
linux-image-5.4.0-1129-awsUbuntu
Fixed in:5.4.0-1129.139~18.04.1USN-6924-2
Fixed in:5.4.0-1129.139USN-6924-2
linux-image-5.4.0-1129-oracleUbuntu
Fixed in:5.4.0-1129.138~18.04.1USN-6953-1
Fixed in:5.4.0-1129.138USN-6953-1
linux-image-5.4.0-1133-gcpUbuntu
Fixed in:5.4.0-1133.142~18.04.1USN-6924-1
Fixed in:5.4.0-1133.142USN-6924-1
linux-image-5.4.0-1134-azureUbuntu
Fixed in:5.4.0-1134.141~18.04.1USN-6924-1
Fixed in:5.4.0-1134.141USN-6924-1
linux-image-5.4.0-190-genericUbuntu
Fixed in:5.4.0-190.210~18.04.1USN-6924-1
Fixed in:5.4.0-190.210USN-6924-1
linux-image-5.4.0-190-generic-lpaeUbuntu
Fixed in:5.4.0-190.210USN-6924-1
linux-image-5.4.0-190-lowlatencyUbuntu
Fixed in:5.4.0-190.210~18.04.1USN-6924-1
Fixed in:5.4.0-190.210USN-6924-1
linux-image-awsUbuntu
Fixed in:5.4.0.1129.139~18.04.1USN-6924-2
linux-image-aws-lts-20.04Ubuntu
Fixed in:5.4.0.1129.126USN-6924-2
linux-image-azureUbuntu
Fixed in:5.4.0.1134.141~18.04.1USN-6924-1
linux-image-azure-lts-20.04Ubuntu
Fixed in:5.4.0.1134.128USN-6924-1
linux-image-bluefieldUbuntu
Fixed in:5.4.0.1089.85USN-6924-1
linux-image-gcpUbuntu
Fixed in:5.4.0.1133.142~18.04.1USN-6924-1
linux-image-gcp-lts-20.04Ubuntu
Fixed in:5.4.0.1133.135USN-6924-1
linux-image-genericUbuntu
Fixed in:5.4.0.190.188USN-6924-1
linux-image-generic-hwe-18.04Ubuntu
Fixed in:5.4.0.190.210~18.04.1USN-6924-1
linux-image-generic-lpaeUbuntu
Fixed in:5.4.0.190.188USN-6924-1
linux-image-gkeopUbuntu
Fixed in:5.4.0.1096.94USN-6924-1
linux-image-gkeop-5.4Ubuntu
Fixed in:5.4.0.1096.94USN-6924-1
linux-image-ibmUbuntu
Fixed in:5.4.0.1076.81~18.04.1USN-6924-1
linux-image-ibm-lts-20.04Ubuntu
Fixed in:5.4.0.1076.105USN-6924-1
linux-image-kvmUbuntu
Fixed in:5.4.0.1117.113USN-6924-1
linux-image-lowlatencyUbuntu
Fixed in:5.4.0.190.188USN-6924-1
linux-image-lowlatency-hwe-18.04Ubuntu
Fixed in:5.4.0.190.210~18.04.1USN-6924-1
linux-image-oemUbuntu
Fixed in:5.4.0.190.210~18.04.1USN-6924-1
Fixed in:5.4.0.190.188USN-6924-1
linux-image-oem-osp1Ubuntu
Fixed in:5.4.0.190.210~18.04.1USN-6924-1
Fixed in:5.4.0.190.188USN-6924-1
linux-image-oracleUbuntu
Fixed in:5.4.0.1129.138~18.04.1USN-6953-1
linux-image-oracle-lts-20.04Ubuntu
Fixed in:5.4.0.1129.122USN-6953-1
linux-image-raspiUbuntu
Fixed in:5.4.0.1113.143USN-6924-1
linux-image-raspi-hwe-18.04Ubuntu
Fixed in:5.4.0.1114.126~18.04.1USN-6979-1
linux-image-raspi2Ubuntu
Fixed in:5.4.0.1113.143USN-6924-1
linux-image-snapdragon-hwe-18.04Ubuntu
Fixed in:5.4.0.190.210~18.04.1USN-6924-1
linux-image-virtualUbuntu
Fixed in:5.4.0.190.188USN-6924-1
linux-image-virtual-hwe-18.04Ubuntu
Fixed in:5.4.0.190.210~18.04.1USN-6924-1
linux-image-xilinx-zynqmpUbuntu
Fixed in:5.4.0.1048.48USN-6924-1
linux-iotUbuntu
Fixed in:5.4.0-1041.42USN-6924-1
linux-kvmUbuntu
Fixed in:5.4.0-1117.124USN-6924-1
linux-oracleUbuntu
Fixed in:5.4.0-1129.138USN-6953-1
linux-oracle-5.4Ubuntu
Fixed in:5.4.0-1129.138~18.04.1USN-6953-1
linux-raspiUbuntu
Fixed in:5.4.0-1113.125USN-6924-1
linux-raspi-5.4Ubuntu
Fixed in:5.4.0-1114.126~18.04.1USN-6979-1
linux-xilinx-zynqmpUbuntu
Fixed in:5.4.0-1048.52USN-6924-1

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3 Vector

Exploitability

Attack VectorLocal
Attack ComplexityLow
Privileges RequiredLow
User InteractionNone
ScopeUnchanged

Impact

ConfidentialityHigh
IntegrityHigh
AvailabilityHigh

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Exploit Intelligence

0.26%probability of exploitation in 30 days
17thpercentile

Low risk: more likely to be exploited than 17% of all known CVEs.

References

Related Vulnerabilities

Other CWE-416 (Use After Free) vulnerabilities, ordered by exploit likelihood. View all

CVESeverityCVSSEPSSExploitedFix
CVE-2019-0708Critical9.8100%KEV + Ransom-
CVE-2021-31166Critical9.8100%KEVFix
CVE-2015-5119Critical9.899%KEV-
CVE-2010-3962High8.197%KEV-
CVE-2015-0313Critical9.896%KEVFix
CVE-2017-9798High7.595%-Fix
Embed a live status badge for CVE-2021-47131
CVE-2021-47131 severity badge

Markdown

[![CVE-2021-47131](https://tridentstack.com/cve/badge/CVE-2021-47131.svg)](https://tridentstack.com/cve/CVE-2021-47131)

HTML

<a href="https://tridentstack.com/cve/CVE-2021-47131"><img src="https://tridentstack.com/cve/badge/CVE-2021-47131.svg" alt="CVE-2021-47131"></a>

Find and fix vulnerabilities across your fleet

TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.

Start free

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2025-02-27.