Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Paulo Alcantara <pc@manguebit.org>
To: hexlabsecurity@proton.me, Steve French <sfrench@samba.org>
Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com>,
	linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
	Tom Talpey <tom@talpey.com>, Jeff Layton <jlayton@kernel.org>,
	Bharath SM <bharathsm@microsoft.com>,
	linux-cifs@vger.kernel.org, samba-technical@lists.samba.org,
	Nathan Chancellor <nathan@kernel.org>,
	Shyam Prasad N <sprasad@microsoft.com>,
	Namjae Jeon <linkinjeon@kernel.org>,
	David Howells <dhowells@redhat.com>
Subject: Re: [PATCH v3] smb: client: reject a tree connect response whose byte count is too small
Date: Fri, 21 Aug 2026 15:17:26 -0300	[thread overview]
Message-ID: <6106bf0aa56b46d03696f37e30462f5b@manguebit.org> (raw)
In-Reply-To: <20260821-b4-disp-5297959d-v3-1-2f92f9abccee@proton.me>

Bryam Vargas via B4 Relay <devnull+hexlabsecurity.proton.me@kernel.org>
writes:

> From: Bryam Vargas <hexlabsecurity@proton.me>
>
> CIFSTCon() bounds its strnlen() over the byte area with the server's
> ByteCount minus two, which for ByteCount 0 or 1 goes negative as an int
> and converts to a huge size_t.  The later subtraction wraps the __u16
> bytes_left, and that is what bounds cifs_strndup_from_utf16(): a bound of
> up to 65535 against a ~16 KB cifs_req_poolp object runs off the end of the
> slab object, and the bytes reach userspace through tcon->nativeFileSystem
> in /proc/fs/cifs/DebugData.
>
> Reject a byte area too small for what the parser consumes.  Two bytes is
> the least it can consume, and no conformant response carries fewer.  The
> new trace point is the 129th smb_eio_trace entry, which __mode(byte)
> cannot represent, so the attribute goes with it.
> ...

Applied.

      parent reply	other threads:[~2026-08-21 18:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-21 12:36 [PATCH v3] smb: client: reject a tree connect response whose byte count is too small Bryam Vargas via B4 Relay
2026-08-21 15:03 ` Namjae Jeon
2026-08-21 18:17 ` Paulo Alcantara [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=6106bf0aa56b46d03696f37e30462f5b@manguebit.org \
    --to=pc@manguebit.org \
    --cc=bharathsm@microsoft.com \
    --cc=dhowells@redhat.com \
    --cc=hexlabsecurity@proton.me \
    --cc=jlayton@kernel.org \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=nathan@kernel.org \
    --cc=ronniesahlberg@gmail.com \
    --cc=samba-technical@lists.samba.org \
    --cc=sfrench@samba.org \
    --cc=sprasad@microsoft.com \
    --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