]> www.infradead.org Git - users/willy/pagecache.git/commit
vsock/test: Add test for SO_LINGER null ptr deref
authorMichal Luczaj <mhal@rbox.co>
Mon, 10 Feb 2025 12:15:01 +0000 (13:15 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 13 Feb 2025 04:01:29 +0000 (20:01 -0800)
commit440c9d488705366b00372ea7213af69827a6c7af
tree3247411d05fb9743fe478f4a8f88e6786c32ac0c
parent78dafe1cf3afa02ed71084b350713b07e72a18fb
vsock/test: Add test for SO_LINGER null ptr deref

Explicitly close() a TCP_ESTABLISHED (connectible) socket with SO_LINGER
enabled.

As for now, test does not verify if close() actually lingers.
On an unpatched machine, may trigger a null pointer dereference.

Tested-by: Luigi Leonardi <leonardi@redhat.com>
Reviewed-by: Luigi Leonardi <leonardi@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Michal Luczaj <mhal@rbox.co>
Link: https://patch.msgid.link/20250210-vsock-linger-nullderef-v3-2-ef6244d02b54@rbox.co
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/vsock/vsock_test.c