Skip to contentSkip to conversation

CVE-2026-80866: tipc: avoid busy looping in tipc_exit_net()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 4

lore
Share & tools
lore
#0 lore raw

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

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

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

tipc: avoid busy looping in tipc_exit_net()

Blamed commit introduced a busy-wait loop in tipc_exit_net() to wait for pending UDP bearer cleanup works to complete:

       while (atomic_read(&tn->wq_count))
               cond_resched();

This loop can busy-wait for a long time if cond_resched() is a NOP. This typically happens if the netns exit is executed by a high priority task, or under kernels configured without preemption (CONFIG_PREEMPT_NONE). In such cases, it wastes CPU cycles and can lead to soft lockups.

Fix this by replacing the busy loop with wait_var_event(), allowing the thread to sleep properly until the work queue count reaches zero.

Accordingly, update cleanup_bearer() to use atomic_dec_and_test() and wake_up_var() to wake up the waiter when the count drops to zero.

This uses the global wait queue hash table, avoiding the need to bloat struct tipc_net with a wait_queue_head_t. The atomic_dec_and_test() provides the necessary memory barrier to ensure the wakeup is not missed.

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

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

	Issue introduced in 5.13 with commit 04c26faa51d1e2fe71cf13c45791f5174c37f986 and fixed in 7.1.5 with commit 522d1d950b9e3b68190a6de7534827c8dccedb73
	Issue introduced in 5.13 with commit 04c26faa51d1e2fe71cf13c45791f5174c37f986 and fixed in 7.2 with commit c1481c94e74c955e0448ddf46b8615a44d840c1e
	Issue introduced in 5.4.124 with commit d1f76dfadaf8f47ed1753f97dbcbd41c16215ffa
	Issue introduced in 5.10.42 with commit 5195ec5e365a2a9331bfeb585b613a6e94f98dba
	Issue introduced in 5.12.9 with commit b9f5b7ad4ac3af006443f535b1ce7bff1d130d7d

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

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/tipc/core.c
net/tipc/udp_media.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/522d1d950b9e3b68190a6de7534827c8dccedb73
	https://git.kernel.org/stable/c/c1481c94e74c955e0448ddf46b8615a44d840c1e