{"id":"CVE-2025-39748","aliases":["CVE-2025-39748"],"related":[],"kind":"vulnerability","state":"published","title":"bpf: Forget ranges when refining tnum after JSET","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Forget ranges when refining tnum after JSET\n\nSyzbot reported a kernel warning due to a range invariant violation on\nthe following BPF program.\n\n  0: call bpf_get_netns_cookie\n  1: if r0 == 0 goto <exit>\n  2: if r0 & Oxffffffff goto <exit>\n\nThe issue is on the path where we fall through both jumps.\n\nThat path is unreachable at runtime: after insn 1, we know r0 != 0, but\nwith the sign extension on the jset, we would only fallthrough insn 2\nif r0 == 0. Unfortunately, is_branch_taken() isn't currently able to\nfigure this out, so the verifier walks all branches. The verifier then\nrefines the register bounds using the second condition and we end\nup with inconsistent bounds on this unreachable path:\n\n  1: if r0 == 0 goto <exit>\n    r0: u64=[0x1, 0xffffffffffffffff] var_off=(0, 0xffffffffffffffff)\n  2: if r0 & 0xffffffff goto <exit>\n    r0 before reg_bounds_sync: u64=[0x1, 0xffffffffffffffff] var_off=(0, 0)\n    r0 after reg_bounds_sync:  u64=[0x1, 0] var_off=(0, 0)\n\nImproving the range refinement for JSET to cover all cases is tricky. We\nalso don't expect many users to rely on JSET given LLVM doesn't generate\nthose instructions. So instead of improving the range refinement for\nJSETs, Eduard suggested we forget the ranges whenever we're narrowing\ntnums after a JSET. This patch implements that approach.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Forget ranges when refining tnum after JSET\n\nSyzbot reported a kernel warning due to a range invariant violation on\nthe following BPF program.\n\n  0: call bpf_get_netns_cookie\n  1: if r0 == 0 goto <exit>\n  2: if r0 & Oxffffffff goto <exit>\n\nThe issue is on the path where we fall through both jumps.\n\nThat path is unreachable at runtime: after insn 1, we know r0 != 0, but\nwith the sign extension on the jset, we would only fallthrough insn 2\nif r0 == 0. Unfortunately, is_branch_taken() isn't currently able to\nfigure this out, so the verifier walks all branches. The verifier then\nrefines the register bounds using the second condition and we end\nup with inconsistent bounds on this unreachable path:\n\n  1: if r0 == 0 goto <exit>\n    r0: u64=[0x1, 0xffffffffffffffff] var_off=(0, 0xffffffffffffffff)\n  2: if r0 & 0xffffffff goto <exit>\n    r0 before reg_bounds_sync: u64=[0x1, 0xffffffffffffffff] var_off=(0, 0)\n    r0 after reg_bounds_sync:  u64=[0x1, 0] var_off=(0, 0)\n\nImproving the range refinement for JSET to cover all cases is tricky. We\nalso don't expect many users to rely on JSET given LLVM doesn't generate\nthose instructions. So instead of improving the range refinement for\nJSETs, Eduard suggested we forget the ranges whenever we're narrowing\ntnums after a JSET. This patch implements that approach.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nbpf: Olvidar rangos al refinar tnum después de JSET\n\nSyzbot informó una advertencia del kernel debido a una violación de invariante de rango en el siguiente programa BPF.\n\n  0: call bpf_get_netns_cookie\n  1: if r0 == 0 goto <exit>\n  2: if r0 & Oxffffffff goto <exit>\n\nEl problema está en la ruta donde caemos a través de ambos saltos.\n\nEsa ruta es inalcanzable en tiempo de ejecución: después de la instrucción 1, sabemos que r0 != 0, pero con la extensión de signo en el jset, solo caeríamos a través de la instrucción 2 si r0 == 0. Desafortunadamente, is_branch_taken() no es capaz actualmente de determinar esto, por lo que el verificador recorre todas las ramas. El verificador luego refina los límites del registro usando la segunda condición y terminamos con límites inconsistentes en esta ruta inalcanzable:\n\n  1: if r0 == 0 goto <exit>\n    r0: u64=[0x1, 0xffffffffffffffff] var_off=(0, 0xffffffffffffffff)\n  2: if r0 & 0xffffffff goto <exit>\n    r0 antes de reg_bounds_sync: u64=[0x1, 0xffffffffffffffff] var_off=(0, 0)\n    r0 después de reg_bounds_sync: u64=[0x1, 0] var_off=(0, 0)\n\nMejorar el refinamiento de rango para JSET para cubrir todos los casos es complicado. Tampoco esperamos que muchos usuarios dependan de JSET dado que LLVM no genera esas instrucciones. Así que, en lugar de mejorar el refinamiento de rango para los JSET, Eduard sugirió que olvidemos los rangos cada vez que estemos estrechando tnums después de un JSET. Este parche implementa ese enfoque.","source":"nvd"}],"published":"2025-09-11T16:52:20.534Z","modified":"2026-11-10T13:17:49.757Z","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":"960ea056561a08e2b837b2f02d22c53226414a84","fixed":"22191359f8454b0be082c3b126f86bcbea0f1318","status":"affected"},{"type":"git","introduced":"960ea056561a08e2b837b2f02d22c53226414a84","fixed":"c29dd8336236a4deb75596b52d2dd16ccc4a380d","status":"affected"},{"type":"git","introduced":"960ea056561a08e2b837b2f02d22c53226414a84","fixed":"591c788d16046edb0220800bf1819554af5853ce","status":"affected"},{"type":"git","introduced":"960ea056561a08e2b837b2f02d22c53226414a84","fixed":"0643aa2468192a4d81326e8e76543854870b1ee2","status":"affected"},{"type":"git","introduced":"960ea056561a08e2b837b2f02d22c53226414a84","fixed":"f01e06930444cab289a8783017af9b64255bd103","status":"affected"},{"type":"git","introduced":"960ea056561a08e2b837b2f02d22c53226414a84","fixed":"2fd0c26bacd90ef26522bd3169000a4715bf151f","status":"affected"},{"type":"git","introduced":"960ea056561a08e2b837b2f02d22c53226414a84","fixed":"80a6b11862a7cfdf691e8f9faee89cfea219f098","status":"affected"},{"type":"git","introduced":"960ea056561a08e2b837b2f02d22c53226414a84","fixed":"6279846b9b2532e1b04559ef8bd0dec049f29383","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.0","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.0","status":"unaffected"},{"type":"semver","introduced":"5.10.253","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.203","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.167","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.130","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","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"}],"references":[{"url":"https://git.kernel.org/stable/c/22191359f8454b0be082c3b126f86bcbea0f1318","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c29dd8336236a4deb75596b52d2dd16ccc4a380d","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/591c788d16046edb0220800bf1819554af5853ce","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0643aa2468192a4d81326e8e76543854870b1ee2","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f01e06930444cab289a8783017af9b64255bd103","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2fd0c26bacd90ef26522bd3169000a4715bf151f","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/80a6b11862a7cfdf691e8f9faee89cfea219f098","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6279846b9b2532e1b04559ef8bd0dec049f29383","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-082556.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-019113.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-457936.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-784472.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-05T21:10:43.600Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-39748","url":"https://www.cve.org/CVERecord?id=CVE-2025-39748","licence":"CVE Terms of Use","modified":"2026-11-10T12:36:51.840Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-39748","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-39748","licence":"Public domain","modified":"2026-11-10T13:17:49.757Z"}],"updatedAt":"2026-11-25T22:59:04.546Z","epss":{"score":0.00235,"percentile":0.15419,"date":"2026-12-02T12:00:21.000Z"}}