Skip to contentSkip to conversation

CVE-2026-23393: bridge: cfm: Fix race condition in peer_mep deletion

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Mar 25

lore
Share & tools
lore
#0 lore raw

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

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

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

bridge: cfm: Fix race condition in peer_mep deletion

When a peer MEP is being deleted, cancel_delayed_work_sync() is called on ccm_rx_dwork before freeing. However, br_cfm_frame_rx() runs in softirq context under rcu_read_lock (without RTNL) and can re-schedule ccm_rx_dwork via ccm_rx_timer_start() between cancel_delayed_work_sync() returning and kfree_rcu() being called.

The following is a simple race scenario:

cpu0 cpu1

mep_delete_implementation()

  cancel_delayed_work_sync(ccm_rx_dwork);
                                           br_cfm_frame_rx()
                                             // peer_mep still in hlist
                                             if (peer_mep->ccm_defect)
                                               ccm_rx_timer_start()
                                                 queue_delayed_work(ccm_rx_dwork)
  hlist_del_rcu(&peer_mep->head);
  kfree_rcu(peer_mep, rcu);
                                           ccm_rx_work_expired()
                                             // on freed peer_mep

To prevent this, cancel_delayed_work_sync() is replaced with disable_delayed_work_sync() in both peer MEP deletion paths, so that subsequent queue_delayed_work() calls from br_cfm_frame_rx() are silently rejected.

The cc_peer_disable() helper retains cancel_delayed_work_sync() because it is also used for the CC enable/disable toggle path where the work must remain re-schedulable.

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

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

	Issue introduced in 5.11 with commit dc32cbb3dbd7da38c700d6e0fc6354df24920525 and fixed in 6.12.78 with commit e89dbd2736a45f0507949af4748cbbf3ff793146
	Issue introduced in 5.11 with commit dc32cbb3dbd7da38c700d6e0fc6354df24920525 and fixed in 6.18.20 with commit d8f35767bacb3c7769d470a41cf161e3f3c07e70
	Issue introduced in 5.11 with commit dc32cbb3dbd7da38c700d6e0fc6354df24920525 and fixed in 6.19.10 with commit 1fd81151f65927fd9edb8ecd12ad45527dbbe5ab
	Issue introduced in 5.11 with commit dc32cbb3dbd7da38c700d6e0fc6354df24920525 and fixed in 7.0-rc5 with commit 3715a00855316066cdda69d43648336367422127

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-23393

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_cfm.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/e89dbd2736a45f0507949af4748cbbf3ff793146
	https://git.kernel.org/stable/c/d8f35767bacb3c7769d470a41cf161e3f3c07e70
	https://git.kernel.org/stable/c/1fd81151f65927fd9edb8ecd12ad45527dbbe5ab
	https://git.kernel.org/stable/c/3715a00855316066cdda69d43648336367422127