CVE-2021-47496·Kernel vulnerability
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.
- Severity
- high
- Software
- Kernel
- Fixed in
- 5.14.16
- Published
- 2024-05-22
Affected versions
From: 5.11
Until: 5.14.16
Fixed in: 5.14.16
How to fix this CVE
Update your Linux kernel to version 5.14.16 or later to resolve a critical sign-handling vulnerability in the TLS subsystem that can corrupt memory and cause kernel instability. The vulnerability stems from inconsistent error code sign conventions between the ktls stack and socket error handling, which can lead to buffer underflow attacks during splice operations. Apply the kernel patch immediately using your distribution's package manager.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Check your current kernel version: uname -r — compare the output against 5.14.16; versions 5.11 through 5.14.15 are vulnerable
- Verify TLS is loaded in your kernel: grep -i tls /proc/modules — if present, your system uses the affected code path
- Search system logs for memory corruption signs: grep -i 'general protection fault\|memory corruption\|kernel panic' /var/log/kern.log — exploitation may leave these traces
- Confirm the patch was applied after reboot: uname -r should show 5.14.16 or later, and cat /proc/version_signature should reflect the updated kernel date
FAQ
What is CVE-2021-47496?
A memory corruption vulnerability in the Linux kernel's TLS (Transport Layer Security) stack where error codes are inconsistently signed, causing buffer underflows when splice operations interact with the ktls sendpage handler. This can lead to kernel crashes or privilege escalation.
Is CVE-2021-47496 being actively exploited?
No — this vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog and no public exploits are currently available.
What versions of Kernel are affected by CVE-2021-47496?
Linux kernel versions 5.11 through 5.14.15 are vulnerable; kernel 5.14.16 and later include the fix.
How do I check if my server is vulnerable to CVE-2021-47496?
Run uname -r and compare your kernel version against 5.14.16 — if your version is 5.11 or later but earlier than 5.14.16, your system is vulnerable.
Does Defensia detect CVE-2021-47496?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2021-47496 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/da353fac65fede6b8b4cfe207f0d9408e3121105
- https://git.kernel.org/stable/c/e0cfd5159f314d6b304d030363650b06a2299cbb
- https://git.kernel.org/stable/c/e41473543f75f7dbc5d605007e6f883f1bd13b9a
- https://git.kernel.org/stable/c/f3dec7e7ace38224f82cf83f0049159d067c2e19
- https://git.kernel.org/stable/c/da353fac65fede6b8b4cfe207f0d9408e3121105
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2021-47496. Free for 1 server.
Get started free