CVE-2021-47496: net/tls: Fix flipped sign in tls_err_abort() calls
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.
Security readout for executives and security teams
Plain-English summary
This is a Linux kernel TLS handling bug that can corrupt socket buffer accounting after certain encryption errors. The documented impact is memory corruption in kernel networking code. Sources confirm stable-kernel fixes, but do not show active exploitation, a CVSS score, or a complete product matrix.
Executive priority
Schedule remediation through normal kernel patch governance, with higher priority for systems using kernel TLS or handling sensitive network traffic. The business risk is credible because memory corruption is involved, but urgency is reduced by absent evidence of active exploitation or a published severity score in the provided sources.
Technical view
In ktls, tls_err_abort() callers passed error signs inconsistently. A negative crypto request error could be stored in sk->sk_err, later flipped into a positive return value and interpreted as bytes written. That could underflow buffer lengths and create bogus offsets. The fix makes callers pass negative errors consistently and centralizes the sign conversion.
Likely exposure
Exposure is most likely on Linux systems running affected kernel versions with kernel TLS paths in use. The bundle lists Linux kernel versions including 4.17, 5.4.157, 5.10.77, 5.14.16, and 5.15 as affected, but exact distribution package status must be checked with each vendor.
Exploitation context
The provided sources describe a memory corruption condition and kernel stable fixes. They do not provide evidence of public exploitation, inclusion in CISA KEV, exploit maturity, required privileges, or reliable attack preconditions. Do not treat this as actively exploited based on this bundle alone.
Researcher notes
The useful validation target is the ktls error-handling fix, not exploit reproduction. Confirm sign handling around tls_err_abort(), sk->sk_err, and sendpage/splice return interpretation. The bundle’s affected-version data is incomplete for distro kernels, so rely on vendor backport metadata before declaring exposure or closure.
Mitigation direction
Identify Linux systems using affected kernel versions or vendor kernels derived from them.
Apply the relevant Linux stable or distribution kernel update containing the referenced ktls fix.
Prioritize internet-facing, high-throughput, or TLS-heavy Linux workloads for maintenance windows.
Check vendor advisories for backported fixes and package-specific version mapping.
If patching is delayed, review vendor guidance for ktls-specific operational workarounds.
Validation and detection
Inventory kernel versions across Linux servers, containers hosts, and appliances.
Confirm whether deployed kernels include one of the referenced stable commits or vendor backports.
Check whether workloads rely on kernel TLS paths or related sendpage/splice networking behavior.
Review kernel and distribution advisories for CVE-2021-47496 remediation status.
Monitor kernel logs for warnings or networking instability after update rollout.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2021-47496 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.