CVE-2020-1472(ZeroLogon): libcli/auth: reject weak client challenges in netlogon_cred...
authorStefan Metzmacher <metze@samba.org>
Wed, 16 Sep 2020 14:17:29 +0000 (16:17 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 18 Sep 2020 12:48:38 +0000 (12:48 +0000)
commitd3123858fb59046e826cf2c7ec2a3839e6508624
treed5c3ba41c1b0636677f429c399827ff87e41bdb7
parent53528c71ffdb3377c4e73ac596c8507bc3898e83
CVE-2020-1472(ZeroLogon): libcli/auth: reject weak client challenges in netlogon_creds_server_init()

This implements the note from MS-NRPC 3.1.4.1 Session-Key Negotiation:

 7. If none of the first 5 bytes of the client challenge is unique, the
    server MUST fail session-key negotiation without further processing of
    the following steps.

It lets ./zerologon_tester.py from
https://github.com/SecuraBV/CVE-2020-1472.git
report: "Attack failed. Target is probably patched."

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14497

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
libcli/auth/credentials.c
libcli/auth/wscript_build