{"id":"CVE-2021-47243","aliases":["CVE-2021-47243"],"related":[],"kind":"vulnerability","state":"published","title":"sch_cake: Fix out of bounds when parsing TCP options and header","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nsch_cake: Fix out of bounds when parsing TCP options and header\n\nThe TCP option parser in cake qdisc (cake_get_tcpopt and\ncake_tcph_may_drop) could read one byte out of bounds. When the length\nis 1, the execution flow gets into the loop, reads one byte of the\nopcode, and if the opcode is neither TCPOPT_EOL nor TCPOPT_NOP, it reads\none more byte, which exceeds the length of 1.\n\nThis fix is inspired by commit 9609dad263f8 (\"ipv4: tcp_input: fix stack\nout of bounds when parsing TCP options.\").\n\nv2 changes:\n\nAdded doff validation in cake_get_tcphdr to avoid parsing garbage as TCP\nheader. Although it wasn't strictly an out-of-bounds access (memory was\nallocated), garbage values could be read where CAKE expected the TCP\nheader if doff was smaller than 5.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nsch_cake: Fix out of bounds when parsing TCP options and header\n\nThe TCP option parser in cake qdisc (cake_get_tcpopt and\ncake_tcph_may_drop) could read one byte out of bounds. When the length\nis 1, the execution flow gets into the loop, reads one byte of the\nopcode, and if the opcode is neither TCPOPT_EOL nor TCPOPT_NOP, it reads\none more byte, which exceeds the length of 1.\n\nThis fix is inspired by commit 9609dad263f8 (\"ipv4: tcp_input: fix stack\nout of bounds when parsing TCP options.\").\n\nv2 changes:\n\nAdded doff validation in cake_get_tcphdr to avoid parsing garbage as TCP\nheader. Although it wasn't strictly an out-of-bounds access (memory was\nallocated), garbage values could be read where CAKE expected the TCP\nheader if doff was smaller than 5.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se resolvió la siguiente vulnerabilidad: sch_cake: Corrección de límites al analizar las opciones TCP y el encabezado. El analizador de opciones TCP en cake qdisc (cake_get_tcpopt y cake_tcph_may_drop) podía leer un byte fuera de los límites. Cuando la longitud es 1, el flujo de ejecución entra en el bucle, lee un byte del código de operación y, si el código de operación no es TCPOPT_EOL ni TCPOPT_NOP, lee un byte más, que excede la longitud de 1. Esta solución está inspirada en la confirmación. 9609dad263f8 (\"ipv4: tcp_input: corrige la pila fuera de los límites al analizar las opciones de TCP\"). Cambios en v2: Se agregó validación de doff en cake_get_tcphdr para evitar analizar basura como encabezado TCP. Aunque no era estrictamente un acceso fuera de los límites (se asignó memoria), se podían leer valores basura donde CAKE esperaba el encabezado TCP si doff era menor que 5.","source":"nvd"}],"published":"2024-05-21T14:19:42.309Z","modified":"2026-08-05T08:46:54.221Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","score":7.1,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","score":7.1,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","score":7.1,"rating":"HIGH"}],"cwes":["CWE-125"],"affected":[{"ranges":[{"type":"git","introduced":"8b7138814f29933898ecd31dfc83e35a30ee69f5","fixed":"595897ef118d6fe66690c4fc5b572028c9da95b7","status":"affected"},{"type":"git","introduced":"8b7138814f29933898ecd31dfc83e35a30ee69f5","fixed":"4cefa061fc63f4d2dff5ab4083f43857cd7a2335","status":"affected"},{"type":"git","introduced":"8b7138814f29933898ecd31dfc83e35a30ee69f5","fixed":"3b491dd593d582ceeb27aa617600712a6bd14246","status":"affected"},{"type":"git","introduced":"8b7138814f29933898ecd31dfc83e35a30ee69f5","fixed":"3371392c60e2685af30bd4547badd880f5df2b3f","status":"affected"},{"type":"git","introduced":"8b7138814f29933898ecd31dfc83e35a30ee69f5","fixed":"ba91c49dedbde758ba0b72f57ac90b06ddf8e548","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.19","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.19","status":"unaffected"},{"type":"semver","introduced":"4.19.196","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.128","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.46","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.12.13","lastAffected":"5.12.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.13","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"4.19","fixed":"4.19.196"},{"status":"affected","introduced":"4.20","fixed":"5.4.128"},{"status":"affected","introduced":"5.5","fixed":"5.10.46"},{"status":"affected","introduced":"5.11","fixed":"5.12.13"},{"status":"affected","version":"5.13"},{"status":"affected","version":"5.13"},{"status":"affected","version":"5.13"},{"status":"affected","version":"5.13"},{"status":"affected","version":"5.13"},{"status":"affected","version":"5.13"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/595897ef118d6fe66690c4fc5b572028c9da95b7","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4cefa061fc63f4d2dff5ab4083f43857cd7a2335","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3b491dd593d582ceeb27aa617600712a6bd14246","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3371392c60e2685af30bd4547badd880f5df2b3f","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ba91c49dedbde758ba0b72f57ac90b06ddf8e548","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-09-10T15:39:57.595Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-47243","url":"https://www.cve.org/CVERecord?id=CVE-2021-47243","licence":"CVE Terms of Use","modified":"2026-08-05T08:46:54.221Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-47243","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-47243","licence":"Public domain","modified":"2026-08-04T10:16:54.377Z"}],"updatedAt":"2026-11-25T22:58:08.753Z","epss":{"score":0.00261,"percentile":0.19118,"date":"2026-12-01T12:00:22.000Z"}}