mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: "Cen Zhang (Microsoft Security FORGE Labs)" <blbllhy@gmail.com>
Cc: cel@kernel.org, jlayton@kernel.org, neil@brown.name,
	okorniev@redhat.com, Dai.Ngo@oracle.com, tom@talpey.com,
	bfields@fieldses.org, linux-nfs@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	AutonomousCodeSecurity@microsoft.com, xmei5@asu.edu,
	tgopinath@linux.microsoft.com, kys@microsoft.com
Subject: Re: [PATCH] nfsd: hold cl_lock in client_has_state()
Date: Fri, 28 Aug 2026 07:29:11 +0200	[thread overview]
Message-ID: <2026082828-palpable-dingo-241b@gregkh> (raw)
In-Reply-To: <20260828041925.36758-1-blbllhy@gmail.com>

On Fri, Aug 28, 2026 at 12:19:25AM -0400, Cen Zhang (Microsoft Security FORGE Labs) wrote:
> client_has_openowners() walks clp->cl_openowners and reads so_stateids
> without clp->cl_lock. nfs4_put_stateowner() unhashes that openowner under
> cl_lock and then frees it, so a concurrent EXCHANGE_ID with mismatched
> creds can use-after-free the nfs4_openowner.
> 
> BUG: KASAN: slab-use-after-free in client_has_state+0x10a/0x140
>   fs/nfsd/nfs4state.c:3718 client_has_openowners()
>   nfsd4_exchange_id
>   nfsd4_proc_compound
>   nfsd_dispatch
>   svc_process
> 
> Take clp->cl_lock while client_has_state() walks the openowner list.
> 
> Fixes: 4eaea1342507 ("nfsd: improve client_has_state to check for unused openowners")
> Reported-by: Xiang Mei (Microsoft) <xmei5@asu.edu>
> Cc: AutonomousCodeSecurity@microsoft.com
> Cc: stable@vger.kernel.org
> Signed-off-by: Cen Zhang (Microsoft Security FORGE Labs) <blbllhy@gmail.com>

Please use your microsoft.com email address, and not a random gmail.com
address.  It's kind of odd that Microsoft would have to rely on Google
to send kernel patches :)

thanks,

greg k-h

  reply	other threads:[~2026-08-28  5:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-28  4:19 Cen Zhang (Microsoft Security FORGE Labs)
2026-08-28  5:29 ` Greg KH [this message]
2026-08-28 12:33   ` Cen Zhang (Microsoft)
2026-08-28 13:45   ` Chuck Lever
2026-08-29  5:52     ` Greg Kroah-Hartman
2026-09-04 15:12   ` Cen Zhang (Microsoft Security FORGE Labs)
2026-09-04 16:36     ` Chuck Lever
2026-08-29 15:53 ` Chuck Lever

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=2026082828-palpable-dingo-241b@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=AutonomousCodeSecurity@microsoft.com \
    --cc=Dai.Ngo@oracle.com \
    --cc=bfields@fieldses.org \
    --cc=blbllhy@gmail.com \
    --cc=cel@kernel.org \
    --cc=jlayton@kernel.org \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neil@brown.name \
    --cc=okorniev@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=tgopinath@linux.microsoft.com \
    --cc=tom@talpey.com \
    --cc=xmei5@asu.edu \
    /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®