rxrpc: Fix rxrpc_local leak in rxrpc_lookup_peer()
stable inclusion from stable-v4.19.220 commit 913c24af2d13a3fd304462916ee98e298d56bdce category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9S23H CVE: CVE-2021-47538 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=913c24af2d13a3fd304462916ee98e298d56bdce -------------------------------- commit beacff50 upstream. Need to call rxrpc_put_local() for peer candidate before kfree() as it holds a ref to rxrpc_local. [DH: v2: Changed to abstract the peer freeing code out into a function] Fixes: 9ebeddef ("rxrpc: rxrpc_peer needs to hold a ref on the rxrpc_local record") Signed-off-by:Eiichi Tsukata <eiichi.tsukata@nutanix.com> Signed-off-by:
David Howells <dhowells@redhat.com> Reviewed-by:
Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/all/20211121041608.133740-2-eiichi.tsukata@nutanix.com/ # v1 Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Liu Chuang <liuchuang40@huawei.com>
Loading
Please sign in to comment