Description
In the Linux kernel, the following vulnerability has been resolved:

LoongArch: BPF: Fix memory leak in bpf_jit_free()

When bpf_int_jit_compile() is called for subprograms, it returns early
during the first pass (!prog->is_func || extra_pass is false), keeping
ctx->offset alive for the subsequent extra pass.

If JIT compilation fails for a later subprogram, the BPF core aborts and
calls bpf_jit_free() to clean up the first subprogram. However,
bpf_jit_free() fails to free jit_data->ctx.offset, which causes a memory
leak of the JIT context offsets array.

So fix this by adding the missing kvfree(jit_data->ctx.offset) in
bpf_jit_free().
Published: 2026-08-10
Score: n/a
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability occurs in the LoongArch port of the Linux kernel where the BPF Just‑In‑Time (JIT) compiler does not release the offset array associated with a compiled subprogram when the compilation of a subsequent subprogram fails. This missing cleanup results in a memory leak – a type of resource exhaustion weakness (CWE‑772). Over time repeated JIT compilation attempts that encounter errors will exhaust kernel memory, potentially destabilizing or crashing the system.

Affected Systems

Linux kernel running on LoongArch CPUs. The vulnerability is present in any kernel version that implements the bpf_jit_free function without the recent patch. The affected source is the LoongArch BPF JIT code; no specific version numbers are listed in the advisories.

Risk and Exploitability

The EPSS score is less than 1 % and the issue is not listed in the CISA KEV catalog, indicating a low probability of exploitation in the wild. The likely vector involves the execution of BPF programs that trigger JIT compilation; an attacker or privileged process that can load BPF filters can provoke the failed compilation scenario. Although the flaw does not enable arbitrary code execution or privilege escalation, it can lead to gradual kernel memory depletion, slowing or crashing services if left unmitigated.

Generated by OpenCVE AI on August 13, 2026 at 06:39 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version that includes the patch for bpf_jit_free.
  • Disable BPF JIT compilation by setting the sysctl net.core.bpf_jit_enabled to 0 (or the equivalent setting for LoongArch).
  • Restrict loading of BPF programs to trusted users and enforce limits on the number or size of BPF programs a user can load.
  • Monitor kernel memory usage for signs of sustained increase following BPF compilation events.

Generated by OpenCVE AI on August 13, 2026 at 06:39 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 13 Aug 2026 05:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-401

Wed, 12 Aug 2026 00:15:00 +0000


Mon, 10 Aug 2026 15:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-401

Mon, 10 Aug 2026 12:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: LoongArch: BPF: Fix memory leak in bpf_jit_free() When bpf_int_jit_compile() is called for subprograms, it returns early during the first pass (!prog->is_func || extra_pass is false), keeping ctx->offset alive for the subsequent extra pass. If JIT compilation fails for a later subprogram, the BPF core aborts and calls bpf_jit_free() to clean up the first subprogram. However, bpf_jit_free() fails to free jit_data->ctx.offset, which causes a memory leak of the JIT context offsets array. So fix this by adding the missing kvfree(jit_data->ctx.offset) in bpf_jit_free().
Title LoongArch: BPF: Fix memory leak in bpf_jit_free()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-08-17T05:02:20.327Z

Reserved: 2026-07-30T09:28:09.379Z

Link: CVE-2026-68285

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-10T13:20:17.797

Modified: 2026-08-17T05:18:31.180

Link: CVE-2026-68285

cve-icon Redhat

Severity :

Publid Date: 2026-08-10T00:00:00Z

Links: CVE-2026-68285 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-13T06:45:04Z

Weaknesses
  • CWE-772

    Missing Release of Resource after Effective Lifetime