mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Chuck Lever" <cel@kernel.org>
To: "Jérémy Jean" <Jeremy.Jean@oss.cyber.gouv.fr>,
	"Jeff Layton" <jlayton@kernel.org>,
	"Trond Myklebust" <trondmy@kernel.org>,
	"Anna Schumaker" <anna@kernel.org>
Cc: linux-nfs@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] SUNRPC: restrict integrity replies to authenticated payload
Date: Mon, 21 Sep 2026 09:27:47 -0400	[thread overview]
Message-ID: <c0704c72-ea15-4e2b-b145-d6de6d469b85@app.fastmail.com> (raw)
In-Reply-To: <20260920210712.2887738-2-Jeremy.Jean@oss.cyber.gouv.fr>



On Sun, Sep 20, 2026, at 5:07 PM, Jérémy Jean wrote:
> gss_unwrap_resp_integ() authenticates only databody_integ. The checksum
> object and any bytes after it are not covered by the integrity check, but
> remain visible to the XDR decoder.
>
> This makes RPCSEC_GSS reply payloads malleable by bypassing crypto
> integrity. A modified reply can contain only the RPCSEC_GSS sequence
> number in databody_integ, reuse the reply verifier MIC as the body MIC,
> and append bytes that the decoder consumes without invalidating the MIC.
>
> Decode the checksum length into mic.len and truncate the decode stream
> after MIC verification so only the authenticated payload remains visible.
> Reject bodies shorter than the mandatory sequence number before using the
> body length.
>
> Fixes: 1da177e4c3f41 ("Linux-2.6.12-rc2")
> Assisted-by: Codex:gpt-5
> Signed-off-by: Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>
> ---
> Changes in v2:
> - Drop the redundant xdr_stream_remaining() guard before truncation.
>
> v1: 
> https://lore.kernel.org/all/20260919212024.2335794-2-Jeremy.Jean@oss.cyber.gouv.fr/
>
>  net/sunrpc/auth_gss/auth_gss.c | 13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)

Reviewed-by: Chuck Lever <cel@kernel.org>

-- 
Chuck Lever (Come to NFS bake-a-thon! https://nfsv4bat.org)

  reply	other threads:[~2026-09-21 13:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-20 21:07 Jérémy Jean
2026-09-21 13:27 ` Chuck Lever [this message]
2026-09-22 15:50 ` 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=c0704c72-ea15-4e2b-b145-d6de6d469b85@app.fastmail.com \
    --to=cel@kernel.org \
    --cc=Jeremy.Jean@oss.cyber.gouv.fr \
    --cc=anna@kernel.org \
    --cc=jlayton@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --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®