CVE-2026-31640: rxrpc: Fix use of wrong skb when comparing queued RESP challenge serial
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
rxrpc: Fix use of wrong skb when comparing queued RESP challenge serial
In rxrpc_post_response(), the code should be comparing the challenge serial number from the cached response before deciding to switch to a newer response, but looks at the newer packet private data instead, rendering the comparison always false.
Fix this by switching to look at the older packet.
Fix further[1] to substitute the new packet in place of the old one if newer and also to release whichever we don't use.
The Linux kernel CVE team has assigned CVE-2026-31640 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.16 with commit 5800b1cf3fd8ccab752a101865be1e76dac33142 and fixed in 6.18.23 with commit 9132b1a7bf83b4a8042fffbc99d075b727a16742 Issue introduced in 6.16 with commit 5800b1cf3fd8ccab752a101865be1e76dac33142 and fixed in 6.19.13 with commit 20386e7f8d97475b8d815873e246423317ec4260 Issue introduced in 6.16 with commit 5800b1cf3fd8ccab752a101865be1e76dac33142 and fixed in 7.0 with commit b33f5741bb187db8ff32e8f5b96def77cc94dfca
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-31640
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/conn_event.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/9132b1a7bf83b4a8042fffbc99d075b727a16742 https://git.kernel.org/stable/c/20386e7f8d97475b8d815873e246423317ec4260 https://git.kernel.org/stable/c/b33f5741bb187db8ff32e8f5b96def77cc94dfca