Cloudanix VulnDB

CVE-2021-47131

None

CVSS

—

EPSS

0.8%

Published

Mar 15, 2024

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A bug in how encrypted network connections are handled when network devices restart can let attackers crash servers or potentially take them over.

Exploitation
Local Privilege
Attacker needs
Local User
Complexity
Moderate
Impact
Other
Component
OS kernel
Class
Use After Free
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Use-after-free of the TLS context after a netdev with active TLS offload is taken down and later brought up, leaving the socket referencing deallocated memory; subsequent data flow after TCP retransmissions triggers the freed object access on both TX (via fallback) and RX paths.

Why it matters to the business

Kernel memory corruption or crashes on systems using TLS hardware offload can cause network service outages, potential remote code execution, and require urgent patching of affected kernels and dependent packages across large fleets.

How an attack unfolds

An attacker with the ability to influence network device state or observe active TLS-offloaded connections forces a netdev down/up cycle while the socket remains open; after retransmissions resume traffic, the kernel dereferences the freed TLS context, enabling memory corruption that threat actors have targeted in Android kernel scenarios.

How to fix it

Upgrade the Linux kernel to a version containing the fix and update affected packages to the listed fixed versions (libblockdev-*-devel 2.24-2.el8_3 on AlmaLinux 8); disable TLS offload where feasible until patched; apply fallbacks to software kTLS.

How to confirm the fix worked

Confirm kernel and libblockdev package versions match or exceed the fixed releases; verify TLS offload is disabled or falls back cleanly on netdev restart; test connection resumption after simulated down/up cycles without crashes.

Typical attack path

  1. Identify hosts with TLS offload enabled on network interfaces
  2. Trigger or wait for netdev down event while TLS connections are active
  3. Allow netdev to come back up and connections to resume after retransmissions
  4. Trigger data flow that exercises the stale TLS context pointer
  5. Exploit resulting use-after-free for memory corruption or code execution

How to detect it

Search kernel logs and netdev event logs for TLS context teardown messages followed by unexpected resync or fallback activity; look for crashes or warnings referencing tls_device_down or TLS_RX_DEV_DEGRADED around active TLS sockets.

What your security team should do

  • Prioritize kernel and libblockdev updates on all systems exposing TLS offload within the next patching cycle due to the 935-day exposure window
  • Audit network configurations for hardware TLS offload usage and consider disabling it on unpatched hosts
  • Monitor for netdev state changes correlated with TLS connection anomalies in system logs

