Skip to contentSkip to conversation

CVE-2026-99133: net/iucv: fix the recvmsg window update

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 28

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/iucv: fix the recvmsg window update

iucv_sock_recvmsg() sends the HiperSockets-only AF_IUCV_FLAG_WIN without testing the transport, so on a classic z/VM socket iucv_send_ctrl() sizes the skb through a NULL iucv->hs_dev. SO_MSGLIMIT accepts 1, so msglimit / 2 is zero and one recvmsg() on its own socket is enough for an unprivileged process to take a spurious disconnect.

It also calls iucv_send_ctrl() under spin_lock_bh(&message_q.lock), which allocates GFP_KERNEL inside a section the code treats as atomic. Sending outside that lock lets two recvmsg() reach afiucv_hs_send() at once, where msg_recv is sampled for the advertised window and subtracted after dev_queue_xmit() -- and sendmsg reaches that counter under lock_sock() while recvmsg holds no socket lock, so both can subtract the same value, the counter goes negative and the credit reaches the peer twice.

Test the transport, claim the credit with atomic_xchg() after the last error exit and hand it back if the transmit fails, and send once the lock is dropped.

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

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

	Issue introduced in 3.2 with commit 3881ac441f642d56503818123446f7298442236b and fixed in 6.18.59 with commit 8f2efa742f4cfe7dd756154f8bc07350dbe3ec92
	Issue introduced in 3.2 with commit 3881ac441f642d56503818123446f7298442236b and fixed in 7.2.13 with commit fe7393a627db2d093e8c0cae69d619b30fefae5f
	Issue introduced in 3.2 with commit 3881ac441f642d56503818123446f7298442236b and fixed in 7.3 with commit fa5acd038ea657ad5033713d6916214cbd349151

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

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/iucv/af_iucv.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/8f2efa742f4cfe7dd756154f8bc07350dbe3ec92
	https://git.kernel.org/stable/c/fe7393a627db2d093e8c0cae69d619b30fefae5f
	https://git.kernel.org/stable/c/fa5acd038ea657ad5033713d6916214cbd349151