{"api_version":"1","generated_at":"2026-10-25T05:20:10+00:00","cve":"CVE-2026-98789","urls":{"html":"https://cve.report/CVE-2026-98789","api":"https://cve.report/api/cve/CVE-2026-98789.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-98789","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-98789"},"summary":{"title":"bpf: Fix objects stuck in free_by_rcu_ttrace","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix objects stuck in free_by_rcu_ttrace\n\ndo_call_rcu_ttrace() returns early when call_rcu_ttrace_in_progress is set\nand leaves the objects in free_by_rcu_ttrace. __free_rcu() frees\nwaiting_for_gp_ttrace only and clears the flag. Hence the objects that\nfree_bulk() or __free_by_rcu() added while RCU tasks trace GP was in flight\nstay in free_by_rcu_ttrace until free_bulk() or alloc_bulk() is called for\nthe same bpf_mem_cache again, which may never happen. The number of such\nobjects is not bounded.\n\nTurn call_rcu_ttrace_in_progress into three states:\n0 - idle\n1 - __free_rcu() is queued\n2 - __free_rcu() is queued and free_by_rcu_ttrace got more objects since\n\ndo_call_rcu_ttrace() sets 2. __free_rcu() does cmpxchg(1 -> 0) and starts\nthe next GP when it fails. It cannot clear the flag first and check\nfree_by_rcu_ttrace later, since bpf_mem_alloc_destroy() frees bpf_mem_cache\nwithout waiting for RCU callbacks when the flag is zero.\n\nNow __free_rcu() queues itself, so the one that didn't see 'draining' may\ndo call_rcu_tasks_trace() after rcu_barrier_tasks_trace() in\nfree_mem_alloc(). Queue it under rcu_read_lock() and do synchronize_rcu()\nbefore the barriers. Calling rcu_barrier_tasks_trace() twice works too, but\ncreating and destroying hash maps in a loop on many cpus slows down to one\nfree_mem_alloc() per GP and kworkers pile up.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-10-18 16:17:32","updated_at":"2026-10-19 10:19:42"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/33d0a5d2fee06a51f2f056dd901296515912e954","name":"https://git.kernel.org/stable/c/33d0a5d2fee06a51f2f056dd901296515912e954","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/fbd97dd1d3ce32d32fb7be86acc3fdb7c04fa043","name":"https://git.kernel.org/stable/c/fbd97dd1d3ce32d32fb7be86acc3fdb7c04fa043","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-98789","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-98789","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 8d5a8011b35d387c490a5c977b1d9eb4798aa071 33d0a5d2fee06a51f2f056dd901296515912e954 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 8d5a8011b35d387c490a5c977b1d9eb4798aa071 fbd97dd1d3ce32d32fb7be86acc3fdb7c04fa043 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.1","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.2.10 7.2.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["kernel/bpf/memalloc.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"33d0a5d2fee06a51f2f056dd901296515912e954","status":"affected","version":"8d5a8011b35d387c490a5c977b1d9eb4798aa071","versionType":"git"},{"lessThan":"fbd97dd1d3ce32d32fb7be86acc3fdb7c04fa043","status":"affected","version":"8d5a8011b35d387c490a5c977b1d9eb4798aa071","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["kernel/bpf/memalloc.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.1"},{"lessThan":"6.1","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"7.2.*","status":"unaffected","version":"7.2.10","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.3","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.2.10","versionStartIncluding":"6.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3","versionStartIncluding":"6.1","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix objects stuck in free_by_rcu_ttrace\n\ndo_call_rcu_ttrace() returns early when call_rcu_ttrace_in_progress is set\nand leaves the objects in free_by_rcu_ttrace. __free_rcu() frees\nwaiting_for_gp_ttrace only and clears the flag. Hence the objects that\nfree_bulk() or __free_by_rcu() added while RCU tasks trace GP was in flight\nstay in free_by_rcu_ttrace until free_bulk() or alloc_bulk() is called for\nthe same bpf_mem_cache again, which may never happen. The number of such\nobjects is not bounded.\n\nTurn call_rcu_ttrace_in_progress into three states:\n0 - idle\n1 - __free_rcu() is queued\n2 - __free_rcu() is queued and free_by_rcu_ttrace got more objects since\n\ndo_call_rcu_ttrace() sets 2. __free_rcu() does cmpxchg(1 -> 0) and starts\nthe next GP when it fails. It cannot clear the flag first and check\nfree_by_rcu_ttrace later, since bpf_mem_alloc_destroy() frees bpf_mem_cache\nwithout waiting for RCU callbacks when the flag is zero.\n\nNow __free_rcu() queues itself, so the one that didn't see 'draining' may\ndo call_rcu_tasks_trace() after rcu_barrier_tasks_trace() in\nfree_mem_alloc(). Queue it under rcu_read_lock() and do synchronize_rcu()\nbefore the barriers. Calling rcu_barrier_tasks_trace() twice works too, but\ncreating and destroying hash maps in a loop on many cpus slows down to one\nfree_mem_alloc() per GP and kworkers pile up."}],"providerMetadata":{"dateUpdated":"2026-10-19T09:25:42.177Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/33d0a5d2fee06a51f2f056dd901296515912e954"},{"url":"https://git.kernel.org/stable/c/fbd97dd1d3ce32d32fb7be86acc3fdb7c04fa043"}],"title":"bpf: Fix objects stuck in free_by_rcu_ttrace","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-98789","datePublished":"2026-10-18T15:48:25.665Z","dateReserved":"2026-09-25T10:25:14.370Z","dateUpdated":"2026-10-19T09:25:42.177Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-10-18 16:17:32","lastModifiedDate":"2026-10-19 10:19:42","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"98789","Ordinal":"1","Title":"bpf: Fix objects stuck in free_by_rcu_ttrace","CVE":"CVE-2026-98789","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"98789","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix objects stuck in free_by_rcu_ttrace\n\ndo_call_rcu_ttrace() returns early when call_rcu_ttrace_in_progress is set\nand leaves the objects in free_by_rcu_ttrace. __free_rcu() frees\nwaiting_for_gp_ttrace only and clears the flag. Hence the objects that\nfree_bulk() or __free_by_rcu() added while RCU tasks trace GP was in flight\nstay in free_by_rcu_ttrace until free_bulk() or alloc_bulk() is called for\nthe same bpf_mem_cache again, which may never happen. The number of such\nobjects is not bounded.\n\nTurn call_rcu_ttrace_in_progress into three states:\n0 - idle\n1 - __free_rcu() is queued\n2 - __free_rcu() is queued and free_by_rcu_ttrace got more objects since\n\ndo_call_rcu_ttrace() sets 2. __free_rcu() does cmpxchg(1 -> 0) and starts\nthe next GP when it fails. It cannot clear the flag first and check\nfree_by_rcu_ttrace later, since bpf_mem_alloc_destroy() frees bpf_mem_cache\nwithout waiting for RCU callbacks when the flag is zero.\n\nNow __free_rcu() queues itself, so the one that didn't see 'draining' may\ndo call_rcu_tasks_trace() after rcu_barrier_tasks_trace() in\nfree_mem_alloc(). Queue it under rcu_read_lock() and do synchronize_rcu()\nbefore the barriers. Calling rcu_barrier_tasks_trace() twice works too, but\ncreating and destroying hash maps in a loop on many cpus slows down to one\nfree_mem_alloc() per GP and kworkers pile up.","Type":"Description","Title":"bpf: Fix objects stuck in free_by_rcu_ttrace"}]}}}