Re: CIFS regression mounting vers=1.0 NTLMSSP when hostname is too long

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 17 May 2022, Paulo Alcantara wrote:

Could you please try below patch?

Let me know if I missed something else.  Thanks.

From bf63fb30ac90c06f45e40acbd3bbd2284d8ffffb Mon Sep 17 00:00:00 2001
From: Paulo Alcantara <pc@xxxxxx>
Date: Tue, 17 May 2022 17:23:23 -0300
Subject: [PATCH] cifs: fix ntlmssp on old servers

Some older servers seem to require the workstation name during ntlmssp
to be at most 15 chars (RFC1001 name length), so truncate it before
sending when using insecure dialects.

Link: https://lore.kernel.org/r/e6837098-15d9-acb6-7e34-1923cf8c6fe1@xxxxxxxxx
Reported-by: Byron Stanoszek <gandalf@xxxxxxxxx>
Fixes: 49bd49f983b5 ("cifs: send workstation name during ntlmssp session setup")
Signed-off-by: Paulo Alcantara (SUSE) <pc@xxxxxx>
---
fs/cifs/cifsglob.h   | 15 ++++++++++++++-
fs/cifs/connect.c    | 22 ++++------------------
fs/cifs/fs_context.c | 29 ++++-------------------------
fs/cifs/fs_context.h |  2 +-
fs/cifs/misc.c       |  1 -
fs/cifs/sess.c       |  6 +++---
6 files changed, 26 insertions(+), 49 deletions(-)

Hi Paulo,

I confirm that the patch worked for me (against Linux 5.16.13).

Regards,
 -Byron




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux