CVE-2021-47496
Severity CVSS v4.0:
Pending analysis
Type:
CWE-787
Out-of-bounds Write
Publication date:
22/05/2024
Last modified:
24/09/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
net/tls: Fix flipped sign in tls_err_abort() calls<br />
<br />
sk->sk_err appears to expect a positive value, a convention that ktls<br />
doesn&#39;t always follow and that leads to memory corruption in other code.<br />
For instance,<br />
<br />
[kworker]<br />
tls_encrypt_done(..., err=)<br />
tls_err_abort(.., err)<br />
sk->sk_err = err;<br />
<br />
[task]<br />
splice_from_pipe_feed<br />
...<br />
tls_sw_do_sendpage<br />
if (sk->sk_err) {<br />
ret = -sk->sk_err; // ret is positive<br />
<br />
splice_from_pipe_feed (continued)<br />
ret = actor(...) // ret is still positive and interpreted as bytes<br />
// written, resulting in underflow of buf->len and<br />
// sd->len, leading to huge buf->offset and bogus<br />
// addresses computed in later calls to actor()<br />
<br />
Fix all tls_err_abort() callers to pass a negative error code<br />
consistently and centralize the error-prone sign flip there, throwing in<br />
a warning to catch future misuse and uninlining the function so it<br />
really does only warn once.
Impact
Base Score 3.x
7.80
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.17 (including) | 5.4.157 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.5 (including) | 5.10.77 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.14.16 (excluding) |
| cpe:2.3:o:linux:linux_kernel:5.15:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:5.15:rc2:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:5.15:rc3:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:5.15:rc4:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:5.15:rc5:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:5.15:rc6:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:5.15:rc7:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- 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
- https://git.kernel.org/stable/c/e0cfd5159f314d6b304d030363650b06a2299cbb
- https://git.kernel.org/stable/c/e41473543f75f7dbc5d605007e6f883f1bd13b9a
- https://git.kernel.org/stable/c/f3dec7e7ace38224f82cf83f0049159d067c2e19



