{"id":"CVE-2021-47496","published":"2024-05-22T08:19:43Z","modified":"2026-08-05T08:48:05Z","title":"net/tls: Fix flipped sign in tls_err_abort() calls","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/tls: Fix flipped sign in tls_err_abort() calls\n\nsk->sk_err appears to expect a positive value, a convention that ktls\ndoesn't always follow and that leads to memory corruption in other code.\nFor instance,\n\n    [kworker]\n    tls_encrypt_done(..., err=<negative error from crypto request>)\n      tls_err_abort(.., err)\n        sk->sk_err = err;\n\n    [task]\n    splice_from_pipe_feed\n      ...\n        tls_sw_do_sendpage\n          if (sk->sk_err) {\n            ret = -sk->sk_err;  // ret is positive\n\n    splice_from_pipe_feed (continued)\n      ret = actor(...)  // ret is still positive and interpreted as bytes\n                        // written, resulting in underflow of buf->len and\n                        // sd->len, leading to huge buf->offset and bogus\n                        // addresses computed in later calls to actor()\n\nFix all tls_err_abort() callers to pass a negative error code\nconsistently and centralize the error-prone sign flip there, throwing in\na warning to catch future misuse and uninlining the function so it\nreally does only warn once.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.8,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00879,"percentile":0.5679,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/e0cfd5159f314d6b304d030363650b06a2299cbb","tags":[]},{"url":"https://git.kernel.org/stable/c/f3dec7e7ace38224f82cf83f0049159d067c2e19","tags":[]},{"url":"https://git.kernel.org/stable/c/e41473543f75f7dbc5d605007e6f883f1bd13b9a","tags":[]},{"url":"https://git.kernel.org/stable/c/da353fac65fede6b8b4cfe207f0d9408e3121105","tags":[]}],"priority":{"score":18.2,"factors":[{"name":"EPSS percentile","points":11.36},{"name":"CVSS severity","points":6.86}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= c46234ebb4d1eee5e09819f49169e51cfc6eb909, < e0cfd5159f314d6b304d030363650b06a2299cbb",">= c46234ebb4d1eee5e09819f49169e51cfc6eb909, < f3dec7e7ace38224f82cf83f0049159d067c2e19",">= c46234ebb4d1eee5e09819f49169e51cfc6eb909, < e41473543f75f7dbc5d605007e6f883f1bd13b9a",">= c46234ebb4d1eee5e09819f49169e51cfc6eb909, < da353fac65fede6b8b4cfe207f0d9408e3121105"]},{"vendor":"Linux","product":"Linux","versions":["4.17"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-09-10T15:35:52.280096Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2021-34500","exploited":false,"provenance":"source"}}