{"id":"CVE-2026-68285","state":"PUBLISHED","title":"LoongArch: BPF: Fix memory leak in bpf_jit_free()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nLoongArch: BPF: Fix memory leak in bpf_jit_free()\n\nWhen bpf_int_jit_compile() is called for subprograms, it returns early\nduring the first pass (!prog->is_func || extra_pass is false), keeping\nctx->offset alive for the subsequent extra pass.\n\nIf JIT compilation fails for a later subprogram, the BPF core aborts and\ncalls bpf_jit_free() to clean up the first subprogram. However,\nbpf_jit_free() fails to free jit_data->ctx.offset, which causes a memory\nleak of the JIT context offsets array.\n\nSo fix this by adding the missing kvfree(jit_data->ctx.offset) in\nbpf_jit_free().","publishedAt":"2026-08-10T12:02:18.074Z","updatedAt":"2026-08-17T05:02:20.327Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"4ab17e762b34c847478f694932c4cd4b1ac2c343","status":"affected","lessThan":"f1557e0a64736b63aed24e285108a7bc3b7de294","versionType":"git"},{"version":"4ab17e762b34c847478f694932c4cd4b1ac2c343","status":"affected","lessThan":"47e20d4b3da97ef3881d1e55e43545c22424f3fc","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/loongarch/net/bpf_jit.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"7.0","status":"affected"},{"version":"0","status":"unaffected","lessThan":"7.0","versionType":"semver"},{"version":"7.1.6","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/loongarch/net/bpf_jit.c"]}],"references":["https://git.kernel.org/stable/c/f1557e0a64736b63aed24e285108a7bc3b7de294","https://git.kernel.org/stable/c/47e20d4b3da97ef3881d1e55e43545c22424f3fc"],"weaknesses":[],"ingestedAt":"2026-10-29T20:12:49.727Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/68xxx/CVE-2026-68285.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-68285","state":"PUBLISHED","datePublished":"2026-08-10T12:02:18.074Z","dateUpdated":"2026-08-17T05:02:20.327Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-07-30T09:28:09.379Z"},"containers":{"cna":{"title":"LoongArch: BPF: Fix memory leak in bpf_jit_free()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nLoongArch: BPF: Fix memory leak in bpf_jit_free()\n\nWhen bpf_int_jit_compile() is called for subprograms, it returns early\nduring the first pass (!prog->is_func || extra_pass is false), keeping\nctx->offset alive for the subsequent extra pass.\n\nIf JIT compilation fails for a later subprogram, the BPF core aborts and\ncalls bpf_jit_free() to clean up the first subprogram. However,\nbpf_jit_free() fails to free jit_data->ctx.offset, which causes a memory\nleak of the JIT context offsets array.\n\nSo fix this by adding the missing kvfree(jit_data->ctx.offset) in\nbpf_jit_free()."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"4ab17e762b34c847478f694932c4cd4b1ac2c343","status":"affected","lessThan":"f1557e0a64736b63aed24e285108a7bc3b7de294","versionType":"git"},{"version":"4ab17e762b34c847478f694932c4cd4b1ac2c343","status":"affected","lessThan":"47e20d4b3da97ef3881d1e55e43545c22424f3fc","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/loongarch/net/bpf_jit.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"7.0","status":"affected"},{"version":"0","status":"unaffected","lessThan":"7.0","versionType":"semver"},{"version":"7.1.6","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/loongarch/net/bpf_jit.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/f1557e0a64736b63aed24e285108a7bc3b7de294"},{"url":"https://git.kernel.org/stable/c/47e20d4b3da97ef3881d1e55e43545c22424f3fc"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-17T05:02:20.327Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.0","versionEndExcluding":"7.1.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.0","versionEndExcluding":"7.2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}