linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Adriano Cordova <adrianox@gmail.com>
Cc: Ulf Hansson <ulfh@kernel.org>, Stephen Boyd <swboyd@chromium.org>,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	syzbot+f312381a95cc080992fd@syzkaller.appspotmail.com,
	stable@vger.kernel.org
Subject: Re: [PATCH v2] mmc: vub300: fix use-after-free in vub300 teardown
Date: Tue, 8 Sep 2026 17:51:46 +0200	[thread overview]
Message-ID: <aqAvEi0cxbT7Gk6j@hovoldconsulting.com> (raw)
In-Reply-To: <20260908150901.58915-1-adrianox@gmail.com>

On Tue, Sep 08, 2026 at 12:09:00PM -0300, Adriano Cordova wrote:
> mmc_host_classdev_release() reads host->parent->of_node, but the
> parent is not guaranteed to outlive the host. Instead, store
> host->index_is_alias to avoid reading the parent at release time.
> 
> Also, call kref_put() after mmc_request_done(), as the latter
> dereferences the host pointer.

These are two separate issues and should be fixed separately.

> Fixes: 88095e7b473a ("mmc: Add new VUB300 USB-to-SD/SDIO/MMC driver")

This is not the commit that introduced the of_node issue.

> Reported-by: syzbot+f312381a95cc080992fd@syzkaller.appspotmail.com
> Link: https://syzkaller.appspot.com/bug?extid=f312381a95cc080992fd
> Assisted-by: opencode: deepseek v4 flash
> Cc: stable@vger.kernel.org
> Signed-off-by: Adriano Cordova <adrianox@gmail.com>
> ---
>  drivers/mmc/core/host.c   | 3 ++-
>  drivers/mmc/host/vub300.c | 4 ++--
>  include/linux/mmc/host.h  | 1 +
>  3 files changed, 5 insertions(+), 3 deletions(-)

Johan

      reply	other threads:[~2026-09-08 15:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-08 15:09 [PATCH v2] mmc: vub300: fix use-after-free in vub300 teardown Adriano Cordova
2026-09-08 15:51 ` Johan Hovold [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=aqAvEi0cxbT7Gk6j@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=adrianox@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=swboyd@chromium.org \
    --cc=syzbot+f312381a95cc080992fd@syzkaller.appspotmail.com \
    --cc=ulfh@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).