CVE-2026-23066: rxrpc: Fix recvmsg() unconditional requeue
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
rxrpc: Fix recvmsg() unconditional requeue
If rxrpc_recvmsg() fails because MSG_DONTWAIT was specified but the call at the front of the recvmsg queue already has its mutex locked, it requeues the call - whether or not the call is already queued. The call may be on the queue because MSG_PEEK was also passed and so the call was not dequeued or because the I/O thread requeued it.
The unconditional requeue may then corrupt the recvmsg queue, leading to things like UAFs or refcount underruns.
Fix this by only requeuing the call if it isn't already on the queue - and moving it to the front if it is already queued. If we don't queue it, we have to put the ref we obtained by dequeuing it.
Also, MSG_PEEK doesn't dequeue the call so shouldn't call rxrpc_notify_socket() for the call if we didn't use up all the data on the queue, so fix that also.
The Linux kernel CVE team has assigned CVE-2026-23066 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.11 with commit 540b1c48c37ac0ad66212004db21e1ff7e2d78be and fixed in 6.18.8 with commit 930114425065f7ace6e0c0630fab4af75e059ea8 Issue introduced in 4.11 with commit 540b1c48c37ac0ad66212004db21e1ff7e2d78be and fixed in 6.19-rc7 with commit 2c28769a51deb6022d7fbd499987e237a01dd63a
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-23066
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:
include/trace/events/rxrpc.h
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/930114425065f7ace6e0c0630fab4af75e059ea8 https://git.kernel.org/stable/c/2c28769a51deb6022d7fbd499987e237a01dd63a