{"id":"CVE-2026-98599","state":"PUBLISHED","title":"bpf: Reject non-negative offsets in stack_slot_obj_get_spi()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Reject non-negative offsets in stack_slot_obj_get_spi()\n\nbpf_get_spi() computes (-off - 1) / BPF_REG_SIZE using C division,\nwhich truncates toward zero. For off == 0, this produces spi 0, the\nsame index used by the valid stack slot at fp-8.\n\nstack_slot_obj_get_spi() currently checks alignment and the resulting\nspi bounds, but does not reject the non-negative offset itself. It can\ntherefore validate a PTR_TO_STACK register holding fp+0 against an\niterator stored at fp-8 even though the runtime receives the actual fp+0\npointer. An effectful iterator kfunc can then interpret memory outside\nthe BPF stack as iterator state.\n\nReject non-negative offsets before converting the offset to an spi. All\nvalid stack objects begin at a negative offset from the frame pointer.","publishedAt":"2026-10-18T15:19:11.941Z","updatedAt":"2026-10-19T09:22:25.359Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"06accc8779c1d558a5b5a21f2ac82b0c95827ddd","status":"affected","lessThan":"89a7241fc7ecc1b5e47c3f071081e314523b8d9d","versionType":"git"},{"version":"06accc8779c1d558a5b5a21f2ac82b0c95827ddd","status":"affected","lessThan":"79a9172f3ab4ad8392c5e5c8944b9b7710ade620","versionType":"git"}],"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":"6.4","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.4","versionType":"semver"},{"version":"7.2.9","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","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/89a7241fc7ecc1b5e47c3f071081e314523b8d9d","https://git.kernel.org/stable/c/79a9172f3ab4ad8392c5e5c8944b9b7710ade620"],"weaknesses":[],"ingestedAt":"2026-10-29T20:13:43.249Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/98xxx/CVE-2026-98599.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-98599","state":"PUBLISHED","datePublished":"2026-10-18T15:19:11.941Z","dateUpdated":"2026-10-19T09:22:25.359Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-09-25T10:25:14.359Z"},"containers":{"cna":{"title":"bpf: Reject non-negative offsets in stack_slot_obj_get_spi()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Reject non-negative offsets in stack_slot_obj_get_spi()\n\nbpf_get_spi() computes (-off - 1) / BPF_REG_SIZE using C division,\nwhich truncates toward zero. For off == 0, this produces spi 0, the\nsame index used by the valid stack slot at fp-8.\n\nstack_slot_obj_get_spi() currently checks alignment and the resulting\nspi bounds, but does not reject the non-negative offset itself. It can\ntherefore validate a PTR_TO_STACK register holding fp+0 against an\niterator stored at fp-8 even though the runtime receives the actual fp+0\npointer. An effectful iterator kfunc can then interpret memory outside\nthe BPF stack as iterator state.\n\nReject non-negative offsets before converting the offset to an spi. All\nvalid stack objects begin at a negative offset from the frame pointer."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"06accc8779c1d558a5b5a21f2ac82b0c95827ddd","status":"affected","lessThan":"89a7241fc7ecc1b5e47c3f071081e314523b8d9d","versionType":"git"},{"version":"06accc8779c1d558a5b5a21f2ac82b0c95827ddd","status":"affected","lessThan":"79a9172f3ab4ad8392c5e5c8944b9b7710ade620","versionType":"git"}],"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":"6.4","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.4","versionType":"semver"},{"version":"7.2.9","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","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/89a7241fc7ecc1b5e47c3f071081e314523b8d9d"},{"url":"https://git.kernel.org/stable/c/79a9172f3ab4ad8392c5e5c8944b9b7710ade620"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-19T09:22:25.359Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.4","versionEndExcluding":"7.2.9"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.4","versionEndExcluding":"7.3"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}