Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Paulo Alcantara <pc@manguebit.com>
To: Jethro Donaldson <devel@jro.nz>, linux-cifs@vger.kernel.org
Cc: sfrench@samba.org
Subject: Re: [PATCH] smb: client: fix zero length for mkdir POSIX create context
Date: Tue, 29 Apr 2025 16:41:29 -0300	[thread overview]
Message-ID: <bb39b314813864e05da846cbfbdfc3fc@manguebit.com> (raw)
In-Reply-To: <20250430005915.5e1f3c82@deetop.local.jro.nz>

Jethro Donaldson <devel@jro.nz> writes:

> smb: client: fix zero length for mkdir POSIX create context
>
> SMB create requests issued via smb311_posix_mkdir() have an incorrect
> length of zero bytes for the POSIX create context data. A ksmbd server
> rejects such requests and logs "cli req too short" causing mkdir to fail
> with "invalid argument" on the client side.
>
> Inspection of packets sent by cifs.ko using wireshark show valid data for
> the SMB2_POSIX_CREATE_CONTEXT is appended with the correct offset, but
> with an incorrect length of zero bytes. Fails with ksmbd+cifs.ko only as
> Windows server/client does not use POSIX extensions.
>
> Fix smb311_posix_mkdir() to set req->CreateContextsLength as part of
> appending the POSIX creation context to the request.
>
> Signed-off-by: Jethro Donaldson <devel@jro.nz>
> ---

Acked-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>

  parent reply	other threads:[~2025-04-29 19:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-29 12:59 [PATCH] smb: client: fix zero length for mkdir POSIX create context Jethro Donaldson
2025-04-29 16:20 ` Steve French
2025-05-04  8:08   ` Jethro Donaldson
2025-04-29 19:41 ` Paulo Alcantara [this message]
2025-04-30  5:49 ` Namjae Jeon

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=bb39b314813864e05da846cbfbdfc3fc@manguebit.com \
    --to=pc@manguebit.com \
    --cc=devel@jro.nz \
    --cc=linux-cifs@vger.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