{"id":"CVE-2022-49340","aliases":["CVE-2022-49340"],"related":[],"kind":"vulnerability","state":"published","title":"ip_gre: test csum_start instead of transport header","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nip_gre: test csum_start instead of transport header\n\nGRE with TUNNEL_CSUM will apply local checksum offload on\nCHECKSUM_PARTIAL packets.\n\nipgre_xmit must validate csum_start after an optional skb_pull,\nelse lco_csum may trigger an overflow. The original check was\n\n\tif (csum && skb_checksum_start(skb) < skb->data)\n\t\treturn -EINVAL;\n\nThis had false positives when skb_checksum_start is undefined:\nwhen ip_summed is not CHECKSUM_PARTIAL. A discussed refinement\nwas straightforward\n\n\tif (csum && skb->ip_summed == CHECKSUM_PARTIAL &&\n\t    skb_checksum_start(skb) < skb->data)\n\t\treturn -EINVAL;\n\nBut was eventually revised more thoroughly:\n- restrict the check to the only branch where needed, in an\n  uncommon GRE path that uses header_ops and calls skb_pull.\n- test skb_transport_header, which is set along with csum_start\n  in skb_partial_csum_set in the normal header_ops datapath.\n\nTurns out skbs can arrive in this branch without the transport\nheader set, e.g., through BPF redirection.\n\nRevise the check back to check csum_start directly, and only if\nCHECKSUM_PARTIAL. Do leave the check in the updated location.\nCheck field regardless of whether TUNNEL_CSUM is configured.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nip_gre: test csum_start instead of transport header\n\nGRE with TUNNEL_CSUM will apply local checksum offload on\nCHECKSUM_PARTIAL packets.\n\nipgre_xmit must validate csum_start after an optional skb_pull,\nelse lco_csum may trigger an overflow. The original check was\n\n\tif (csum && skb_checksum_start(skb) < skb->data)\n\t\treturn -EINVAL;\n\nThis had false positives when skb_checksum_start is undefined:\nwhen ip_summed is not CHECKSUM_PARTIAL. A discussed refinement\nwas straightforward\n\n\tif (csum && skb->ip_summed == CHECKSUM_PARTIAL &&\n\t    skb_checksum_start(skb) < skb->data)\n\t\treturn -EINVAL;\n\nBut was eventually revised more thoroughly:\n- restrict the check to the only branch where needed, in an\n  uncommon GRE path that uses header_ops and calls skb_pull.\n- test skb_transport_header, which is set along with csum_start\n  in skb_partial_csum_set in the normal header_ops datapath.\n\nTurns out skbs can arrive in this branch without the transport\nheader set, e.g., through BPF redirection.\n\nRevise the check back to check csum_start directly, and only if\nCHECKSUM_PARTIAL. Do leave the check in the updated location.\nCheck field regardless of whether TUNNEL_CSUM is configured.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: ip_gre: prueba csum_start en lugar del encabezado de transporte GRE con TUNNEL_CSUM aplicará la descarga de suma de comprobación local en los paquetes CHECKSUM_PARTIAL. ipgre_xmit debe validar csum_start después de un skb_pull opcional, de lo contrario lco_csum puede provocar un desbordamiento. La comprobación original era if (csum &amp;&amp; skb_checksum_start(skb) &lt; skb-&gt;data) return -EINVAL; Esto tenía falsos positivos cuando skb_checksum_start no está definido: cuando ip_summed no es CHECKSUM_PARTIAL. Una mejora discutida fue sencilla if (csum &amp;&amp; skb-&gt;ip_summed == CHECKSUM_PARTIAL &amp;&amp; skb_checksum_start(skb) &lt; skb-&gt;data) return -EINVAL; Pero finalmente se revisó más a fondo: - restringir la verificación a la única rama donde sea necesario, en una ruta GRE poco común que usa header_ops y llama a skb_pull. - probar skb_transport_header, que se establece junto con csum_start en skb_partial_csum_set en la ruta de datos header_ops normal. Resulta que skbs puede llegar a esta rama sin el encabezado de transporte establecido, por ejemplo, a través de la redirección BPF. Revise la verificación nuevamente para verificar csum_start directamente, y solo si CHECKSUM_PARTIAL. Deje la verificación en la ubicación actualizada. Verifique el campo independientemente de si TUNNEL_CSUM está configurado.","source":"nvd"}],"published":"2025-02-26T02:10:57.322Z","modified":"2026-08-05T08:54:49.092Z","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:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"774430026bd9a472d08c5d3c33351a782315771a","fixed":"7596bd7920985f7fc8579a92e48bc53ce4475b21","status":"affected"},{"type":"git","introduced":"3d32ce5472bb2ca720bef84089b85f76a705fd1a","fixed":"3d08bc3a5d9b2106f5c8bcf1adb73147824aa006","status":"affected"},{"type":"git","introduced":"87b34cd6485192777f632f92d592f2a71d8801a6","fixed":"fbeb8dfa8b87ef259eef0c89e39b53962a3cf604","status":"affected"},{"type":"git","introduced":"8a0ed250f911da31a2aef52101bc707846a800ff","fixed":"e6b6f98fc7605c06c0a3baa70f62c534d7b4ce58","status":"affected"},{"type":"git","introduced":"8a0ed250f911da31a2aef52101bc707846a800ff","fixed":"0c92d813c7c9ca2212ecd879232e7d87362fce98","status":"affected"},{"type":"git","introduced":"8a0ed250f911da31a2aef52101bc707846a800ff","fixed":"0ffa268724656633af5f37a38c212326d98ebe8c","status":"affected"},{"type":"git","introduced":"8a0ed250f911da31a2aef52101bc707846a800ff","fixed":"8d21e9963bec1aad2280cdd034c8993033ef2948","status":"affected"},{"type":"git","version":"4bf5d5224ffca069df4501ba5fcc6ded9c002ead","status":"affected"},{"type":"semver","introduced":"4.19.207","fixed":"4.19.247","status":"affected"},{"type":"semver","introduced":"5.4.148","fixed":"5.4.198","status":"affected"},{"type":"semver","introduced":"5.10.68","fixed":"5.10.122","status":"affected"},{"type":"semver","introduced":"5.14.7","fixed":"5.15","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.15","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.15","status":"unaffected"},{"type":"semver","introduced":"4.19.247","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.198","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.122","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.47","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"5.17.15","lastAffected":"5.17.*","status":"unaffected"},{"type":"semver","introduced":"5.18.4","lastAffected":"5.18.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.19","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.207","fixed":"4.19.247"},{"status":"affected","introduced":"5.4.148","fixed":"5.4.198"},{"status":"affected","introduced":"5.10.68","fixed":"5.10.122"},{"status":"affected","introduced":"5.14.7","fixed":"5.15.47"},{"status":"affected","introduced":"5.16","fixed":"5.17.15"},{"status":"affected","introduced":"5.18","fixed":"5.18.4"},{"status":"affected","version":"5.19"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/7596bd7920985f7fc8579a92e48bc53ce4475b21","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3d08bc3a5d9b2106f5c8bcf1adb73147824aa006","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/fbeb8dfa8b87ef259eef0c89e39b53962a3cf604","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e6b6f98fc7605c06c0a3baa70f62c534d7b4ce58","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0c92d813c7c9ca2212ecd879232e7d87362fce98","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0ffa268724656633af5f37a38c212326d98ebe8c","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8d21e9963bec1aad2280cdd034c8993033ef2948","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-49340","url":"https://www.cve.org/CVERecord?id=CVE-2022-49340","licence":"CVE Terms of Use","modified":"2026-08-05T08:54:49.092Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-49340","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49340","licence":"Public domain","modified":"2026-08-04T10:17:45.080Z"}],"updatedAt":"2026-11-25T22:58:20.426Z","epss":{"score":0.00281,"percentile":0.22158,"date":"2026-12-01T12:00:22.000Z"}}