mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paulo Alcantara <pc@manguebit.org>
To: Karl Mehltretter <kmehltretter@gmail.com>,
	Namjae Jeon <linkinjeon@kernel.org>
Cc: Karl Mehltretter <kmehltretter@gmail.com>,
	Ronnie Sahlberg <ronniesahlberg@gmail.com>,
	Shyam Prasad N <sprasad@microsoft.com>,
	Tom Talpey <tom@talpey.com>, Bharath SM <bharathsm@microsoft.com>,
	linux-cifs@vger.kernel.org, samba-technical@lists.samba.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] smb: client: pin DFS superblock in iterator callback
Date: Thu, 03 Sep 2026 12:24:59 -0300	[thread overview]
Message-ID: <9aa7600f65742727d7588941599394c3@manguebit.org> (raw)
In-Reply-To: <20260902182814.25700-1-kmehltretter@gmail.com>

Karl Mehltretter <kmehltretter@gmail.com> writes:

> tcon_super_cb() stores a raw superblock pointer, but __cifs_get_super()
> takes its active reference only after iterate_supers_type() has dropped
> s_umount and its passive reference. Concurrent DFS automount expiry can
> therefore free the superblock before cifs_sb_active() uses it.
>
> A deterministic KASAN test reproduces the race as:
>
>   BUG: KASAN: slab-use-after-free in cifs_sb_active+0x77/0x80
>
> The same test passes with this change applied.
>
> Take the active reference in the callback while iterate_supers_type()
> still holds s_umount shared. cifs_put_tcp_super() remains the matching
> release.
> ...

Applied.

  reply	other threads:[~2026-09-03 15:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-02 18:28 Karl Mehltretter
2026-09-03 15:24 ` Paulo Alcantara [this message]
2026-09-07  7:11   ` Shyam Prasad N

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=9aa7600f65742727d7588941599394c3@manguebit.org \
    --to=pc@manguebit.org \
    --cc=bharathsm@microsoft.com \
    --cc=kmehltretter@gmail.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ronniesahlberg@gmail.com \
    --cc=samba-technical@lists.samba.org \
    --cc=sprasad@microsoft.com \
    --cc=tom@talpey.com \
    /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®