SUNRPC: Introduce new xdr_stream-based decoders to rpcb_clnt.c
authorChuck Lever <chuck.lever@oracle.com>
Sun, 9 Aug 2009 19:09:43 +0000 (15:09 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Sun, 9 Aug 2009 19:09:43 +0000 (15:09 -0400)
commitc0c077df009f2f329875051ac5283df235288689
tree50c0f9b6d78ebbfd711d5bf4c436aa116ed85a51
parent7ed0ff983c8ad30bf4e2b9fdbb299a3e3ec08d08
SUNRPC: Introduce new xdr_stream-based decoders to rpcb_clnt.c

Replace the open-coded decode logic for PMAP_GETPORT/RPCB_GETADDR with
an xdr_stream-based implementation, similar to what NFSv4 uses, to
protect against buffer overflows.  The new implementation also checks
that the incoming port number is reasonable.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/rpcb_clnt.c