{"id":"CVE-2025-68742","aliases":["CVE-2025-68742"],"related":[],"kind":"vulnerability","state":"published","title":"bpf: Fix invalid prog->stats access when update_effective_progs fails","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix invalid prog->stats access when update_effective_progs fails\n\nSyzkaller triggers an invalid memory access issue following fault\ninjection in update_effective_progs. The issue can be described as\nfollows:\n\n__cgroup_bpf_detach\n  update_effective_progs\n    compute_effective_progs\n      bpf_prog_array_alloc <-- fault inject\n  purge_effective_progs\n    /* change to dummy_bpf_prog */\n    array->items[index] = &dummy_bpf_prog.prog\n\n---softirq start---\n__do_softirq\n  ...\n    __cgroup_bpf_run_filter_skb\n      __bpf_prog_run_save_cb\n        bpf_prog_run\n          stats = this_cpu_ptr(prog->stats)\n          /* invalid memory access */\n          flags = u64_stats_update_begin_irqsave(&stats->syncp)\n---softirq end---\n\n  static_branch_dec(&cgroup_bpf_enabled_key[atype])\n\nThe reason is that fault injection caused update_effective_progs to fail\nand then changed the original prog into dummy_bpf_prog.prog in\npurge_effective_progs. Then a softirq came, and accessing the members of\ndummy_bpf_prog.prog in the softirq triggers invalid mem access.\n\nTo fix it, skip updating stats when stats is NULL.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix invalid prog->stats access when update_effective_progs fails\n\nSyzkaller triggers an invalid memory access issue following fault\ninjection in update_effective_progs. The issue can be described as\nfollows:\n\n__cgroup_bpf_detach\n  update_effective_progs\n    compute_effective_progs\n      bpf_prog_array_alloc <-- fault inject\n  purge_effective_progs\n    /* change to dummy_bpf_prog */\n    array->items[index] = &dummy_bpf_prog.prog\n\n---softirq start---\n__do_softirq\n  ...\n    __cgroup_bpf_run_filter_skb\n      __bpf_prog_run_save_cb\n        bpf_prog_run\n          stats = this_cpu_ptr(prog->stats)\n          /* invalid memory access */\n          flags = u64_stats_update_begin_irqsave(&stats->syncp)\n---softirq end---\n\n  static_branch_dec(&cgroup_bpf_enabled_key[atype])\n\nThe reason is that fault injection caused update_effective_progs to fail\nand then changed the original prog into dummy_bpf_prog.prog in\npurge_effective_progs. Then a softirq came, and accessing the members of\ndummy_bpf_prog.prog in the softirq triggers invalid mem access.\n\nTo fix it, skip updating stats when stats is NULL.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nbpf: Corrige el acceso inválido a prog -> stats cuando update_effective_progs falla\n\nSyzkaller desencadena un problema de acceso a memoria inválido después de la inyección de fallos en update_effective_progs. El problema se puede describir de la siguiente manera:\n\n__cgroup_bpf_detach\n  update_effective_progs\n    compute_effective_progs\n      bpf_prog_array_alloc  <- - inyección de fallo\n  purge_effective_progs\n    /* cambio a dummy_bpf_prog */\n    array -> items[index] = &dummy_bpf_prog.prog\n\n---inicio de softirq---\n__do_softirq\n  ...\n    __cgroup_bpf_run_filter_skb\n      __bpf_prog_run_save_cb\n        bpf_prog_run\n          stats = this_cpu_ptr(prog -> stats)\n          /* acceso a memoria inválido */\n          flags = u64_stats_update_begin_irqsave(&stats -> syncp)\n---fin de softirq---\n\n  static_branch_dec(&cgroup_bpf_enabled_key[atype])\n\nLa razón es que la inyección de fallos provocó que update_effective_progs fallara y luego cambió el prog original a dummy_bpf_prog.prog en purge_effective_progs. Luego llegó una softirq, y el acceso a los miembros de dummy_bpf_prog.prog en la softirq desencadena un acceso a memoria inválido.\n\nPara solucionarlo, se omite la actualización de stats cuando stats es NULL.","source":"nvd"}],"published":"2025-12-24T12:09:39.341Z","modified":"2026-11-10T13:17:59.040Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"492ecee892c2a4ba6a14903d5d586ff750b7e805","fixed":"93d1964773ff513c9bd530f7686d3e48b786fa6b","status":"affected"},{"type":"git","introduced":"492ecee892c2a4ba6a14903d5d586ff750b7e805","fixed":"bf2c990b012100610c0f1ec5c4ea434da2d080c2","status":"affected"},{"type":"git","introduced":"492ecee892c2a4ba6a14903d5d586ff750b7e805","fixed":"539137e3038ce6f953efd72110110f03c14c7d97","status":"affected"},{"type":"git","introduced":"492ecee892c2a4ba6a14903d5d586ff750b7e805","fixed":"56905bb70c8b88421709bb4e32fcba617aa37d41","status":"affected"},{"type":"git","introduced":"492ecee892c2a4ba6a14903d5d586ff750b7e805","fixed":"2579c356ccd35d06238b176e4b460978186d804b","status":"affected"},{"type":"git","introduced":"492ecee892c2a4ba6a14903d5d586ff750b7e805","fixed":"7dc211c1159d991db609bdf4b0fb9033c04adcbc","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.1","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.1","status":"unaffected"},{"type":"semver","introduced":"6.1.160","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.120","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.63","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.17.13","lastAffected":"6.17.*","status":"unaffected"},{"type":"semver","introduced":"6.18.2","lastAffected":"6.18.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.19","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/93d1964773ff513c9bd530f7686d3e48b786fa6b","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/bf2c990b012100610c0f1ec5c4ea434da2d080c2","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/539137e3038ce6f953efd72110110f03c14c7d97","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/56905bb70c8b88421709bb4e32fcba617aa37d41","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2579c356ccd35d06238b176e4b460978186d804b","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7dc211c1159d991db609bdf4b0fb9033c04adcbc","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"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-68742","url":"https://www.cve.org/CVERecord?id=CVE-2025-68742","licence":"CVE Terms of Use","modified":"2026-11-10T12:38:19.852Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-68742","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-68742","licence":"Public domain","modified":"2026-11-10T13:17:59.040Z"}],"updatedAt":"2026-11-25T22:59:09.905Z","epss":{"score":0.00228,"percentile":0.14526,"date":"2026-12-01T12:00:22.000Z"}}