]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
svcrdma: bound check rq_pages index in inline path
authorJoshua Rogers <linux@joshua.hu>
Fri, 7 Nov 2025 15:09:49 +0000 (10:09 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Jan 2026 11:57:24 +0000 (12:57 +0100)
commitda1ccfc4c452541584a4eae89e337cfa21be6d5a
tree45fde07e336b746ea148c415fcf74d0849a49616
parent7d17693eb79d3fe6c81066b6ca566546fd38ba1f
svcrdma: bound check rq_pages index in inline path

commit d1bea0ce35b6095544ee82bb54156fc62c067e58 upstream.

svc_rdma_copy_inline_range indexed rqstp->rq_pages[rc_curpage] without
verifying rc_curpage stays within the allocated page array. Add guards
before the first use and after advancing to a new page.

Fixes: d7cc73972661 ("svcrdma: support multiple Read chunks per RPC")
Cc: stable@vger.kernel.org
Signed-off-by: Joshua Rogers <linux@joshua.hu>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sunrpc/xprtrdma/svc_rdma_rw.c