CVE-2021-47496: net/tls: Fix flipped sign in tls_err_abort() calls

Published May 22, 2024
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

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

sk->skerr 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] tlsencryptdone(..., err=<negative error from crypto request>) tlserrabort(.., err) sk->skerr = err;

[task] splicefrompipefeed ... tlsswdosendpage if (sk->skerr) { ret = -sk->skerr; // ret is positive

splicefrompipefeed (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 tlserrabort() 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 Software

11 affected components
Linux Linux kernel
Linux Linux kernel>=4.17<5.4.157
Linux Linux kernel>=5.5<5.10.77
Linux Linux kernel>=5.11<5.14.16
Linux Linux kernel=5.15-rc1
Linux Linux kernel=5.15-rc2
Linux Linux kernel=5.15-rc3
Linux Linux kernel=5.15-rc4
Linux Linux kernel=5.15-rc5
Linux Linux kernel=5.15-rc6
Linux Linux kernel=5.15-rc7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Fix all tls_err_abort() callers to pass a negative error code; ensure the ret value is negative (e.g., avoid cases where ret becomes positive and is interpreted as bytes), so tls_err_abort(.., err) receives <negative error> from crypto requests.

    Linux kernel net/tls tls_err_abort() error-code sign handling = Pass a negative error code (fix flipped sign in tls_err_abort() calls)

Event History

May 22, 2024
CVE Published
via MITRE·08:19 AM
Data Sourced
via MITRE·08:19 AM
DescriptionSeverity
Data Sourced
via NVD·09:15 AM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2021-47496?

CVE-2021-47496 has been assigned a medium severity rating due to potential memory corruption risks.

2

How do I fix CVE-2021-47496?

To fix CVE-2021-47496, users should update their Linux kernel to the latest patched version provided by their distribution.

3

What are the potential impacts of CVE-2021-47496?

The potential impact of CVE-2021-47496 includes memory corruption, which could lead to system crashes or unauthorized data access.

4

Which versions of the Linux kernel are affected by CVE-2021-47496?

CVE-2021-47496 may affect multiple versions of the Linux kernel, especially those prior to the recent patches that address this issue.

5

Is CVE-2021-47496 being actively exploited in the wild?

As of now, there is no evidence to suggest that CVE-2021-47496 is being actively exploited in the wild, but users should take precautions.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203