CVE-2021-47496

net/tls: Fix flipped sign in tls_err_abort() calls

HIGH
7.8
CVSS Score
Published: May 22, 2024 at 08:19 AM UTC
Updated: August 5, 2026 at 09:24 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.5%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: net/tls: Fix flipped sign in tls_err_abort() calls sk->sk_err appears to expect a positive value, a convention that ktls doesn't always follow and that leads to memory corruption in other code. For instance, [kworker] tls_encrypt_done(..., err=<negative error from crypto request>) tls_err_abort(.., err) sk->sk_err = err; [task] splice_from_pipe_feed ... tls_sw_do_sendpage if (sk->sk_err) { ret = -sk->sk_err; // ret is positive splice_from_pipe_feed (continued) ret = actor(...) // ret is still positive and interpreted as bytes // written, resulting in underflow of buf->len and // sd->len, leading to huge buf->offset and bogus // addresses computed in later calls to actor() Fix all tls_err_abort() callers to pass a negative error code consistently and centralize the error-prone sign flip there, throwing in a warning to catch future misuse and uninlining the function so it really does only warn once.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

4.17 ≤ v < 5.10.774.17 ≤ v < 5.14.164.17 ≤ v < 5.154.17 ≤ v < 5.4.1575.11 ≤ v < 5.14.165.5 ≤ v < 5.10.775.15 rc15.15 rc25.15 rc35.15 rc45.15 rc55.15 rc65.15 rc7c46234ebb4d1eee5e09819f49169e51cfc6eb909
Vendor states this is fixed in da353fac65fede6b8b4cfe207f0d9408e3121105 (fixed)
Vendor states this is fixed in e0cfd5159f314d6b304d030363650b06a2299cbb (fixed)
Vendor states this is fixed in e41473543f75f7dbc5d605007e6f883f1bd13b9a (fixed)
Vendor states this is fixed in f3dec7e7ace38224f82cf83f0049159d067c2e19 (fixed)
Vendor states this is fixed in 4.17 (unaffected)
Vendor states this is fixed in 5.10.77 (unaffected)
Vendor states this is fixed in 5.14.16 (unaffected)
Vendor states this is fixed in 5.15 (unaffected)
Vendor states this is fixed in 5.4.157 (unaffected)

References (4)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/da353fac65fede6b8b4cfe207f0d9408e3121105
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/e0cfd5159f314d6b304d030363650b06a2299cbb
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/e41473543f75f7dbc5d605007e6f883f1bd13b9a
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/f3dec7e7ace38224f82cf83f0049159d067c2e19

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-787

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card