svcrdma: underflow issue in decode_write_list()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 12 Jul 2013 06:39:03 +0000 (09:39 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Aug 2013 08:50:57 +0000 (16:50 +0800)
commita4208aa227113be2e0ea81613c4f15d3bc2fc768
tree9d98b27bdf13260e7d7a153269b1e1fb61e79023
parent2794edb180b726d9d8aedcc6c7034e2d877489fc
svcrdma: underflow issue in decode_write_list()

commit b2781e1021525649c0b33fffd005ef219da33926 upstream.

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.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sunrpc/xprtrdma/svc_rdma_marshal.c