{"id":"CVE-2026-89906","state":"PUBLISHED","title":"LoongArch: BPF: Refactor jump offset calculation in tail call","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nLoongArch: BPF: Refactor jump offset calculation in tail call\n\nThe old macro-based jmp_offset calculation derives the jump distance\nfrom a stale prior-pass code stride, which can lead to wrong branch\noffsets and soft lockups under extra JIT passes.\n\nFix this by calculating the offset directly on the absolute target:\n\"ctx->offset[insn + 1] - ctx->idx\".\n\nTo avoid a false 16-bit range check abort during size estimation, add\na \"ctx->image == NULL\" guard to inject a safe dummy offset.","publishedAt":"2026-09-16T10:32:05.157Z","updatedAt":"2026-10-21T12:49:06.262Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"17c010fe45def335fe03a0718935416b04c7f349","status":"affected","lessThan":"50fbc294e4e96246d60cd66f98acf043a362e3a0","versionType":"git"},{"version":"f83d469e16bb1f75991ca67c56786fb2aaa42bea","status":"affected","lessThan":"89819868cde78cb2f748533785a46a3430873f20","versionType":"git"},{"version":"cd39d9e6b7e4c58fa77783e7aedf7ada51d02ea3","status":"affected","lessThan":"882b8912b7e92341fdb115ba0e2e5142a28684ff","versionType":"git"},{"version":"cd39d9e6b7e4c58fa77783e7aedf7ada51d02ea3","status":"affected","lessThan":"96f44d493c280ea161569c43d7ed0f3b0815803a","versionType":"git"},{"version":"cd39d9e6b7e4c58fa77783e7aedf7ada51d02ea3","status":"affected","lessThan":"37d545d12f21c4d50612ecaebd7ae1e5bf91b2d8","versionType":"git"},{"version":"1a782fa32e644aa9fbae6c8488f3e61221ac96e1","status":"affected","versionType":"git"},{"version":"f2b5e50cc04d7a049b385bc1c93b9cbf5f10c94f","status":"affected","versionType":"git"},{"version":"9262e3e04621558e875eb5afb5e726b648cd5949","status":"affected","versionType":"git"},{"version":"6.6.103","status":"affected","lessThan":"6.6.160","versionType":"semver"},{"version":"6.12.43","status":"affected","lessThan":"6.12.114","versionType":"semver"},{"version":"6.1.149","status":"affected","lessThan":"6.2","versionType":"semver"},{"version":"6.15.11","status":"affected","lessThan":"6.16","versionType":"semver"},{"version":"6.16.2","status":"affected","lessThan":"6.17","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/loongarch/net/bpf_jit.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.17","versionType":"semver"},{"version":"6.6.160","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.114","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.51","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.5","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":["arch/loongarch/net/bpf_jit.c"]}],"references":["https://git.kernel.org/stable/c/50fbc294e4e96246d60cd66f98acf043a362e3a0","https://git.kernel.org/stable/c/89819868cde78cb2f748533785a46a3430873f20","https://git.kernel.org/stable/c/882b8912b7e92341fdb115ba0e2e5142a28684ff","https://git.kernel.org/stable/c/96f44d493c280ea161569c43d7ed0f3b0815803a","https://git.kernel.org/stable/c/37d545d12f21c4d50612ecaebd7ae1e5bf91b2d8"],"weaknesses":[],"ingestedAt":"2026-10-29T20:13:26.108Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/89xxx/CVE-2026-89906.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-89906","state":"PUBLISHED","datePublished":"2026-09-16T10:32:05.157Z","dateUpdated":"2026-10-21T12:49:06.262Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-09-11T19:38:34.774Z"},"containers":{"cna":{"title":"LoongArch: BPF: Refactor jump offset calculation in tail call","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nLoongArch: BPF: Refactor jump offset calculation in tail call\n\nThe old macro-based jmp_offset calculation derives the jump distance\nfrom a stale prior-pass code stride, which can lead to wrong branch\noffsets and soft lockups under extra JIT passes.\n\nFix this by calculating the offset directly on the absolute target:\n\"ctx->offset[insn + 1] - ctx->idx\".\n\nTo avoid a false 16-bit range check abort during size estimation, add\na \"ctx->image == NULL\" guard to inject a safe dummy offset."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"17c010fe45def335fe03a0718935416b04c7f349","status":"affected","lessThan":"50fbc294e4e96246d60cd66f98acf043a362e3a0","versionType":"git"},{"version":"f83d469e16bb1f75991ca67c56786fb2aaa42bea","status":"affected","lessThan":"89819868cde78cb2f748533785a46a3430873f20","versionType":"git"},{"version":"cd39d9e6b7e4c58fa77783e7aedf7ada51d02ea3","status":"affected","lessThan":"882b8912b7e92341fdb115ba0e2e5142a28684ff","versionType":"git"},{"version":"cd39d9e6b7e4c58fa77783e7aedf7ada51d02ea3","status":"affected","lessThan":"96f44d493c280ea161569c43d7ed0f3b0815803a","versionType":"git"},{"version":"cd39d9e6b7e4c58fa77783e7aedf7ada51d02ea3","status":"affected","lessThan":"37d545d12f21c4d50612ecaebd7ae1e5bf91b2d8","versionType":"git"},{"version":"1a782fa32e644aa9fbae6c8488f3e61221ac96e1","status":"affected","versionType":"git"},{"version":"f2b5e50cc04d7a049b385bc1c93b9cbf5f10c94f","status":"affected","versionType":"git"},{"version":"9262e3e04621558e875eb5afb5e726b648cd5949","status":"affected","versionType":"git"},{"version":"6.6.103","status":"affected","lessThan":"6.6.160","versionType":"semver"},{"version":"6.12.43","status":"affected","lessThan":"6.12.114","versionType":"semver"},{"version":"6.1.149","status":"affected","lessThan":"6.2","versionType":"semver"},{"version":"6.15.11","status":"affected","lessThan":"6.16","versionType":"semver"},{"version":"6.16.2","status":"affected","lessThan":"6.17","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/loongarch/net/bpf_jit.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.17","versionType":"semver"},{"version":"6.6.160","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.114","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.51","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.5","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":["arch/loongarch/net/bpf_jit.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/50fbc294e4e96246d60cd66f98acf043a362e3a0"},{"url":"https://git.kernel.org/stable/c/89819868cde78cb2f748533785a46a3430873f20"},{"url":"https://git.kernel.org/stable/c/882b8912b7e92341fdb115ba0e2e5142a28684ff"},{"url":"https://git.kernel.org/stable/c/96f44d493c280ea161569c43d7ed0f3b0815803a"},{"url":"https://git.kernel.org/stable/c/37d545d12f21c4d50612ecaebd7ae1e5bf91b2d8"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The bug is in the LoongArch eBPF JIT emit_bpf_tail_call() and is reached only by loading a program that uses bpf_tail_call via bpf(BPF_PROG_LOAD) on the local host. Kernel CNA guidance classifies BPF as a local attack vector.\nAC:L - The attacker fully controls the BPF bytecode, including bpf2bpf subprograms that force the extra JIT pass where the stale prior-pass stride is used. Wrong jmp_offset encodings are deterministic for a given program (the in-tree tailcall_bpf2bpf_1 case), with no race or layout outside attacker control.\nPR:L - BPF_MAP_TYPE_PROG_ARRAY is an unprivileged map type, bpf_tail_call_proto is returned before the CAP_BPF gate, and SOCKET_FILTER programs load without CAP_BPF where unprivileged BPF is enabled. Otherwise only CAP_BPF or a delegated BPF token in a user namespace is required, not init-namespace root.\nUI:N - The attacker loads the crafted program, attaches it to a socket they own or runs it with BPF_PROG_TEST_RUN, and triggers the miscompiled tail call themselves. No separate victim action is required.\nS:U - The wrong branches execute inside the host kernel's own JIT image and corrupt in-kernel control flow. That is standard kernel privilege-escalation impact, not a VM, IOMMU, or hypervisor boundary crossing.\nC:H - Miscomputed tail-call \"goto out\" branches can land inside the remaining sequence after the max_entries check, so an out-of-range index performs an OOB load of array->ptrs[] and treats the result as a function pointer, disclosing kernel memory. Mid-image jumps likewise execute attacker-shaped JIT loads at kernel privilege.\nI:H - The same OOB ptrs[] load is followed by an indirect jump through prog->bpf_func, hijacking kernel control flow. Branches that skip the NULL or tail-call-count checks, or that land mid-instruction, likewise yield a kernel-mode write and control-flow primitive.\nA:H - The fix and the prior incomplete tail-call offset patch document watchdog soft lockups from wrong, including backward, branches looping in kernel context. Any such hang, oops, or panic is Availability High."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-21T12:49:06.262Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6.103","versionEndExcluding":"6.6.160"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12.43","versionEndExcluding":"6.12.114"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.17","versionEndExcluding":"6.18.51"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.17","versionEndExcluding":"7.2.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.17","versionEndExcluding":"7.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1.149"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15.11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.16.2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}