mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] ksmbd: fix three named stream bugs
@ 2026-10-08 15:25 DaeMyung Kang
  2026-10-08 15:25 ` [PATCH 1/3] ksmbd: return end of file for reads past a named stream's data DaeMyung Kang
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: DaeMyung Kang @ 2026-10-08 15:25 UTC (permalink / raw)
  To: Namjae Jeon
  Cc: Sergey Senozhatsky, Tom Talpey, ChenXiaoSong, linux-cifs,
	linux-kernel, DaeMyung Kang

Hi Namjae,

This series fixes three independent named stream bugs:

  1. A read at or beyond the end of a non-empty stream returns
     STATUS_INVALID_PARAMETER instead of STATUS_END_OF_FILE.
  2. Opening an existing stream with different letter case keeps the
     client's spelling in the handle. Later writes and removal can
     target a different xattr from the one that was opened.
  3. A write-only FILE_OPEN_IF on an existing stream can replace its
     value with an empty xattr when the value-length lookup fails with
     -EACCES.

The series applies to ksmbd-for-next at 5d2b1ab54e9a ("ksmbd: fix
named stream write and EOF handling"). Each fix is in a separate
patch, with its own Fixes tag and stable Cc.

I built the resulting kernel with CONFIG_SMB_SERVER=y and tested it
through SMB2.1 in a QEMU guest. Reads at and past stream EOF returned
STATUS_END_OF_FILE. A stream created as Foo was read, modified and
removed through foo, with one named stream in the listing. On a 0222
file, a write-only user opening an existing stream with FILE_OPEN_IF
received STATUS_ACCESS_DENIED and the original value remained intact;
without patch 3, the same sequence emptied the stream. The same user
could still create a new stream.

Patch 2 has a minor textual conflict in linux-next with the VFS tree's
const mnt_idmap conversion. The resolution keeps both the const
qualifier and the new actual_name argument.

Concurrent creation of case-variant stream names remains a separate
issue.

DaeMyung Kang (3):
  ksmbd: return end of file for reads past a named stream's data
  ksmbd: use the existing xattr name for a named stream
  ksmbd: preserve unreadable named streams on open

 fs/smb/server/smb2pdu.c | 10 ++++++----
 fs/smb/server/vfs.c     | 17 +++++++++++++----
 fs/smb/server/vfs.h     |  2 +-
 3 files changed, 20 insertions(+), 9 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-09  2:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-08 15:25 [PATCH 0/3] ksmbd: fix three named stream bugs DaeMyung Kang
2026-10-08 15:25 ` [PATCH 1/3] ksmbd: return end of file for reads past a named stream's data DaeMyung Kang
2026-10-08 15:25 ` [PATCH 2/3] ksmbd: use the existing xattr name for a named stream DaeMyung Kang
2026-10-08 15:25 ` [PATCH 3/3] ksmbd: preserve unreadable named streams on open DaeMyung Kang
2026-10-09  2:24 ` [PATCH 0/3] ksmbd: fix three named stream bugs Namjae Jeon

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®