Bug 2506786 (CVE-2026-64218) - CVE-2026-64218 kernel: batman-adv: bla: fix report_work leak on backbone_gw purge
Summary: CVE-2026-64218 kernel: batman-adv: bla: fix report_work leak on backbone_gw p...
Keywords:
Status: NEW
Alias: CVE-2026-64218
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-07-24 16:02 UTC by OSIDB Bzimport
Modified: 2026-07-28 09:30 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2026-07-24 16:02:38 UTC
In the Linux kernel, the following vulnerability has been resolved:

batman-adv: bla: fix report_work leak on backbone_gw purge

batadv_bla_purge_backbone_gw() removes stale backbone gateway entries,
but fails to properly handle their associated report_work:

- If report_work is running, the purge must wait for it to finish before
  freeing the backbone_gw, otherwise the worker may access freed memory
  (e.g. bat_priv).
- If report_work is pending, the purge must cancel it and release the
  reference held for that pending work item.

The previous implementation called hlist_for_each_entry_safe() inside a
spin_lock_bh() section, but cancel_work_sync() may sleep and therefore
cannot be called from within a spinlock-protected region.

Restructure the loop to handle one entry per spinlock critical section:
acquire the lock, find the next entry to purge, remove it from the hash
list, then release the lock before calling cancel_work_sync() and
dropping the hash_entry reference. Repeat until no more entries require
purging.

Comment 1 Mauro Matteo Cascella 2026-07-28 09:26:28 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2026072415-CVE-2026-64218-ea1d@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.