bpf: Reject non-negative offsets in stack_slot_obj_get_spi()
In the Linux kernel, the following vulnerability has been resolved: bpf: Reject non-negative offsets in stack_slot_obj_get_spi() bpf_get_spi() computes (-off - 1) / BPF_REG_SIZE using C division, which truncates toward zero. For off == 0, this produces spi 0, the same index used by the valid stack slot at fp-8. stack_slot_obj_get_spi() currently checks alignment and the resulting spi bounds, but does not reject the non-negative offset itself. It can therefore validate a PTR_TO_STACK register holding fp+0 against an iterator stored at fp-8 even though the runtime receives the actual fp+0 pointer. An effectful iterator kfunc can then interpret memory outside the BPF stack as iterator state. Reject non-negative offsets before converting the offset to an spi. All valid stack objects begin at a negative offset from the frame pointer.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 7.2.9
- CVEs
- CVE-2026-98599
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 01:34 UTC · Revision 1
Source evidence
bpf: Reject non-negative offsets in stack_slot_obj_get_spi()
core-osv · Original sourcePublished 18 Oct 2026, 15:19 UTC
In the Linux kernel, the following vulnerability has been resolved: bpf: Reject non-negative offsets in stack_slot_obj_get_spi() bpf_get_spi() computes (-off - 1) / BPF_REG_SIZE using C division, which truncates toward zero. For off == 0, this produces spi 0, the same index used by the valid stack slot at fp-8. stack_slot_obj_get_spi() currently checks alignment and the resulting spi bounds, but does not reject the non-negative offset itself. It can therefore validate a PTR_TO_STACK register holding fp+0 against an iterator stored at fp-8 even though the runtime receives the actual fp+0 pointer. An effectful iterator kfunc can then interpret memory outside the BPF stack as iterator state. Reject non-negative offsets before converting the offset to an spi. All valid stack objects begin at a negative offset from the frame pointer.
osv:CVE-2026-98599
Kernel
Fixed versions: 7.2.9
Complete source record
{
"id": "3518aff04bea50a5f58db115742b7510634f3dda69ec17b3fcbd0fa3a3188723",
"url": "https://osv.dev/vulnerability/CVE-2026-98599",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "bpf: Reject non-negative offsets in stack_slot_obj_get_spi()",
"summary": "In the Linux kernel, the following vulnerability has been resolved: bpf: Reject non-negative offsets in stack_slot_obj_get_spi() bpf_get_spi() computes (-off - 1) / BPF_REG_SIZE using C division, which truncates toward zero. For off == 0, this produces spi 0, the same index used by the valid stack slot at fp-8. stack_slot_obj_get_spi() currently checks alignment and the resulting spi bounds, but does not reject the non-negative offset itself. It can therefore validate a PTR_TO_STACK register holding fp+0 against an iterator stored at fp-8 even though the runtime receives the actual fp+0 pointer. An effectful iterator kfunc can then interpret memory outside the BPF stack as iterator state. Reject non-negative offsets before converting the offset to an spi. All valid stack objects begin at a negative offset from the frame pointer.",
"evidence": "osv:CVE-2026-98599",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "7.2.9",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2026-98599",
"aliases": [
"CVE-2026-98599"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "06accc8779c1d558a5b5a21f2ac82b0c95827ddd"
},
{
"fixed": "89a7241fc7ecc1b5e47c3f071081e314523b8d9d"
},
{
"fixed": "79a9172f3ab4ad8392c5e5c8944b9b7710ade620"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98599.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.4.0"
},
{
"fixed": "7.2.9"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98599.json"
}
}
],
"modified": "2026-10-28T02:30:24.982174373Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/79a9172f3ab4ad8392c5e5c8944b9b7710ade620",
"https://git.kernel.org/stable/c/89a7241fc7ecc1b5e47c3f071081e314523b8d9d",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98599.json",
"https://nvd.nist.gov/vuln/detail/CVE-2026-98599",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98599.json"
}
},
"related_cves": [
{
"value": "CVE-2026-98599",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 491648,
"published_at": "2026-10-18T15:19:11.941+00:00"
}