]> git.ipfire.org Git - people/ms/linux.git/commit
NFSv4.1: Fix a kfree() of uninitialised pointers in decode_cb_sequence_args
authorTrond Myklebust <trond.myklebust@primarydata.com>
Wed, 11 Feb 2015 22:27:55 +0000 (17:27 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Mar 2015 22:43:29 +0000 (14:43 -0800)
commit5c88a9da64fccefe0374deae0ca806fec79b727e
treeffeec17926032327c306e27ce7cd673ae09c7a70
parent2c679cbba9e0c86d3b30072d95bc538adc4bc3d2
NFSv4.1: Fix a kfree() of uninitialised pointers in decode_cb_sequence_args

commit d8ba1f971497c19cf80da1ea5391a46a5f9fbd41 upstream.

If the call to decode_rc_list() fails due to a memory allocation error,
then we need to truncate the array size to ensure that we only call
kfree() on those pointer that were allocated.

Reported-by: David Ramos <daramos@stanford.edu>
Fixes: 4aece6a19cf7f ("nfs41: cb_sequence xdr implementation")
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/callback_xdr.c