netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v3 0/2] vsock: null-ptr-deref when SO_LINGER enabled
@ 2025-02-10 12:14 Michal Luczaj
  2025-02-10 12:15 ` [PATCH net v3 1/2] vsock: Orphan socket after transport release Michal Luczaj
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Michal Luczaj @ 2025-02-10 12:14 UTC (permalink / raw)
  To: Stefano Garzarella, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Simon Horman
  Cc: netdev, Michal Luczaj, syzbot+9d55b199192a4be7d02c,
	Luigi Leonardi

syzbot pointed out that a recent patching of a use-after-free introduced a
null-ptr-deref. This series fixes the problem and adds a test.

Fixes fcdd2242c023 ("vsock: Keep the binding until socket destruction").

Signed-off-by: Michal Luczaj <mhal@rbox.co>
---
Changes in v3:
- Don't touch the old comment [Stefano, Luigi]
- Collect tags [Stefano, Luigi]
- Link to v2: https://lore.kernel.org/r/20250206-vsock-linger-nullderef-v2-0-f8a1f19146f8@rbox.co

Changes in v2:
- Collect tags [Luigi]
- Explain the reason for the explicit set_flag(SOCK_DEAD) [Stefano]
- Link to v1: https://lore.kernel.org/r/20250204-vsock-linger-nullderef-v1-0-6eb1760fa93e@rbox.co

---
Michal Luczaj (2):
      vsock: Orphan socket after transport release
      vsock/test: Add test for SO_LINGER null ptr deref

 net/vmw_vsock/af_vsock.c         |  8 +++++++-
 tools/testing/vsock/vsock_test.c | 41 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+), 1 deletion(-)
---
base-commit: 011b0335903832facca86cd8ed05d7d8d94c9c76
change-id: 20250203-vsock-linger-nullderef-cbe4402ad306

Best regards,
-- 
Michal Luczaj <mhal@rbox.co>


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-02-14 13:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-10 12:14 [PATCH net v3 0/2] vsock: null-ptr-deref when SO_LINGER enabled Michal Luczaj
2025-02-10 12:15 ` [PATCH net v3 1/2] vsock: Orphan socket after transport release Michal Luczaj
2025-02-10 12:40   ` Stefano Garzarella
2025-02-10 12:15 ` [PATCH net v3 2/2] vsock/test: Add test for SO_LINGER null ptr deref Michal Luczaj
2025-02-13  4:02 ` [PATCH net v3 0/2] vsock: null-ptr-deref when SO_LINGER enabled Jakub Kicinski
2025-02-13 10:15   ` Michal Luczaj
2025-02-13 15:24     ` Jakub Kicinski
2025-02-14 13:15       ` Michal Luczaj
2025-02-13  4:10 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).