]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
SUNRPC: Don't leak sockets in xs_local_connect()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Tue, 5 Jul 2022 04:55:00 +0000 (06:55 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 12 Jul 2022 08:28:44 +0000 (10:28 +0200)
commitc8b5f02621fe94aae4209f6edc39cb50f95e9ff9
tree379d019f526ebb42be130c2b922026beaa88ec46
parent264389570d0c71e6e3d6969f5588ad2a61ef7649
SUNRPC: Don't leak sockets in xs_local_connect()

If there is still a closed socket associated with the transport, then we
need to trigger an autoclose before we can set up a new connection.

Reported-by: wanghai (M) <wanghai38@huawei.com>
Fixes: f00432063db1 ("SUNRPC: Ensure we flush any closed sockets before xs_xprt_free()")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
CVE-2022-28893
(backported from commit aad41a7d7cf6c6fa804c872a2480f8e541da37cf)
[cengizcan: we don't have commit c4f0396688b5 which fixes the indent
issue so change context]
Signed-off-by: Cengiz Can <cengiz.can@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
net/sunrpc/xprtsock.c