Skip to content

cifs: Fixes for SMB1 non-UNICODE 8-bit mode

Pali Rohár linux-cifs lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5cifs: Add new mount option -o nounicode to disable SMB1 UNICODE modefs/smb/client/cifsfs.c fs/smb/client/cifsglob.h fs/smb/client/cifssmb.c +5 more+54 -42 replies
2/5cifs: Fix encoding of SMB1 Session Setup Kerberos Request in non-UNICODE modefs/smb/client/sess.c+40 -200 replies
3/5cifs: Add support for SMB1 Session Setup NTLMSSP Request in non-UNICODE modefs/smb/client/sess.c+10 -100 replies
4/5cifs: Fix parsing reparse point with native symlink in SMB1 non-UNICODE sessionfs/smb/client/smb1ops.c+1 -20 replies
5/5cifs: Remove unicode parameter from parse_reparse_point() functionfs/smb/client/cifsproto.h fs/smb/client/reparse.c fs/smb/client/smb1ops.c +2 more+14 -180 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] cifs: Fixes for SMB1 non-UNICODE 8-bit mode

SMB1 protocol supports non-UNICODE (8-bit OEM character set) and UNICODE (UTF-16) modes. Linux SMB1 client implements both of them but there are few bugs in processing non-UNICODE mode.

This patch series add a new mount option -o nounicode to disable UNICODE mode and force usage of non-UNICODE (8-bit OEM character set) mode. This allows to test non-UNICODE code path against modern/recent SMB servers which implements and prefer UNICODE mode.

And this patch series fixes SMB1 session setup and reading symlinks when UNICODE mode is not active.

Tested against Windows Server 2022 SMB1 server and older Samba SMB1 server.

Pali Rohár (5):
cifs: Add new mount option -o nounicode to disable SMB1 UNICODE mode
cifs: Fix encoding of SMB1 Session Setup Kerberos Request in
non-UNICODE mode
cifs: Add support for SMB1 Session Setup NTLMSSP Request in
non-UNICODE mode
cifs: Fix parsing reparse point with native symlink in SMB1
non-UNICODE session
cifs: Remove unicode parameter from parse_reparse_point() function

 fs/smb/client/cifsfs.c     |  4 ++
 fs/smb/client/cifsglob.h   |  2 +
 fs/smb/client/cifsproto.h  |  2 +-
 fs/smb/client/cifssmb.c    |  5 ++-
 fs/smb/client/connect.c    | 32 +++++++++++++--
 fs/smb/client/fs_context.c | 11 ++++++
 fs/smb/client/fs_context.h |  2 +
 fs/smb/client/reparse.c    | 25 ++++++------
 fs/smb/client/sess.c       | 81 ++++++++++++++++++++++++--------------
 fs/smb/client/smb1ops.c    |  4 +-
 fs/smb/client/smb2file.c   |  1 -
 fs/smb/client/smb2proto.h  |  2 +-
 12 files changed, 118 insertions(+), 53 deletions(-)
Signature · 1 line
2.20.1