summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/python_version.py
diff options
context:
space:
mode:
authorNicolas Morey <nmorey@suse.com>2026-09-09 18:01:31 +0200
committerLeon Romanovsky <leon@kernel.org>2026-09-15 03:52:37 -0400
commita4368022a3ac5324356ae8d88e3a42d115956fd6 (patch)
tree505787bd3899627c94d37338e2bcee63aec767c5 /tools/lib/python/kdoc/python_version.py
parent3e1de7f906ab162b23d6fe0eabccf687a98fa25f (diff)
RDMA/rxe: Use validated num_sge in local buffer
For both SRQ and non-SRQ receive paths, the WQE is copied into a local buffer to provide a kernel-owned, validated copy. While calculating the memcpy size from the validated num_sge prevents overflow during the copy, memcpy() itself still copies num_sge from shared memory. A concurrent userspace modification before or during memcpy() leaves an unvalidated num_sge in the local buffer, leading to potential out-of-bounds reads in rxe_resp_check_length() and copy_data() causing: BUG: KASAN: slab-out-of-bounds in rxe_receiver+0x8109/0x9ec0 [rdma_rxe] Read of size 4 at addr ffff88812c4867f8 by task kworker/u9:6/361 Workqueue: rxe_wq do_work [rdma_rxe] Call Trace: rxe_receiver+0x8109/0x9ec0 [rdma_rxe] do_work+0x149/0x610 [rdma_rxe] process_one_work+0x726/0x10a0 The buggy address belongs to the object at ffff88812c486000 which belongs to the cache kmalloc-part-13-2k of size 2048 The buggy address is located 0 bytes to the right of allocated 2040-byte region [ffff88812c486000, ffff88812c4867f8) Explicitly assign the validated num_sge to the local buffer after the copy to prevent this race. Fixes: 22b8fbded65b ("RDMA/rxe: Fix TOCTOU heap overflow in get_srq_wqe") Fixes: d6ab440240a0 ("RDMA/rxe: Copy WQE to local buffer in non-SRQ receive path") Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev> Signed-off-by: Nicolas Morey <nmorey@suse.com> Link: https://patch.msgid.link/20260909160132.1491248-1-nmorey@suse.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions