All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Chuck Lever <cel@kernel.org>
Cc: Jeff Layton <jlayton@kernel.org>,
	Trond Myklebust <trondmy@kernel.org>,
	Anna Schumaker <anna@kernel.org>, Hyunsol Mun <muumthf@gmail.com>,
	NeilBrown <neil@brown.name>,
	Olga Kornievskaia <okorniev@redhat.com>,
	Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
	linux-nfs@vger.kernel.org, stable@vger.kernel.org,
	bobtobabz@gmail.com
Subject: Re: [PATCH] SUNRPC: make XDR_QUADLEN() overflow-safe
Date: Tue, 1 Dec 2026 08:21:18 +0300	[thread overview]
Message-ID: <aw5ZTv-bq-2uV1VK@stanley.mountain> (raw)
In-Reply-To: <179606512378.2626950.14565901368079658376.b4-ty@b4>

On Mon, Nov 30, 2026 at 01:58:51PM -0500, Chuck Lever wrote:
> On Mon, 30 Nov 2026 17:33:39 +0900, Hyunsol Mun wrote:
> > XDR_QUADLEN() rounds a byte count up by adding three before dividing
> > by four. On 32-bit systems, a length near UINT_MAX wraps the addition
> > and can produce a zero word count. __xdr_inline_decode() then accepts
> > the length without advancing the stream because its bounds checks
> > operate on the wrapped result.
> > 
> > A malformed NFSv4 SETATTR request can supply UINT_MAX as the
> > FATTR4_OWNER length. The zero word count bypasses the XDR bounds check,
> > after which NFSD passes the original length to its name-to-ID mapper
> > and attempts an oversized copy into a fixed-size stack buffer.
> > 
> > [...]
> 
> Applied to nfsd-testing, thanks!
> 
> [1/1] SUNRPC: make XDR_QUADLEN() overflow-safe
>       commit: f61d4acd903a15bff7302f4aaa056f4c43d74858

Hooray!

regards,
dan carpenter


      reply	other threads:[~2026-12-01  5:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30  8:33 [PATCH] SUNRPC: make XDR_QUADLEN() overflow-safe Hyunsol Mun
2026-11-30 18:58 ` Chuck Lever
2026-12-01  5:21   ` Dan Carpenter [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=aw5ZTv-bq-2uV1VK@stanley.mountain \
    --to=error27@gmail.com \
    --cc=Dai.Ngo@oracle.com \
    --cc=anna@kernel.org \
    --cc=bobtobabz@gmail.com \
    --cc=cel@kernel.org \
    --cc=jlayton@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=muumthf@gmail.com \
    --cc=neil@brown.name \
    --cc=okorniev@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=tom@talpey.com \
    --cc=trondmy@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.