Skip to contentSkip to conversation

CVE-2026-98487: net: bridge: mdb: restart port group walk after deletion

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 18

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

net: bridge: mdb: restart port group walk after deletion

br_mdb_flush_pgs() keeps a pointer-to-pointer cursor while walking mp->ports. br_multicast_del_pg() can re-enter the same MDB entry through br_multicast_sg_del_exclude_ports() and unlink other port groups. If the cursor points into one of those groups, the next iteration dereferences a stale cursor and can leave mp->ports pointing at freed memory.

A following RTM_GETMDB exposes the dangling pointer:

  BUG: KASAN: slab-use-after-free in br_mdb_dump
  Read of size 8
    br_mdb_dump
    rtnl_mdb_dump
    rtnl_dumpit
    netlink_dump

Reset the cursor to mp->ports after every deletion. The deletion removes at least the selected group, so the restarted walk always makes progress.

The Linux kernel CVE team has assigned CVE-2026-98487 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.8 with commit a6acb535afb2a3b688a7858f05b61f0433e480d5 and fixed in 6.12.112 with commit 46ec55855c972504258c371677ac039ba20e5d12
	Issue introduced in 6.8 with commit a6acb535afb2a3b688a7858f05b61f0433e480d5 and fixed in 6.18.55 with commit ab3c4a4c85f2e1e8d04b5c1770dea8412d21c7fe
	Issue introduced in 6.8 with commit a6acb535afb2a3b688a7858f05b61f0433e480d5 and fixed in 7.2.9 with commit fe2a42789c12eb7c5d3a42191e2cc735a6c35ead
	Issue introduced in 6.8 with commit a6acb535afb2a3b688a7858f05b61f0433e480d5 and fixed in 7.3-rc5 with commit ab1404ac81154a89fb61ac50ae9a04cd8d4834dc

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-98487

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
net/bridge/br_mdb.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/46ec55855c972504258c371677ac039ba20e5d12
	https://git.kernel.org/stable/c/ab3c4a4c85f2e1e8d04b5c1770dea8412d21c7fe
	https://git.kernel.org/stable/c/fe2a42789c12eb7c5d3a42191e2cc735a6c35ead
	https://git.kernel.org/stable/c/ab1404ac81154a89fb61ac50ae9a04cd8d4834dc