mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nehuen Lian Bova <nehuenlian.kernel@gmail.com>
To: mpatocka@redhat.com, yukuai@fygo.io
Cc: linux-kernel@vger.kernel.org, dm-devel@redhat.com,
	Nehuen Lian Bova <nehuenlian.kernel@gmail.com>
Subject: Re: [PATCH] dm: reject kcopyd client destroy if it setup failed
Date: Mon, 26 Oct 2026 04:23:27 -0300	[thread overview]
Message-ID: <20261026072327.1363893-1-nehuenlian.kernel@gmail.com> (raw)
In-Reply-To: <20261026042137.178310-1-eadavis@sina.com>

Hi Edward,

I reproduced this bug using the syzkaller repro on a kernel built
from the reported commit.

Effectively, in "drivers/md/dm-cache-target.c", if the execution path
ends up in a bad_* goto, *kc (which is cache->copier in cache_create) will
be freed and the function will return an error pointer, but cache->copier 
will be dereferenced later in dm_kcopyd_client_destroy, causing the bug.

With your change the reproducer loops on "could not create kcopyd 
client", which means the null ptr deref is gone.

I suggest removing (or trimming) the call trace in the commit description
(is already available in the syzbot report linked in the patch) to keep 
it cleaner.

With that small change in the commit description you can add my:
Reviewed-by: Nehuen Lian Bova <nehuenlian.kernel@gmail.com>
Tested-by: Nehuen Lian Bova <nehuenlian.kernel@gmail.com>

Thanks,
Nehuen Lian Bova

      reply	other threads:[~2026-10-26  7:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-25 11:46 [syzbot] [dm?] KASAN: null-ptr-deref Read in dm_kcopyd_client_destroy syzbot
2026-10-26  1:59 ` Edward Adam Davis
2026-10-26  7:05   ` syzbot
2026-10-26  4:21 ` [PATCH] dm: reject kcopyd client destory if it setup failed Edward Adam Davis
2026-10-26  7:23   ` Nehuen Lian Bova [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=20261026072327.1363893-1-nehuenlian.kernel@gmail.com \
    --to=nehuenlian.kernel@gmail.com \
    --cc=dm-devel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=yukuai@fygo.io \
    /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®