CVE-2026-74434: rxrpc: Don't move a peeked OOB message onto the pending queue

Greg Kroah-Hartman <[email protected]>
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026081515-CVE-2026-74434-3ec5@gregkh>
From: Greg Kroah-Hartman <[email protected]>

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

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

rxrpc: Don't move a peeked OOB message onto the pending queue

rxrpc_recvmsg_oob() takes a received oob message off recvmsg_oobq and,
if a response is needed, moves it onto the pending_oobq tree. However,
only the unlink from recvmsg_oobq is guarded by MSG_PEEK; the move onto
pending_oobq always runs.

As a result, reading a challenge with MSG_PEEK leaves the skb on
recvmsg_oobq while also adding it to pending_oobq. Since struct
sk_buff's rbnode shares storage with its next and prev pointers,
rb_insert_color() overwrites the list linkage, and the skb, which holds
a single reference, becomes reachable from both queues at once.

When the socket is closed both queues are drained in turn. While
draining recvmsg_oobq, __skb_unlink() follows the next and prev
pointers that rbnode has overwritten and writes to a bad address. Also,
as the skb holds a single reference but is freed from each queue, both
the skb and the connection reference it holds are released twice. This
leads to memory corruption and to a use-after-free caused by the
connection refcount underflow.

MSG_PEEK does not consume the message from the queue, so only unlink it
from recvmsg_oobq and then move it onto pending_oobq or free it when
the message is actually consumed.

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


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

	Issue introduced in 6.16 with commit 5800b1cf3fd8ccab752a101865be1e76dac33142 and fixed in 6.18.40 with commit 9ada3931beb37068fcb725b34b0398457009f343
	Issue introduced in 6.16 with commit 5800b1cf3fd8ccab752a101865be1e76dac33142 and fixed in 7.1.5 with commit 5f470cc883416fea6d3bce18ef96bf91dd49ffc3
	Issue introduced in 6.16 with commit 5800b1cf3fd8ccab752a101865be1e76dac33142 and fixed in 7.2-rc1 with commit 5801cff7d5d7b4e9d877dfb627b23eb63167f02c

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-74434
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/rxrpc/recvmsg.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/9ada3931beb37068fcb725b34b0398457009f343
	https://git.kernel.org/stable/c/5f470cc883416fea6d3bce18ef96bf91dd49ffc3
	https://git.kernel.org/stable/c/5801cff7d5d7b4e9d877dfb627b23eb63167f02c
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.