From: "Jérémy Jean" <jeremy.jean@oss.cyber.gouv.fr>
To: "Jérémy Jean" <Jeremy.Jean@oss.cyber.gouv.fr>
Cc: Trond Myklebust <trondmy@kernel.org>,
Anna Schumaker <anna@kernel.org>,
linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] NFS: blocklayout: reject oversized SCSI designators
Date: Tue, 03 Nov 2026 23:05:22 +0100 [thread overview]
Message-ID: <c65fcdbf90ff456f00a80bbb1086fbca@oss.cyber.gouv.fr> (raw)
In-Reply-To: <20260826080736.1431809-2-Jeremy.Jean@oss.cyber.gouv.fr>
On 2026-08-26 10:07, Jérémy Jean wrote:
> A SCSI GETDEVICEINFO reply can encode designator_len as 0xffffffff.
> The
> current signed field turns that into -1, so the size check is bypassed
> and
> the value is converted to SIZE_MAX for xdr_inline_decode() and
> memcpy().
>
> The attacker model considers a controlled NFSv4.1+ server and a client
> already mounted to that server. An OOB read can be triggered in the
> client
> on a file read. KASAN reports:
>
> BUG: KASAN: out-of-bounds in bl_alloc_deviceid_node+0x616/0x1110
> Read of size 18446744073709551615
> ...
> __asan_memcpy+0x23/0x60
> bl_alloc_deviceid_node+0x616/0x1110
> nfs4_find_get_deviceid+0x565/0x810
> bl_alloc_lseg+0x638/0x12d0
> pnfs_layout_process+0x2b6/0xcf0
> nfs4_proc_layoutget+0x4b3/0xd30
>
>
> The fix stores the length as u32 and reject oversized values before
> decoding.
> The check is moved up before the call to xdr_inline_decode().
>
> [...]
Hello,
Did you have time to look into that?
The OOB read is currently still present.
Thanks,
Jérémy
prev parent reply other threads:[~2026-11-03 22:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 8:07 Jérémy Jean
2026-11-03 22:05 ` Jérémy Jean [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=c65fcdbf90ff456f00a80bbb1086fbca@oss.cyber.gouv.fr \
--to=jeremy.jean@oss.cyber.gouv.fr \
--cc=anna@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=stable@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®