mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Luczaj <mhal@rbox.co>
To: Luigi Leonardi <leonardi@redhat.com>,
	Stefano Garzarella <sgarzare@redhat.com>
Cc: virtualization@lists.linux.dev, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 2/2] vsock/test: Add test for null ptr deref when transport changes
Date: Fri, 7 Mar 2025 10:32:27 +0100	[thread overview]
Message-ID: <7e3ccc22-0028-4cb6-829f-67d93cb5c14e@rbox.co> (raw)
In-Reply-To: <20250306-test_vsock-v1-2-0320b5accf92@redhat.com>

On 3/6/25 17:09, Luigi Leonardi wrote:
> Add a new test to ensure that when the transport changes a null pointer
> dereference does not occur[1].
> 
> Note that this test does not fail, but it may hang on the client side if
> it triggers a kernel oops.
> 
> This works by creating a socket, trying to connect to a server, and then
> executing a second connect operation on the same socket but to a
> different CID (0). This triggers a transport change. If the connect
> operation is interrupted by a signal, this could cause a null-ptr-deref.
> 
> Since this bug is non-deterministic, we need to try several times. It
> is safe to assume that the bug will show up within the timeout period.
> 
> If there is a G2H transport loaded in the system, the bug is not
> triggered and this test will always pass.
> 
> [1]https://lore.kernel.org/netdev/Z2LvdTTQR7dBmPb5@v4bel-B760M-AORUS-ELITE-AX/
> 
> Suggested-by: Michal Luczaj <mhal@rbox.co>
> Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
> ---

I think the credit should be given to Hyunwoo Kim, not me.

Thanks though,
Michal

      parent reply	other threads:[~2025-03-07  9:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-06 16:09 [PATCH net-next 0/2] vsock/test: check for null-ptr-deref " Luigi Leonardi
2025-03-06 16:09 ` [PATCH net-next 1/2] vsock/test: Add new function to check for timeout Luigi Leonardi
2025-03-06 16:09 ` [PATCH net-next 2/2] vsock/test: Add test for null ptr deref when transport changes Luigi Leonardi
2025-03-06 17:05   ` Stefano Garzarella
2025-03-07  9:32   ` Michal Luczaj [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7e3ccc22-0028-4cb6-829f-67d93cb5c14e@rbox.co \
    --to=mhal@rbox.co \
    --cc=leonardi@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sgarzare@redhat.com \
    --cc=virtualization@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®