From: "Chuck Lever" <cel@kernel.org>
To: michael.d.lowman@gmail.com, "Jeff Layton" <jlayton@kernel.org>,
NeilBrown <neil@brown.name>,
"Olga Kornievskaia" <okorniev@redhat.com>,
"Dai Ngo" <Dai.Ngo@oracle.com>, "Tom Talpey" <tom@talpey.com>,
"Trond Myklebust" <trondmy@kernel.org>,
"Anna Schumaker" <anna@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@kernel.org>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Simon Horman" <horms@kernel.org>
Cc: linux-nfs@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] SUNRPC: avoid possible page reuse from svcauth_gss_wrap_integ()
Date: Thu, 22 Oct 2026 10:28:05 -0400 [thread overview]
Message-ID: <bfc542d3-4be3-4887-bc93-81403b5a8c11@app.fastmail.com> (raw)
In-Reply-To: <20261022-integ-page-reuse-v1-1-fbe571857d4f@gmail.com>
On Thu, Oct 22, 2026, at 9:10 AM, Michael Lowman via B4 Relay wrote:
> From: Michael Lowman <michael.d.lowman@gmail.com>
>
> Commit 7702378ac4d4 ("SUNRPC: Convert svcauth_gss_wrap_integ() to
> use xdr_stream()") and its parent changed from calculating the
> integrity checksum in-place in an unused part of the response buffer
> to calculating in a scratch buffer and appending it to the response
> stream. While the unused part of the response buffer happened to
> always end on the first page, the append always occurs on the last.
>
> If less than 32 bytes remain before the page boundary, some or all
> of the checksum will be written to the next page. But since the xdr
> functions do not update the response's page accounting, the page
> will be immediately available for reuse. Data from another request
> will overwrite the portion of the checksum on the new page.
>
> Avoid this by marking the page as used when needed.
>
> Signed-off-by: Michael Lowman <michael.d.lowman@gmail.com>
> Fixes: 7702378ac4d4 ("SUNRPC: Convert svcauth_gss_wrap_integ() to use
> xdr_stream()")
Commit d1eafc3bab9f "SUNRPC: in svcauth_gss_wrap_integ() resync
rq_next_page after the GSS wrap", now in the nfsd-testing branch,
already addresses this issue. Thanks for confirming the finding!
--
Chuck Lever (Come to NFS bake-a-thon! https://nfsv4bat.org)
prev parent reply other threads:[~2026-10-22 14:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 13:10 Michael Lowman via B4 Relay
2026-10-22 14:28 ` Chuck Lever [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=bfc542d3-4be3-4887-bc93-81403b5a8c11@app.fastmail.com \
--to=cel@kernel.org \
--cc=Dai.Ngo@oracle.com \
--cc=anna@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=jlayton@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=michael.d.lowman@gmail.com \
--cc=neil@brown.name \
--cc=netdev@vger.kernel.org \
--cc=okorniev@redhat.com \
--cc=pabeni@redhat.com \
--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 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®