mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yingjie Wang <x-professor@outlook.com>
To: "leitao@debian.org" <leitao@debian.org>
Cc: "a.hindborg@kernel.org" <a.hindborg@kernel.org>,
	"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>,
	Yingjie Wang <x-professor@outlook.com>
Subject: Re: [PATCH] configfs: protect symlink source callbacks from removal
Date: Sat, 7 Nov 2026 09:42:57 +0000	[thread overview]
Message-ID: <20261107094255.471878-1-x-professor@outlook.com> (raw)
In-Reply-To: <au39EinX6Xhj4yoj@gmail.com>

Hi Breno,

Thanks for testing this and for the KASAN report.

My original test raced symlink() against rmdir() of a UVC gadget format
directory. The base kernel hit a NULL pointer dereference in
uvcg_format_allow_link() within 1,000 iterations, while my patch completed
10,000 iterations without a KASAN report.

That test did not cover the nvmet parent-item lifetime issue you found.

After your reply, I also tested Drif's posted v3 with the same UVC reproducer
and KASAN configuration. It triggered a use-after-free in config_item_put(),
followed by a refcount warning.

Adding parent_item = NULL immediately after the early config_item_put() made
the same 10,000-iteration test complete without KASAN reports or refcount
warnings.

These tests used QEMU TCG because the host has no /dev/kvm.

I saw your discussion with Drif about the missing NULL assignment, so I
understand that issue has already been identified.

Please do not apply my current frag_sem patch. I will not send a v2 based on
that change alone.

I have not established whether the corrected parent-item fix also protects
the unregister-group and unregister-subsystem callback paths. Those would
need separate verification.

Thanks,
Yingjie


      reply	other threads:[~2026-11-07  9:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05 13:45 Yingjie Wang
2026-11-06 16:16 ` Breno Leitao
2026-11-07  9:42   ` Yingjie Wang [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=20261107094255.471878-1-x-professor@outlook.com \
    --to=x-professor@outlook.com \
    --cc=a.hindborg@kernel.org \
    --cc=leitao@debian.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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®