CVE-2026-23243: RDMA/umad: Reject negative data_len in ib_umad_write
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
RDMA/umad: Reject negative data_len in ib_umad_write
ib_umad_write computes data_len from user-controlled count and the MAD header sizes. With a mismatched user MAD header size and RMPP header length, data_len can become negative and reach ib_create_send_mad(). This can make the padding calculation exceed the segment size and trigger an out-of-bounds memset in alloc_send_rmpp_list().
Add an explicit check to reject negative data_len before creating the send buffer.
KASAN splat:
[ 211.363464] BUG: KASAN: slab-out-of-bounds in ib_create_send_mad+0xa01/0x11b0 [ 211.364077] Write of size 220 at addr ffff88800c3fa1f8 by task spray_thread/102 [ 211.365867] ib_create_send_mad+0xa01/0x11b0 [ 211.365887] ib_umad_write+0x853/0x1c80
The Linux kernel CVE team has assigned CVE-2026-23243 to this issue.
Affected and fixed versions
===========================
Issue introduced in 2.6.24 with commit 2be8e3ee8efd6f99ce454115c29d09750915021a and fixed in 5.10.252 with commit 1371ef6b1ecf3676b8942f5dfb3634fb0648128e Issue introduced in 2.6.24 with commit 2be8e3ee8efd6f99ce454115c29d09750915021a and fixed in 5.15.202 with commit 362e45fd9069ffa1523f9f1633b606ebf72060d7 Issue introduced in 2.6.24 with commit 2be8e3ee8efd6f99ce454115c29d09750915021a and fixed in 6.1.165 with commit 6eb2919474ca105c5b13d19574e25f0ddcf19ca2 Issue introduced in 2.6.24 with commit 2be8e3ee8efd6f99ce454115c29d09750915021a and fixed in 6.6.128 with commit a6a3e4af10993cb9e4b8f0548680aba0ab5f3b0d Issue introduced in 2.6.24 with commit 2be8e3ee8efd6f99ce454115c29d09750915021a and fixed in 6.12.75 with commit 9c80d688f402539dfc8f336de1380d6b4ee14316 Issue introduced in 2.6.24 with commit 2be8e3ee8efd6f99ce454115c29d09750915021a and fixed in 6.18.14 with commit 205955f29c26330b1dc7fdeadd5bb97c38e26f56 Issue introduced in 2.6.24 with commit 2be8e3ee8efd6f99ce454115c29d09750915021a and fixed in 6.19.4 with commit 52ab82cc5cf8ada5c3fb6ffe8f32fdb2fc27a34b Issue introduced in 2.6.24 with commit 2be8e3ee8efd6f99ce454115c29d09750915021a and fixed in 7.0-rc1 with commit 5551b02fdbfd85a325bb857f3a8f9c9f33397ed2
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-23243
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:
drivers/infiniband/core/user_mad.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/1371ef6b1ecf3676b8942f5dfb3634fb0648128e https://git.kernel.org/stable/c/362e45fd9069ffa1523f9f1633b606ebf72060d7 https://git.kernel.org/stable/c/6eb2919474ca105c5b13d19574e25f0ddcf19ca2 https://git.kernel.org/stable/c/a6a3e4af10993cb9e4b8f0548680aba0ab5f3b0d https://git.kernel.org/stable/c/9c80d688f402539dfc8f336de1380d6b4ee14316 https://git.kernel.org/stable/c/205955f29c26330b1dc7fdeadd5bb97c38e26f56 https://git.kernel.org/stable/c/52ab82cc5cf8ada5c3fb6ffe8f32fdb2fc27a34b https://git.kernel.org/stable/c/5551b02fdbfd85a325bb857f3a8f9c9f33397ed2