mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
Merge branch 'vsock-fix-stale-sk_err-handling-after-a-failed-connect'
Nguyen Dinh Phi says: ==================== vsock: fix stale sk_err handling after a failed connect A socket whose connect() failed keeps sk_err set. If that socket is later reused as a listener, vsock_accept() rejects an unrelated incoming connection, and on virtio/hyperv the resulting child socket is leaked. Patch 1 removes the listener's sk_err check from vsock_accept(), since no vsock transport ever sets sk_err on a TCP_LISTEN socket. This will fix what the syzbot reported. Patch 2 removes vsock_sock.rejected, now unreachable after patch 1. Patch 3 is a related but separate fix: vsock_connect() now consumes sk_err via sock_error() once it has been returned to userspace, so a failed blocking connect() doesn't keep reporting the same error a second time. ==================== Link: https://patch.msgid.link/20260813173024.2362935-1-phind.uet@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
commit
a3dee9bb90
2 changed files with 21 additions and 46 deletions
Loading…
Add table
Add a link
Reference in a new issue