Skip to content
Heist/ feed
Back to feed
UnratedFix available

bpf: Fix invalid prog->stats access when update_effective_progs fails

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: bpf: Fix invalid prog->stats access when update_effective_progs fails Syzkaller triggers an invalid memory access issue following fault injection in update_effective_progs. The issue can be described as follows: __cgroup_bpf_detach update_effective_progs compute_effective_progs bpf_prog_array_alloc <-- fault inject purge_effective_progs /* change to dummy_bpf_prog */ array->items[index] = &dummy_bpf_prog.prog ---softirq start--- __do_softirq ... __cgroup_bpf_run_filter_skb __bpf_prog_run_save_cb bpf_prog_run stats = this_cpu_ptr(prog->stats) /* invalid memory access */ flags = u64_stats_update_begin_irqsave(&stats->syncp) ---softirq end--- static_branch_dec(&cgroup_bpf_enabled_key[atype]) The reason is that fault injection caused update_effective_progs to fail and then changed the original prog into dummy_bpf_prog.prog in purge_effective_progs. Then a softirq came, and accessing the members of dummy_bpf_prog.prog in the softirq triggers invalid mem access. To fix it, skip updating stats when stats is NULL.

Products
Kernel
Affected versions
Not specified
Fixed versions
6.1.160, 6.12.63, 6.17.13, 6.18.2, 6.6.120
CVEs
CVE-2025-68742
Confirmed fixed CVEs
Not specified
Updated in this feed
8 Nov 2026, 00:37 UTC · Revision 1

Source evidence

bpf: Fix invalid prog->stats access when update_effective_progs fails

core-osv · Original source

Published 24 Dec 2025, 12:09 UTC

In the Linux kernel, the following vulnerability has been resolved: bpf: Fix invalid prog->stats access when update_effective_progs fails Syzkaller triggers an invalid memory access issue following fault injection in update_effective_progs. The issue can be described as follows: __cgroup_bpf_detach update_effective_progs compute_effective_progs bpf_prog_array_alloc <-- fault inject purge_effective_progs /* change to dummy_bpf_prog */ array->items[index] = &dummy_bpf_prog.prog ---softirq start--- __do_softirq ... __cgroup_bpf_run_filter_skb __bpf_prog_run_save_cb bpf_prog_run stats = this_cpu_ptr(prog->stats) /* invalid memory access */ flags = u64_stats_update_begin_irqsave(&stats->syncp) ---softirq end--- static_branch_dec(&cgroup_bpf_enabled_key[atype]) The reason is that fault injection caused update_effective_progs to fail and then changed the original prog into dummy_bpf_prog.prog in purge_effective_progs. Then a softirq came, and accessing the members of dummy_bpf_prog.prog in the softirq triggers invalid mem access. To fix it, skip updating stats when stats is NULL.

osv:CVE-2025-68742

Kernel

Fixed versions: 6.1.160, 6.6.120, 6.12.63, 6.17.13, 6.18.2

Complete source record
{
  "id": "d0f55b8ccb8434c0b8b7d4126b8d3218290aa5e735e875cd7b60f4740f6f2471",
  "url": "https://osv.dev/vulnerability/CVE-2025-68742",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "bpf: Fix invalid prog->stats access when update_effective_progs fails",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: bpf: Fix invalid prog->stats access when update_effective_progs fails Syzkaller triggers an invalid memory access issue following fault injection in update_effective_progs. The issue can be described as follows: __cgroup_bpf_detach update_effective_progs compute_effective_progs bpf_prog_array_alloc <-- fault inject purge_effective_progs /* change to dummy_bpf_prog */ array->items[index] = &dummy_bpf_prog.prog ---softirq start--- __do_softirq ... __cgroup_bpf_run_filter_skb __bpf_prog_run_save_cb bpf_prog_run stats = this_cpu_ptr(prog->stats) /* invalid memory access */ flags = u64_stats_update_begin_irqsave(&stats->syncp) ---softirq end--- static_branch_dec(&cgroup_bpf_enabled_key[atype]) The reason is that fault injection caused update_effective_progs to fail and then changed the original prog into dummy_bpf_prog.prog in purge_effective_progs. Then a softirq came, and accessing the members of dummy_bpf_prog.prog in the softirq triggers invalid mem access. To fix it, skip updating stats when stats is NULL.",
    "evidence": "osv:CVE-2025-68742",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.1.160",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.120",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.63",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.17.13",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.18.2",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2025-68742",
      "aliases": [
        "CVE-2025-68742"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "492ecee892c2a4ba6a14903d5d586ff750b7e805"
                },
                {
                  "fixed": "93d1964773ff513c9bd530f7686d3e48b786fa6b"
                },
                {
                  "fixed": "bf2c990b012100610c0f1ec5c4ea434da2d080c2"
                },
                {
                  "fixed": "539137e3038ce6f953efd72110110f03c14c7d97"
                },
                {
                  "fixed": "56905bb70c8b88421709bb4e32fcba617aa37d41"
                },
                {
                  "fixed": "2579c356ccd35d06238b176e4b460978186d804b"
                },
                {
                  "fixed": "7dc211c1159d991db609bdf4b0fb9033c04adcbc"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-68742.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.1.0"
                },
                {
                  "fixed": "6.1.160"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.120"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.63"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.17.13"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.18.0"
                },
                {
                  "fixed": "6.18.2"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-68742.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:52.606970013Z",
      "provider": "osv",
      "references": [
        "https://cert-portal.siemens.com/productcert/html/ssa-019113.html",
        "https://cert-portal.siemens.com/productcert/html/ssa-457936.html",
        "https://git.kernel.org/stable/c/2579c356ccd35d06238b176e4b460978186d804b",
        "https://git.kernel.org/stable/c/539137e3038ce6f953efd72110110f03c14c7d97",
        "https://git.kernel.org/stable/c/56905bb70c8b88421709bb4e32fcba617aa37d41",
        "https://git.kernel.org/stable/c/7dc211c1159d991db609bdf4b0fb9033c04adcbc",
        "https://git.kernel.org/stable/c/93d1964773ff513c9bd530f7686d3e48b786fa6b",
        "https://git.kernel.org/stable/c/bf2c990b012100610c0f1ec5c4ea434da2d080c2",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/68xxx/CVE-2025-68742.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-68742",
        "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/2025/68xxx/CVE-2025-68742.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-68742",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 521028,
  "published_at": "2025-12-24T12:09:39.341+00:00"
}