{"id":"CVE-2025-38723","aliases":["CVE-2025-38723"],"related":[],"kind":"vulnerability","state":"published","title":"LoongArch: BPF: Fix jump offset calculation in tailcall","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nLoongArch: BPF: Fix jump offset calculation in tailcall\n\nThe extra pass of bpf_int_jit_compile() skips JIT context initialization\nwhich essentially skips offset calculation leaving out_offset = -1, so\nthe jmp_offset in emit_bpf_tail_call is calculated by\n\n\"#define jmp_offset (out_offset - (cur_offset))\"\n\nis a negative number, which is wrong. The final generated assembly are\nas follow.\n\n54:\tbgeu        \t$a2, $t1, -8\t    # 0x0000004c\n58:\taddi.d      \t$a6, $s5, -1\n5c:\tbltz        \t$a6, -16\t    # 0x0000004c\n60:\talsl.d      \t$t2, $a2, $a1, 0x3\n64:\tld.d        \t$t2, $t2, 264\n68:\tbeq         \t$t2, $zero, -28\t    # 0x0000004c\n\nBefore apply this patch, the follow test case will reveal soft lock issues.\n\ncd tools/testing/selftests/bpf/\n./test_progs --allow=tailcalls/tailcall_bpf2bpf_1\n\ndmesg:\nwatchdog: BUG: soft lockup - CPU#2 stuck for 26s! [test_progs:25056]","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nLoongArch: BPF: Fix jump offset calculation in tailcall\n\nThe extra pass of bpf_int_jit_compile() skips JIT context initialization\nwhich essentially skips offset calculation leaving out_offset = -1, so\nthe jmp_offset in emit_bpf_tail_call is calculated by\n\n\"#define jmp_offset (out_offset - (cur_offset))\"\n\nis a negative number, which is wrong. The final generated assembly are\nas follow.\n\n54:\tbgeu        \t$a2, $t1, -8\t    # 0x0000004c\n58:\taddi.d      \t$a6, $s5, -1\n5c:\tbltz        \t$a6, -16\t    # 0x0000004c\n60:\talsl.d      \t$t2, $a2, $a1, 0x3\n64:\tld.d        \t$t2, $t2, 264\n68:\tbeq         \t$t2, $zero, -28\t    # 0x0000004c\n\nBefore apply this patch, the follow test case will reveal soft lock issues.\n\ncd tools/testing/selftests/bpf/\n./test_progs --allow=tailcalls/tailcall_bpf2bpf_1\n\ndmesg:\nwatchdog: BUG: soft lockup - CPU#2 stuck for 26s! [test_progs:25056]","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nLoongArch: BPF: Corrección del cálculo del desplazamiento de salto en tailcall\n\nLa pasada extra de bpf_int_jit_compile() omite la inicialización del contexto JIT, lo que esencialmente omite el cálculo del desplazamiento dejando out_offset = -1, por lo que el jmp_offset en emit_bpf_tail_call se calcula mediante\n\n'#define jmp_offset (out_offset - (cur_offset))'\n\nes un número negativo, lo cual es incorrecto. El ensamblado final generado es el siguiente.\n\n54:\tbgeu        \t$a2, $t1, -8\t    # 0x0000004c\n58:\taddi.d      \t$a6, $s5, -1\n5c:\tbltz        \t$a6, -16\t    # 0x0000004c\n60:\talsl.d      \t$t2, $a2, $a1, 0x3\n64:\tld.d        \t$t2, $t2, 264\n68:\tbeq         \t$t2, $zero, -28\t    # 0x0000004c\n\nAntes de aplicar este parche, el siguiente caso de prueba revelará problemas de bloqueo suave.\n\ncd tools/testing/selftests/bpf/\n./test_progs --allow=tailcalls/tailcall_bpf2bpf_1\n\ndmesg:\nwatchdog: BUG: bloqueo suave - CPU#2 atascada durante 26s! [test_progs:25056]","source":"nvd"}],"published":"2025-09-04T15:33:16.547Z","modified":"2026-10-19T21:10:00.160Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"5dc615520c4dfb358245680f1904bad61116648e","fixed":"1a782fa32e644aa9fbae6c8488f3e61221ac96e1","status":"affected"},{"type":"git","introduced":"5dc615520c4dfb358245680f1904bad61116648e","fixed":"17c010fe45def335fe03a0718935416b04c7f349","status":"affected"},{"type":"git","introduced":"5dc615520c4dfb358245680f1904bad61116648e","fixed":"f83d469e16bb1f75991ca67c56786fb2aaa42bea","status":"affected"},{"type":"git","introduced":"5dc615520c4dfb358245680f1904bad61116648e","fixed":"f2b5e50cc04d7a049b385bc1c93b9cbf5f10c94f","status":"affected"},{"type":"git","introduced":"5dc615520c4dfb358245680f1904bad61116648e","fixed":"9262e3e04621558e875eb5afb5e726b648cd5949","status":"affected"},{"type":"git","introduced":"5dc615520c4dfb358245680f1904bad61116648e","fixed":"cd39d9e6b7e4c58fa77783e7aedf7ada51d02ea3","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.1","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.1","status":"unaffected"},{"type":"semver","introduced":"6.1.149","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.103","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.43","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.15.11","lastAffected":"6.15.*","status":"unaffected"},{"type":"semver","introduced":"6.16.2","lastAffected":"6.16.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.17","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.1","fixed":"6.1.149"},{"status":"affected","introduced":"6.2","fixed":"6.6.103"},{"status":"affected","introduced":"6.7","fixed":"6.12.43"},{"status":"affected","introduced":"6.13","fixed":"6.15.11"},{"status":"affected","introduced":"6.16","fixed":"6.16.2"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"11.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/1a782fa32e644aa9fbae6c8488f3e61221ac96e1","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/17c010fe45def335fe03a0718935416b04c7f349","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f83d469e16bb1f75991ca67c56786fb2aaa42bea","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f2b5e50cc04d7a049b385bc1c93b9cbf5f10c94f","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9262e3e04621558e875eb5afb5e726b648cd5949","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/cd39d9e6b7e4c58fa77783e7aedf7ada51d02ea3","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html","tags":["mailing-list","third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-032379.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-38723","url":"https://www.cve.org/CVERecord?id=CVE-2025-38723","licence":"CVE Terms of Use","modified":"2026-05-12T12:05:52.998Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-38723","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38723","licence":"Public domain","modified":"2026-10-19T21:10:00.160Z"}],"updatedAt":"2026-11-25T22:59:04.161Z","epss":{"score":0.00185,"percentile":0.08449,"date":"2026-12-01T12:00:22.000Z"}}