mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mayank Jangid <mayank.jangid.moon@gmail.com>
To: Chuck Lever <cel@kernel.org>
Cc: jlayton@kernel.org, neil@brown.name, okorniev@redhat.com,
	Dai.Ngo@oracle.com, tom@talpey.com, linux-nfs@vger.kernel.org,
	linux-kernel@vger.kernel.org, security@kernel.org,
	Kushal Khemka <kushalkhemka559@gmail.com>,
	Kkartik Aggarwal <aggarwalkkartik@gmail.com>
Subject: Re: [PATCH] nfsd: prevent NFSv4.1 SEQUENCE reply-cache overflow
Date: Wed, 23 Sep 2026 06:07:38 +0530	[thread overview]
Message-ID: <A0CE2B28-0875-43AE-95A2-18AA7FB758B4@gmail.com> (raw)
In-Reply-To: <29830200-dcb0-452f-9e19-80a595b46fe7@slotpi15m67>

Hi Chuck,

Thanks for pointing me to Jérémy's series.

I tested the queued fix against our reproducer, and it resolves the issue. I can no longer reproduce the reply buffer overflow with the two patches applied.

Please feel free to add:
Tested-by: Mayank Jangid (OpenSec Intelligence) mayank.jangid.moon@gmail.com <mailto:mayank.jangid.moon@gmail.com>

Thanks,
Mayank Jangid
OpenSec Intelligence

> On 22 Sep 2026, at 7:36 PM, Chuck Lever <cel@kernel.org> wrote:
> 
> On 9/22/26 7:26 AM, Mayank Jangid (OpenSec Intelligence) wrote:
>> nfsd4_sequence() narrows the reply buffer to the session cached-response
>> limit before accepting the slot sequence ID. A client can negotiate
>> ca_maxresponsesize_cached down to NFSD_MIN_HDR_SEQ_SZ, leaving no storage
>> in the slot trailing sl_data[] array.
> 
> Thanks for the report and the patch. Jérémy Jean reported the same
> issue in August, and a fix for it is already queued in the nfsd-testing
> branch:
> 
>  https://lore.kernel.org/linux-nfs/20260817-jean-v1-0-9e356596ab85@kernel.org/
> 
> Patch 1/2 there adds the same pre-flight check of the SEQUENCE reply
> size before nfsd4_sequence() narrows the buffer and accepts the slot,
> and patch 2/2 sets op->status when an operation header cannot be
> encoded. Your patch does the same two things, so I won't apply it on
> top of that series.
> 
> If you can test the queued fix against your reproducer and confirm it
> addresses the overflow you found, a Tested-by: on that thread would be
> welcome.
> 
> -- 
> Chuck Lever (Come to NFS bake-a-thon! https://nfsv4bat.org)


      reply	other threads:[~2026-09-23  0:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22 11:26 Mayank Jangid (OpenSec Intelligence)
2026-09-22 14:06 ` Chuck Lever
2026-09-23  0:37   ` Mayank Jangid [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=A0CE2B28-0875-43AE-95A2-18AA7FB758B4@gmail.com \
    --to=mayank.jangid.moon@gmail.com \
    --cc=Dai.Ngo@oracle.com \
    --cc=aggarwalkkartik@gmail.com \
    --cc=cel@kernel.org \
    --cc=jlayton@kernel.org \
    --cc=kushalkhemka559@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neil@brown.name \
    --cc=okorniev@redhat.com \
    --cc=security@kernel.org \
    --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®