svcrdma: underflow issue in decode_write_list()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 12 Jul 2013 06:39:03 +0000 (09:39 +0300)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 15 Jul 2013 15:46:23 +0000 (11:46 -0400)
commitb2781e1021525649c0b33fffd005ef219da33926
tree8169f00611f6e56b1201d56fbbcd9e4020859231
parent35f7a14fc1180164d6358a5885031fc187ef1bfa
svcrdma: underflow issue in decode_write_list()

My static checker marks everything from ntohl() as untrusted and it
complains we could have an underflow problem doing:

return (u32 *)&ary->wc_array[nchunks];

Also on 32 bit systems the upper bound check could overflow.

Cc: stable@vger.kernel.org
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
net/sunrpc/xprtrdma/svc_rdma_marshal.c