The record

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).

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 linux 0 5.10.46-1
Debian:12 linux 0 5.10.46-1
Debian:13 linux 0 5.10.46-1
SUSE:Enterprise Storage 7.1 kernel-64kb 0 5.3.18-150300.59.161.1
SUSE:Enterprise Storage 7.1 kernel-default 0 5.3.18-150300.59.161.1
SUSE:Enterprise Storage 7.1 kernel-default-base 0 5.3.18-150300.59.161.1.150300.18.94.1
SUSE:Enterprise Storage 7.1 kernel-docs 0 5.3.18-150300.59.161.2
SUSE:Enterprise Storage 7.1 kernel-obs-build 0 5.3.18-150300.59.161.1
SUSE:Enterprise Storage 7.1 kernel-preempt 0 5.3.18-150300.59.161.1
SUSE:Enterprise Storage 7.1 kernel-source 0 5.3.18-150300.59.161.1
SUSE:Enterprise Storage 7.1 kernel-syms 0 5.3.18-150300.59.161.1
SUSE:Linux Enterprise High Availability Extension 12 SP5 kernel-default 0 4.12.14-122.219.1
SUSE:Linux Enterprise High Availability Extension 15 SP2 kernel-default 0 5.3.18-150200.24.191.1
SUSE:Linux Enterprise High Availability Extension 15 SP3 kernel-default 0 5.3.18-150300.59.161.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS kernel-default 0 5.3.18-150200.24.191.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS kernel-default-base 0 5.3.18-150200.24.191.1.150200.9.97.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS kernel-docs 0 5.3.18-150200.24.191.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS kernel-obs-build 0 5.3.18-150200.24.191.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS kernel-preempt 0 5.3.18-150200.24.191.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS kernel-source 0 5.3.18-150200.24.191.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS kernel-syms 0 5.3.18-150200.24.191.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS kernel-64kb 0 5.3.18-150300.59.161.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS kernel-default 0 5.3.18-150300.59.161.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS kernel-default-base 0 5.3.18-150300.59.161.1.150300.18.94.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS kernel-docs 0 5.3.18-150300.59.161.2
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS kernel-obs-build 0 5.3.18-150300.59.161.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS kernel-preempt 0 5.3.18-150300.59.161.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS kernel-source 0 5.3.18-150300.59.161.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS kernel-syms 0 5.3.18-150300.59.161.1
SUSE:Linux Enterprise Live Patching 12 SP5 kernel-default 0 4.12.14-122.219.1
SUSE:Linux Enterprise Live Patching 12 SP5 kgraft-patch-SLE12-SP5_Update_57 0 1-8.3.1
SUSE:Linux Enterprise Live Patching 15 SP2 kernel-default 0 5.3.18-150200.24.191.1
SUSE:Linux Enterprise Live Patching 15 SP2 kernel-livepatch-SLE15-SP2_Update_48 0 1-150200.5.3.1
SUSE:Linux Enterprise Live Patching 15 SP3 kernel-default 0 5.3.18-150300.59.161.1
SUSE:Linux Enterprise Live Patching 15 SP3 kernel-livepatch-SLE15-SP3_Update_44 0 1-150300.7.3.1
SUSE:Linux Enterprise Micro 5.1 kernel-default 0 5.3.18-150300.59.161.1
SUSE:Linux Enterprise Micro 5.1 kernel-default-base 0 5.3.18-150300.59.161.1.150300.18.94.1
SUSE:Linux Enterprise Micro 5.1 kernel-rt 0 5.3.18-150300.169.1
SUSE:Linux Enterprise Micro 5.1 kernel-source-rt 0 5.3.18-150300.169.1
SUSE:Linux Enterprise Micro 5.2 kernel-default 0 5.3.18-150300.59.161.1
SUSE:Linux Enterprise Micro 5.2 kernel-default-base 0 5.3.18-150300.59.161.1.150300.18.94.1
SUSE:Linux Enterprise Micro 5.2 kernel-rt 0 5.3.18-150300.169.1
SUSE:Linux Enterprise Micro 5.2 kernel-source-rt 0 5.3.18-150300.169.1
SUSE:Linux Enterprise Real Time 12 SP5 kernel-rt 0 4.12.14-10.188.1
SUSE:Linux Enterprise Real Time 12 SP5 kernel-rt_debug 0 4.12.14-10.188.1
SUSE:Linux Enterprise Real Time 12 SP5 kernel-source-rt 0 4.12.14-10.188.1
SUSE:Linux Enterprise Real Time 12 SP5 kernel-syms-rt 0 4.12.14-10.188.1
SUSE:Linux Enterprise Server 12 SP5 kernel-azure 0 4.12.14-16.182.1
SUSE:Linux Enterprise Server 12 SP5 kernel-default 0 4.12.14-122.219.1
SUSE:Linux Enterprise Server 12 SP5 kernel-source 0 4.12.14-122.219.1
SUSE:Linux Enterprise Server 12 SP5 kernel-source-azure 0 4.12.14-16.182.1
SUSE:Linux Enterprise Server 12 SP5 kernel-syms 0 4.12.14-122.219.1
SUSE:Linux Enterprise Server 12 SP5 kernel-syms-azure 0 4.12.14-16.182.1
SUSE:Linux Enterprise Server 15 SP2-LTSS kernel-default 0 5.3.18-150200.24.191.1
SUSE:Linux Enterprise Server 15 SP2-LTSS kernel-default-base 0 5.3.18-150200.24.191.1.150200.9.97.1
SUSE:Linux Enterprise Server 15 SP2-LTSS kernel-docs 0 5.3.18-150200.24.191.1
SUSE:Linux Enterprise Server 15 SP2-LTSS kernel-obs-build 0 5.3.18-150200.24.191.1
SUSE:Linux Enterprise Server 15 SP2-LTSS kernel-preempt 0 5.3.18-150200.24.191.1
SUSE:Linux Enterprise Server 15 SP2-LTSS kernel-source 0 5.3.18-150200.24.191.1
SUSE:Linux Enterprise Server 15 SP2-LTSS kernel-syms 0 5.3.18-150200.24.191.1
SUSE:Linux Enterprise Server 15 SP3-LTSS kernel-64kb 0 5.3.18-150300.59.161.1
SUSE:Linux Enterprise Server 15 SP3-LTSS kernel-default 0 5.3.18-150300.59.161.1
SUSE:Linux Enterprise Server 15 SP3-LTSS kernel-default-base 0 5.3.18-150300.59.161.1.150300.18.94.1
SUSE:Linux Enterprise Server 15 SP3-LTSS kernel-docs 0 5.3.18-150300.59.161.2
SUSE:Linux Enterprise Server 15 SP3-LTSS kernel-obs-build 0 5.3.18-150300.59.161.1
SUSE:Linux Enterprise Server 15 SP3-LTSS kernel-preempt 0 5.3.18-150300.59.161.1
SUSE:Linux Enterprise Server 15 SP3-LTSS kernel-source 0 5.3.18-150300.59.161.1
SUSE:Linux Enterprise Server 15 SP3-LTSS kernel-syms 0 5.3.18-150300.59.161.1
SUSE:Linux Enterprise Server 15 SP3-LTSS kernel-zfcpdump 0 5.3.18-150300.59.161.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 kernel-azure 0 4.12.14-16.182.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 kernel-default 0 4.12.14-122.219.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 kernel-source 0 4.12.14-122.219.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 kernel-source-azure 0 4.12.14-16.182.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 kernel-syms 0 4.12.14-122.219.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 kernel-syms-azure 0 4.12.14-16.182.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP2 kernel-default 0 5.3.18-150200.24.191.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP2 kernel-default-base 0 5.3.18-150200.24.191.1.150200.9.97.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP2 kernel-docs 0 5.3.18-150200.24.191.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP2 kernel-obs-build 0 5.3.18-150200.24.191.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP2 kernel-preempt 0 5.3.18-150200.24.191.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP2 kernel-source 0 5.3.18-150200.24.191.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP2 kernel-syms 0 5.3.18-150200.24.191.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP3 kernel-default 0 5.3.18-150300.59.161.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP3 kernel-default-base 0 5.3.18-150300.59.161.1.150300.18.94.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP3 kernel-docs 0 5.3.18-150300.59.161.2
SUSE:Linux Enterprise Server for SAP Applications 15 SP3 kernel-obs-build 0 5.3.18-150300.59.161.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP3 kernel-preempt 0 5.3.18-150300.59.161.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP3 kernel-source 0 5.3.18-150300.59.161.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP3 kernel-syms 0 5.3.18-150300.59.161.1
SUSE:Linux Enterprise Software Development Kit 12 SP5 kernel-docs 0 4.12.14-122.219.1
SUSE:Linux Enterprise Software Development Kit 12 SP5 kernel-obs-build 0 4.12.14-122.219.1
SUSE:Linux Enterprise Workstation Extension 12 SP5 kernel-default 0 4.12.14-122.219.1
Ubuntu:14.04:LTS linux 0 3.11.0-12.19
Ubuntu:14.04:LTS linux-aws 0 4.4.0-1002.2
Ubuntu:14.04:LTS linux-azure 0 4.15.0-1023.24~14.04.1
Ubuntu:14.04:LTS linux-lts-xenial 0 4.4.0-13.29~14.04.1
Ubuntu:16.04:LTS linux 0 4.4.0-2.16
Ubuntu:16.04:LTS linux-aws 0 4.4.0-1001.10
Ubuntu:16.04:LTS linux-aws-hwe 0 4.15.0-1030.31~16.04.1
Ubuntu:16.04:LTS linux-azure 0 4.11.0-1009.9
Ubuntu:16.04:LTS linux-gcp 0 4.10.0-1004.4
Ubuntu:16.04:LTS linux-hwe 0 4.8.0-39.42~16.04.1
Ubuntu:16.04:LTS linux-hwe-edge 0 No fix
Ubuntu:16.04:LTS linux-kvm 0 4.4.0-1004.9
Ubuntu:16.04:LTS linux-oracle 0 4.15.0-1007.9~16.04.1
Ubuntu:18.04:LTS linux 0 4.13.0-16.19
Ubuntu:18.04:LTS linux-aws 0 4.15.0-1001.1
Ubuntu:18.04:LTS linux-aws-5.0 0 No fix
Ubuntu:18.04:LTS linux-aws-5.3 0 No fix
Ubuntu:18.04:LTS linux-azure 0 No fix
Ubuntu:18.04:LTS linux-azure-4.15 0 4.15.0-1082.92
Ubuntu:18.04:LTS linux-azure-5.3 0 No fix
Ubuntu:18.04:LTS linux-azure-edge 0 No fix
Ubuntu:18.04:LTS linux-gcp 0 No fix
Ubuntu:18.04:LTS linux-gcp-4.15 0 4.15.0-1071.81
Ubuntu:18.04:LTS linux-gcp-5.3 0 No fix
Ubuntu:18.04:LTS linux-gke-4.15 0 No fix
Ubuntu:18.04:LTS linux-gke-5.4 0 No fix
Ubuntu:18.04:LTS linux-gkeop-5.4 0 No fix
Ubuntu:18.04:LTS linux-hwe 0 No fix
Ubuntu:18.04:LTS linux-hwe-edge 0 No fix
Ubuntu:18.04:LTS linux-kvm 0 4.15.0-1002.2
Ubuntu:18.04:LTS linux-oem 0 No fix
Ubuntu:18.04:LTS linux-oracle 0 4.15.0-1007.9
Ubuntu:18.04:LTS linux-oracle-5.0 0 No fix
Ubuntu:18.04:LTS linux-oracle-5.3 0 No fix
Ubuntu:20.04:LTS linux 0 5.4.0-190.210
Ubuntu:20.04:LTS linux-aws 0 5.4.0-1129.139
Ubuntu:20.04:LTS linux-aws-5.11 0 No fix
Ubuntu:20.04:LTS linux-aws-5.13 0 No fix
Ubuntu:20.04:LTS linux-aws-5.15 0 5.15.0-1014.18~20.04.1
Ubuntu:20.04:LTS linux-aws-5.8 0 No fix
Ubuntu:20.04:LTS linux-azure 0 5.4.0-1134.141
Ubuntu:20.04:LTS linux-azure-5.11 0 No fix
Ubuntu:20.04:LTS linux-azure-5.13 0 No fix
Ubuntu:20.04:LTS linux-azure-5.15 0 5.15.0-1007.8~20.04.1
Ubuntu:20.04:LTS linux-azure-5.8 0 No fix
Ubuntu:20.04:LTS linux-azure-fde 0 No fix
Ubuntu:20.04:LTS linux-azure-fde-5.15 0 5.15.0-1019.24~20.04.1.1
Ubuntu:20.04:LTS linux-bluefield 0 5.4.0-1089.96
Ubuntu:20.04:LTS linux-gcp 0 5.4.0-1133.142
Ubuntu:20.04:LTS linux-gcp-5.11 0 No fix
Ubuntu:20.04:LTS linux-gcp-5.13 0 No fix
Ubuntu:20.04:LTS linux-gcp-5.15 0 5.15.0-1006.9~20.04.1
Ubuntu:20.04:LTS linux-gcp-5.8 0 No fix
Ubuntu:20.04:LTS linux-gke 0 No fix
Ubuntu:20.04:LTS linux-gke-5.15 0 No fix
Ubuntu:20.04:LTS linux-gkeop 0 5.4.0-1096.100
Ubuntu:20.04:LTS linux-gkeop-5.15 0 5.15.0-1003.5~20.04.2
Ubuntu:20.04:LTS linux-hwe-5.11 0 No fix
Ubuntu:20.04:LTS linux-hwe-5.13 0 No fix
Ubuntu:20.04:LTS linux-hwe-5.15 0 5.15.0-33.34~20.04.1
Ubuntu:20.04:LTS linux-hwe-5.8 0 No fix
Ubuntu:20.04:LTS linux-ibm 0 5.4.0-1076.81
Ubuntu:20.04:LTS linux-ibm-5.15 0 5.15.0-1033.36~20.04.1
Ubuntu:20.04:LTS linux-intel-5.13 0 No fix
Ubuntu:20.04:LTS linux-intel-iotg-5.15 0 5.15.0-1003.5~20.04.1
Ubuntu:20.04:LTS linux-iot 0 5.4.0-1041.42
Ubuntu:20.04:LTS linux-kvm 0 5.4.0-1117.124
Ubuntu:20.04:LTS linux-lowlatency-hwe-5.15 0 5.15.0-33.34~20.04.1
Ubuntu:20.04:LTS linux-oem-5.10 0 No fix
Ubuntu:20.04:LTS linux-oem-5.13 0 No fix
Ubuntu:20.04:LTS linux-oem-5.14 0 No fix
Ubuntu:20.04:LTS linux-oem-5.6 0 No fix
Ubuntu:20.04:LTS linux-oracle 0 No fix
Ubuntu:20.04:LTS linux-oracle 0 5.4.0-1129.138
Ubuntu:20.04:LTS linux-oracle-5.11 0 No fix
Ubuntu:20.04:LTS linux-oracle-5.13 0 No fix
Ubuntu:20.04:LTS linux-oracle-5.15 0 5.15.0-1007.9~20.04.1
Ubuntu:20.04:LTS linux-oracle-5.8 0 No fix
Ubuntu:20.04:LTS linux-raspi 0 5.4.0-1113.125
Ubuntu:20.04:LTS linux-raspi2 0 No fix
Ubuntu:20.04:LTS linux-riscv 0 No fix
Ubuntu:20.04:LTS linux-riscv-5.11 0 No fix
Ubuntu:20.04:LTS linux-riscv-5.15 0 5.15.0-1015.17~20.04.1
Ubuntu:20.04:LTS linux-riscv-5.8 0 No fix
Ubuntu:20.04:LTS linux-xilinx-zynqmp 0 5.4.0-1048.52
Ubuntu:22.04:LTS linux 0 5.13.0-19.19
Ubuntu:22.04:LTS linux-allwinner-5.19 0 No fix
Ubuntu:22.04:LTS linux-aws 0 5.13.0-1005.6
Ubuntu:22.04:LTS linux-aws-5.19 0 No fix
Ubuntu:22.04:LTS linux-aws-6.2 0 No fix
Ubuntu:22.04:LTS linux-aws-6.5 0 6.5.0-1008.8~22.04.1
Ubuntu:22.04:LTS linux-aws-6.8 0 6.8.0-1009.9~22.04.2
Ubuntu:22.04:LTS linux-azure 0 5.13.0-1006.7
Ubuntu:22.04:LTS linux-azure-5.19 0 No fix
Ubuntu:22.04:LTS linux-azure-6.2 0 No fix
Ubuntu:22.04:LTS linux-azure-6.5 0 6.5.0-1007.7~22.04.1
Ubuntu:22.04:LTS linux-azure-6.8 0 6.8.0-1008.8~22.04.1
Ubuntu:22.04:LTS linux-azure-fde 0 5.15.0-1019.24.1
Ubuntu:22.04:LTS linux-azure-fde-5.19 0 No fix
Ubuntu:22.04:LTS linux-azure-fde-6.2 0 No fix
Ubuntu:22.04:LTS linux-gcp 0 5.13.0-1005.6
Ubuntu:22.04:LTS linux-gcp-5.19 0 No fix
Ubuntu:22.04:LTS linux-gcp-6.2 0 No fix
Ubuntu:22.04:LTS linux-gcp-6.5 0 6.5.0-1010.10~22.04.3
Ubuntu:22.04:LTS linux-gcp-6.8 0 6.8.0-1010.11~22.04.1
Ubuntu:22.04:LTS linux-gke 0 5.15.0-1002.2
Ubuntu:22.04:LTS linux-gkeop 0 5.15.0-1001.2
Ubuntu:22.04:LTS linux-hwe-5.19 0 No fix

Related vulnerabilities