{"id":"CVE-2022-49340","summary":"ip_gre: test csum_start instead of transport header","details":"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) \u003c skb-\u003edata)\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-\u003eip_summed == CHECKSUM_PARTIAL &&\n\t    skb_checksum_start(skb) \u003c skb-\u003edata)\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.","modified":"2026-11-13T04:00:42.998191139Z","published":"2025-02-26T02:10:57.322Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49340.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/0c92d813c7c9ca2212ecd879232e7d87362fce98"},{"type":"WEB","url":"https://git.kernel.org/stable/c/0ffa268724656633af5f37a38c212326d98ebe8c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/3d08bc3a5d9b2106f5c8bcf1adb73147824aa006"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7596bd7920985f7fc8579a92e48bc53ce4475b21"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8d21e9963bec1aad2280cdd034c8993033ef2948"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e6b6f98fc7605c06c0a3baa70f62c534d7b4ce58"},{"type":"WEB","url":"https://git.kernel.org/stable/c/fbeb8dfa8b87ef259eef0c89e39b53962a3cf604"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49340.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49340"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"774430026bd9a472d08c5d3c33351a782315771a"},{"fixed":"7596bd7920985f7fc8579a92e48bc53ce4475b21"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"3d32ce5472bb2ca720bef84089b85f76a705fd1a"},{"fixed":"3d08bc3a5d9b2106f5c8bcf1adb73147824aa006"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"87b34cd6485192777f632f92d592f2a71d8801a6"},{"fixed":"fbeb8dfa8b87ef259eef0c89e39b53962a3cf604"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"8a0ed250f911da31a2aef52101bc707846a800ff"},{"fixed":"e6b6f98fc7605c06c0a3baa70f62c534d7b4ce58"},{"fixed":"0c92d813c7c9ca2212ecd879232e7d87362fce98"},{"fixed":"0ffa268724656633af5f37a38c212326d98ebe8c"},{"fixed":"8d21e9963bec1aad2280cdd034c8993033ef2948"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"4bf5d5224ffca069df4501ba5fcc6ded9c002ead"}]}],"versions":["v4.19.246","v4.19.245","v4.19.244","v4.19.243","v4.19.242","v4.19.241","v4.19.240","v4.19.239","v4.19.238","v4.19.237","v4.19.236","v4.19.235","v4.19.234","v4.19.233","v4.19.232","v4.19.231","v4.19.230","v4.19.229","v4.19.228","v4.19.227","v4.19.226","v4.19.225","v4.19.224","v4.19.223","v4.19.222","v4.19.221","v4.19.220","v4.19.219","v4.19.218","v4.19.217","v4.19.216","v4.19.215","v4.19.214","v4.19.213","v4.19.212","v4.19.211","v4.19.210","v4.19.209","v4.19.208","v4.19.207","v5.4.197","v5.4.196","v5.4.195","v5.4.194","v5.4.193","v5.4.192","v5.4.191","v5.4.190","v5.4.189","v5.4.188","v5.4.187","v5.4.186","v5.4.185","v5.4.184","v5.4.183","v5.4.182","v5.4.181","v5.4.180","v5.4.179","v5.4.178","v5.4.177","v5.4.176","v5.4.175","v5.4.174","v5.4.173","v5.4.172","v5.4.171","v5.4.170","v5.4.169","v5.4.168","v5.4.167","v5.4.166","v5.4.165","v5.4.164","v5.4.163","v5.4.162","v5.4.161","v5.4.160","v5.4.159","v5.4.158","v5.4.157","v5.4.156","v5.4.155","v5.4.154","v5.4.153","v5.4.152","v5.4.151","v5.4.150","v5.4.149","v5.4.148","v5.10.121","v5.10.120","v5.10.119","v5.10.118","v5.10.117","v5.10.116","v5.10.115","v5.10.114","v5.10.113","v5.10.112","v5.10.111","v5.10.110","v5.10.109","v5.10.108","v5.10.107","v5.10.106","v5.10.105","v5.10.104","v5.10.103","v5.10.102","v5.10.101","v5.10.100","v5.10.99","v5.10.98","v5.10.97","v5.10.96","v5.10.95","v5.10.94","v5.10.93","v5.10.92","v5.10.91","v5.10.90","v5.10.89","v5.10.88","v5.10.87","v5.10.86","v5.10.85","v5.10.84","v5.10.83","v5.10.82","v5.10.81","v5.10.80","v5.10.79","v5.10.78","v5.10.77","v5.10.76","v5.10.75","v5.10.74","v5.10.73","v5.10.72","v5.10.71","v5.10.70","v5.10.69","v5.10.68","v5.14.21","v5.14.20","v5.14.19","v5.14.18","v5.14.17","v5.14.16","v5.14.15","v5.14.14","v5.14.13","v5.14.12","v5.14.11","v5.14.10","v5.14.9","v5.14.8","v5.14.7"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-49340.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.19.207"},{"fixed":"4.19.247"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.4.148"},{"fixed":"5.4.198"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.10.68"},{"fixed":"5.10.122"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.14.7"},{"fixed":"5.15"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.15.0"},{"fixed":"5.15.47"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"5.17.15"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.18.0"},{"fixed":"5.18.4"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-49340.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H"}]}