Linux-CIFS Archive on lore.kernel.org
 help / color / Atom feed
From: Stefan Metzmacher <metze@samba.org>
To: "linux-cifs@vger.kernel.org" <linux-cifs@vger.kernel.org>
Cc: Samba Technical <samba-technical@lists.samba.org>
Subject: Linux Mint 4.15 Kernel and NTLMv2 account lockout with empty string password.
Date: Fri, 20 Mar 2020 11:19:36 +0100
Message-ID: <a3921636-89bb-e184-1dc5-fd8d224b55fe@samba.org> (raw)

[-- Attachment #1.1: Type: text/plain, Size: 1964 bytes --]

Hi,

I recently noticed the following problem with a 4.15 Kernel
on Linux Mint:

/etc/fstab has something like this:

> //172.31.9.132/share1           /media/cifs/share1      cifs vers=1.0,credentials=/media/cifs/cifsmount.creds.txt 0 1
> //172.31.9.132/share2           /media/cifs/share2      cifs vers=1.0,credentials=/media/cifs/cifsmount.creds.txt 0 1
> //172.31.9.132/share3           /media/cifs/share3      cifs vers=1.0,credentials=/media/cifs/cifsmount.creds.txt 0 1
> //172.31.9.132/share4           /media/cifs/share4      cifs vers=1.0,credentials=/media/cifs/cifsmount.creds.txt 0 1

172.31.9.132 is a Windows Server in a Domain with Samba AD-DCs.

The initial mounting works fine, but after some time Samba
logs WRONG_PASSWORD and finally ACCOUNT_LOCKED_OUT.

From various clients this happens about once per hour!

In order to debug this I extended wireshark.
wireshark was already able to decrypt NTLMSSP encryption
when an NTLMSSP password and/or a keytab is provided.
I extended that in order add some useful expert info
that shows which NTHASH was used for a given authentication.
That is also available with an Schannel encrypted Netr_LogonSamLogon*
call. This landed in wiresharks master branch a few days ago.

The customers capture didn't show that information,
which meant that the client used a wrong password
when it got LOGON_FAILURE from the Windows fileserver
(because that got WRONG_PASSWORD or ACCOUNT_LOCKED_OUT
from the AD-DC).

I cross checked that with smbclient and there wireshark
showed the correct password was used.

This is very strange and I had the idea to just check
if maybe an empty string password was used by the client.
So I created a keytab with the NTHASH of an empty string.
And wireshark showed that this NTHASH was actually used...

Has anybody seen this before? We'll retry this with a newer
kernel next week...

Otherwise any idea how to debug that?

metze


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

                 reply index

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=a3921636-89bb-e184-1dc5-fd8d224b55fe@samba.org \
    --to=metze@samba.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=samba-technical@lists.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

Linux-CIFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-cifs/0 linux-cifs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-cifs linux-cifs/ https://lore.kernel.org/linux-cifs \
		linux-cifs@vger.kernel.org
	public-inbox-index linux-cifs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-cifs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git