Patch "svcrdma: Catch another Reply chunk overflow case" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    svcrdma: Catch another Reply chunk overflow case

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     svcrdma-catch-another-reply-chunk-overflow-case.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit d08d27cd6f96a7f8c19ae4f586f0dc6163afa9b5
Author: Chuck Lever <chuck.lever@xxxxxxxxxx>
Date:   Thu Nov 12 14:47:14 2020 -0500

    svcrdma: Catch another Reply chunk overflow case
    
    [ Upstream commit e5decb2eb5f4d1f64ba9196b4bad0e26a441c81c ]
    
    When space in the Reply chunk runs out in the middle of a segment,
    we end up passing a zero-length SGL to rdma_rw_ctx_init(), and it
    oopses.
    
    Signed-off-by: Chuck Lever <chuck.lever@xxxxxxxxxx>
    Stable-dep-of: ffc17e1479e8 ("platform/x86: dell-smbios: Fix error path in dell_smbios_init()")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/sunrpc/xprtrdma/svc_rdma_rw.c b/net/sunrpc/xprtrdma/svc_rdma_rw.c
index 80a0c0e87590..7c50eddb8d3c 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_rw.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_rw.c
@@ -460,6 +460,8 @@ svc_rdma_build_writes(struct svc_rdma_write_info *info,
 		offset += info->wi_seg_off;
 
 		write_len = min(remaining, length - info->wi_seg_off);
+		if (!write_len)
+			goto out_overflow;
 		ctxt = svc_rdma_get_rw_ctxt(rdma,
 					    (write_len >> PAGE_SHIFT) + 2);
 		if (!ctxt)




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux