{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-40937","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2024-07-12T12:17:45.584Z","datePublished":"2024-07-12T12:25:13.807Z","dateUpdated":"2026-08-05T11:34:07.395Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T11:34:07.395Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ngve: Clear napi->skb before dev_kfree_skb_any()\n\ngve_rx_free_skb incorrectly leaves napi->skb referencing an skb after it\nis freed with dev_kfree_skb_any(). This can result in a subsequent call\nto napi_get_frags returning a dangling pointer.\n\nFix this by clearing napi->skb before the skb is freed."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":9.8,"baseSeverity":"CRITICAL"},"scenarios":[{"lang":"en","value":"AV:N - The vulnerable code is the gVNIC DQO NAPI receive poll (`gve_rx_poll_dqo`), executed in softirq context for every frame arriving on the wire. gve is the primary NIC on Google Compute Engine instances that are routinely internet-facing, so a remote attacker reaches the code purely by sending packets.\nAC:L - The attacker controls both trigger ingredients — packet shape (large multi-buffer/RSC frames above rx_copybreak, malformed or truncated frames causing the device to set rx_error mid-packet) and the traffic volume that drives the GFP_ATOMIC allocation failures in gve_rx_append_frags/gve_rx_copy_ondemand. The error path can be provoked repeatedly at line rate until it lands.\nPR:N - There is no syscall, ioctl, socket, capability check or authentication anywhere on the path; the receive poll runs unconditionally on incoming frames. An entirely unauthenticated off-host attacker can reach it.\nUI:N - No victim action is required — the driver processes received packets automatically in softirq context. Simply having the interface up is sufficient.\nS:U - The corruption is confined to the kernel's own memory within the same security authority; there is no crossing of a VM, IOMMU or sandbox boundary. Standard kernel-level compromise is Unchanged.\nC:H - The stale napi->skb is a freed sk_buff on the heavily-sprayable skbuff_head_cache; the driver and the subsequent napi_gro_frags/GRO path read skb->head, skb->data, skb_headlen and skb_shinfo from reallocated memory, so attacker-groomed or unrelated kernel data is parsed and can be leaked out via the receive path.\nI:H - The dangling pointer is written through — skb_add_rx_frag updates len/data_len/truesize and skb_shinfo, and gve_rx_complete_skb writes hash, ip_summed, gso_type and gso_size into freed memory — giving a write-after-free into a general-purpose slab plus a subsequent double free, which is the classic basis for control-flow hijack and privilege escalation.\nA:H - Use of the freed sk_buff reliably produces slab corruption, KASAN splats, list corruption and kernel panics, and the double free of the skb compounds this. A remote attacker can crash the host repeatedly."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/google/gve/gve_rx_dqo.c"],"versions":[{"version":"9b8dd5e5ea48bbb7532d20c4093a79d8283e4029","lessThan":"75afd8724739ee5ed8165acde5f6ac3988b485cc","status":"affected","versionType":"git"},{"version":"9b8dd5e5ea48bbb7532d20c4093a79d8283e4029","lessThan":"d221284991118c0ab16480b53baecd857c0bc442","status":"affected","versionType":"git"},{"version":"9b8dd5e5ea48bbb7532d20c4093a79d8283e4029","lessThan":"2ce5341c36993b776012601921d7688693f8c037","status":"affected","versionType":"git"},{"version":"9b8dd5e5ea48bbb7532d20c4093a79d8283e4029","lessThan":"a68184d5b420ea4fc7e6b7ceb52bbc66f90d3c50","status":"affected","versionType":"git"},{"version":"9b8dd5e5ea48bbb7532d20c4093a79d8283e4029","lessThan":"6f4d93b78ade0a4c2cafd587f7b429ce95abb02e","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/google/gve/gve_rx_dqo.c"],"versions":[{"version":"5.14","status":"affected"},{"version":"0","lessThan":"5.14","status":"unaffected","versionType":"semver"},{"version":"5.15.162","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.1.95","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.35","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.9.6","lessThanOrEqual":"6.9.*","status":"unaffected","versionType":"semver"},{"version":"6.10","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"5.15.162"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"6.1.95"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"6.6.35"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"6.9.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"6.10"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/75afd8724739ee5ed8165acde5f6ac3988b485cc"},{"url":"https://git.kernel.org/stable/c/d221284991118c0ab16480b53baecd857c0bc442"},{"url":"https://git.kernel.org/stable/c/2ce5341c36993b776012601921d7688693f8c037"},{"url":"https://git.kernel.org/stable/c/a68184d5b420ea4fc7e6b7ceb52bbc66f90d3c50"},{"url":"https://git.kernel.org/stable/c/6f4d93b78ade0a4c2cafd587f7b429ce95abb02e"}],"title":"gve: Clear napi->skb before dev_kfree_skb_any()","x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/75afd8724739ee5ed8165acde5f6ac3988b485cc","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/d221284991118c0ab16480b53baecd857c0bc442","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/2ce5341c36993b776012601921d7688693f8c037","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/a68184d5b420ea4fc7e6b7ceb52bbc66f90d3c50","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/6f4d93b78ade0a4c2cafd587f7b429ce95abb02e","tags":["x_transferred"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"}],"providerMetadata":{"orgId":"af854a3a-2127-422b-91ae-364da2661108","shortName":"CVE","dateUpdated":"2025-11-03T21:58:03.988Z"}},{"metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-40937","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-09-10T17:04:39.753649Z"}}}],"title":"CISA ADP Vulnrichment","providerMetadata":{"orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP","dateUpdated":"2024-09-11T17:34:26.574Z"}}]}}