Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Paulo Alcantara <pc@manguebit.com>
To: "Pali Rohár" <pali@kernel.org>
Cc: Steve French <sfrench@samba.org>,
	linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/5] cifs: Fix validation of SMB2_OP_QUERY_WSL_EA response size
Date: Sun, 08 Jun 2025 20:10:24 -0300	[thread overview]
Message-ID: <17c70afea9476e5a2ebb0ed37ea780ca@manguebit.com> (raw)
In-Reply-To: <20250608221536.fdwxexewsntxs3em@pali>

Pali Rohár <pali@kernel.org> writes:

> On Sunday 08 June 2025 18:49:43 Paulo Alcantara wrote:
>> Pali Rohár <pali@kernel.org> writes:
>> 
>> If we're querying all those EAs and the file has only $LXMOD, wouldn't
>> the server return empty EAs except for $LXMOD?
>
> We are using FILE_FULL_EA_INFORMATION for querying EAs, which means that
> always all stored EAs are returned. It is not 4 calls (one by one), but
> rather one call to return everything at once.

Yes.

> Windows server in this case returns just one EA in its response: $LXMOD EA.
> And SMB2_WSL_MIN_QUERY_EA_RESP_SIZE specifies that at least 3 EAs must
> be returned, otherwise check_wsl_eas() throws error and do not try to
> parse response.

Can you share a trace of the server returning only a single EA in the
response when we query $LXUID, $LXGID, $LXMOD and $LXDEV?

What I mean is that we query all those EAs when we find reparse points
on non-POSIX mounts, and if the file doesn't have them, the server still
returns the EAs but with a zero smb2_file_full_ea_info::ea_value_len.
check_wsl_eas() skips the EA when is @vlen zero.

  reply	other threads:[~2025-06-08 23:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-08 17:01 [PATCH 0/5] cifs: Fix validation of WSL-style special files Pali Rohár
2025-06-08 17:01 ` [PATCH 1/5] cifs: Remove duplicate fattr->cf_dtype assignment from wsl_to_fattr() function Pali Rohár
2025-06-08 17:01 ` [PATCH 2/5] cifs: Fix validation of EAs for WSL reparse points Pali Rohár
2025-06-08 17:01 ` [PATCH 3/5] cifs: Fix validation of SMB2_OP_QUERY_WSL_EA response size Pali Rohár
2025-06-08 21:49   ` Paulo Alcantara
2025-06-08 22:15     ` Pali Rohár
2025-06-08 23:10       ` Paulo Alcantara [this message]
2025-06-09 22:49         ` Pali Rohár
2025-06-08 17:01 ` [PATCH 4/5] cifs: Query EA $LXMOD in cifs_query_path_info() for WSL reparse points Pali Rohár
2025-06-08 17:01 ` [PATCH 5/5] cifs: Validate presence of EA $LXMOD " Pali Rohár

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=17c70afea9476e5a2ebb0ed37ea780ca@manguebit.com \
    --to=pc@manguebit.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pali@kernel.org \
    --cc=sfrench@samba.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