SUNRPC: Fix leak of krb5p encode pages
authorChuck Lever <chuck.lever@oracle.com>
Fri, 30 Nov 2018 20:39:57 +0000 (15:39 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Dec 2018 08:16:19 +0000 (09:16 +0100)
commit33154a2998902b16a5a29910422078f2a700753b
tree20328dfa8a05f7ff6d04ac322e0692572e56b960
parent1d9ca56698ad6554d41057fec297b2ca7c842871
SUNRPC: Fix leak of krb5p encode pages

commit 8dae5398ab1ac107b1517e8195ed043d5f422bd0 upstream.

call_encode can be invoked more than once per RPC call. Ensure that
each call to gss_wrap_req_priv does not overwrite pointers to
previously allocated memory.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: stable@kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sunrpc/auth_gss/auth_gss.c