{"id":"CVE-2026-139618","state":"PUBLISHED","title":"bpf: Fix uninit read for helper mem args on partially spilled slots","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix uninit read for helper mem args on partially spilled slots\n\ncheck_stack_range_initialized() takes the spilled register path when\nbpf_is_spilled_reg(ss) holds, which, however, only looks at the last\nbyte of the slot. Hence, a partially spilled scalar (on the lower part)\nbypasses the check and the following loads:\n\n0: (b7) r1 = 1                        ; R1=1\n1: (63) *(u32 *)(r10 -8) = r1         ; R1=1 R10=fp0 fp-8=????1\n2: (18) r1 = 0x0                      ; R1=map_ptr(map=rb,ks=0,vs=0)\n4: (bf) r2 = r10                      ; R2=fp0 R10=fp0\n5: (07) r2 += -8                      ; R2=fp-8\n6: (b7) r3 = 8                        ; R3=8\n7: (b7) r4 = 0                        ; R4=0\n8: (85) call bpf_ringbuf_output#130\n...\n\nWhen executed, it dumps the uninit four bytes:\n\tRINGBUF: 01 00 00 00 ff ff ff ff\n\nThis is the same root cause as the non-fetch atomic case fixed in\ncommit 5a84b4424db8 (\"bpf: Fix uninit read for non-fetch atomics on\npartially spilled slots\").\n\nFix by only taking the spilled register path for the bytes marked\nSTACK_SPILL, so the rest of the slot goes through the usual checks.","publishedAt":"2026-11-30T13:36:25.010Z","updatedAt":"2026-11-30T13:36:25.010Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"354e8f1970f821d4952458f77b1ab6c3eb24d530","status":"affected","lessThan":"169884f932924796d6947fc6adcabd5fc2d92575","versionType":"git"},{"version":"354e8f1970f821d4952458f77b1ab6c3eb24d530","status":"affected","lessThan":"e81530cbce0b751936d962cabe43a8436aaae109","versionType":"git"},{"version":"354e8f1970f821d4952458f77b1ab6c3eb24d530","status":"affected","lessThan":"f3bd942493c912fd84a5c3fe57b7ea31083988b6","versionType":"git"},{"version":"354e8f1970f821d4952458f77b1ab6c3eb24d530","status":"affected","lessThan":"b3861495d2b2f7459cddf49e63fa0758ba430583","versionType":"git"},{"version":"8de8c4a25ed8924b09cf8cd542feea854d5ee5bf","status":"affected","versionType":"git"},{"version":"7b86f9ab56924ca56cde927d461165127b6b472e","status":"affected","versionType":"git"},{"version":"5.10.168","status":"affected","lessThan":"5.11","versionType":"semver"},{"version":"5.15.93","status":"affected","lessThan":"5.16","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/verifier.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.16","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/verifier.c"]}],"references":["https://git.kernel.org/stable/c/169884f932924796d6947fc6adcabd5fc2d92575","https://git.kernel.org/stable/c/e81530cbce0b751936d962cabe43a8436aaae109","https://git.kernel.org/stable/c/f3bd942493c912fd84a5c3fe57b7ea31083988b6","https://git.kernel.org/stable/c/b3861495d2b2f7459cddf49e63fa0758ba430583"],"weaknesses":[],"ingestedAt":"2026-11-30T13:52:04.503Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139618.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139618","state":"PUBLISHED","datePublished":"2026-11-30T13:36:25.010Z","dateUpdated":"2026-11-30T13:36:25.010Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.943Z"},"containers":{"cna":{"title":"bpf: Fix uninit read for helper mem args on partially spilled slots","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix uninit read for helper mem args on partially spilled slots\n\ncheck_stack_range_initialized() takes the spilled register path when\nbpf_is_spilled_reg(ss) holds, which, however, only looks at the last\nbyte of the slot. Hence, a partially spilled scalar (on the lower part)\nbypasses the check and the following loads:\n\n0: (b7) r1 = 1                        ; R1=1\n1: (63) *(u32 *)(r10 -8) = r1         ; R1=1 R10=fp0 fp-8=????1\n2: (18) r1 = 0x0                      ; R1=map_ptr(map=rb,ks=0,vs=0)\n4: (bf) r2 = r10                      ; R2=fp0 R10=fp0\n5: (07) r2 += -8                      ; R2=fp-8\n6: (b7) r3 = 8                        ; R3=8\n7: (b7) r4 = 0                        ; R4=0\n8: (85) call bpf_ringbuf_output#130\n...\n\nWhen executed, it dumps the uninit four bytes:\n\tRINGBUF: 01 00 00 00 ff ff ff ff\n\nThis is the same root cause as the non-fetch atomic case fixed in\ncommit 5a84b4424db8 (\"bpf: Fix uninit read for non-fetch atomics on\npartially spilled slots\").\n\nFix by only taking the spilled register path for the bytes marked\nSTACK_SPILL, so the rest of the slot goes through the usual checks."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"354e8f1970f821d4952458f77b1ab6c3eb24d530","status":"affected","lessThan":"169884f932924796d6947fc6adcabd5fc2d92575","versionType":"git"},{"version":"354e8f1970f821d4952458f77b1ab6c3eb24d530","status":"affected","lessThan":"e81530cbce0b751936d962cabe43a8436aaae109","versionType":"git"},{"version":"354e8f1970f821d4952458f77b1ab6c3eb24d530","status":"affected","lessThan":"f3bd942493c912fd84a5c3fe57b7ea31083988b6","versionType":"git"},{"version":"354e8f1970f821d4952458f77b1ab6c3eb24d530","status":"affected","lessThan":"b3861495d2b2f7459cddf49e63fa0758ba430583","versionType":"git"},{"version":"8de8c4a25ed8924b09cf8cd542feea854d5ee5bf","status":"affected","versionType":"git"},{"version":"7b86f9ab56924ca56cde927d461165127b6b472e","status":"affected","versionType":"git"},{"version":"5.10.168","status":"affected","lessThan":"5.11","versionType":"semver"},{"version":"5.15.93","status":"affected","lessThan":"5.16","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/verifier.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.16","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/verifier.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/169884f932924796d6947fc6adcabd5fc2d92575"},{"url":"https://git.kernel.org/stable/c/e81530cbce0b751936d962cabe43a8436aaae109"},{"url":"https://git.kernel.org/stable/c/f3bd942493c912fd84a5c3fe57b7ea31083988b6"},{"url":"https://git.kernel.org/stable/c/b3861495d2b2f7459cddf49e63fa0758ba430583"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:36:25.010Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"6.12.120"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"6.18.66"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"7.4-rc1"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10.168"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15.93"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}