diff options
| author | Sara Venkatesh <sarajvenkatesh@gmail.com> | 2026-05-04 01:00:36 -0700 |
|---|---|---|
| committer | Leon Romanovsky <leon@kernel.org> | 2026-05-18 04:58:41 -0400 |
| commit | eb4ecdf631fe00e8020bf461503cb9b7017ed796 (patch) | |
| tree | c7b42f3627b7bf47c588ae20f56ab8cbfef77eae /scripts | |
| parent | 44ea9d022312097a8a25215f89e9c1a69a77b1d9 (diff) | |
RDMA/srpt: fix integer overflow in immediate data length check
imm_buf->len is a user-controlled uint32_t received from the network.
Adding it to imm_data_offset without overflow checking allows a
malicious initiator to send len=0xFFFFFFFF, causing req_size to wrap
around to a small value, bypassing the bounds check, and subsequently
passing a ~4GB length to sg_init_one().
Use check_add_overflow() to detect wrapping before the comparison.
Fixes: 5dabcd0456d7 ("RDMA/srpt: Add support for immediate data")
Reported-by: Carlos Bilbao (Lambda) <carlos.bilbao@kernel.org>
Signed-off-by: Sara Venkatesh <sarajvenkatesh@gmail.com>
Link: https://patch.msgid.link/20260504080036.3482415-1-sarajvenkatesh@gmail.com
Reviewed-by: Carlos Bilbao (Lambda) <carlos.bilbao@kernel.org>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
