]> git.ipfire.org Git - thirdparty/samba.git/commit
s4 auth ntlm: Fix integer overflow in authsam_password_check_and_record
authorGary Lockyer <gary@catalyst.net.nz>
Tue, 12 Jan 2021 23:04:18 +0000 (12:04 +1300)
committerJeremy Allison <jra@samba.org>
Wed, 13 Jan 2021 23:52:38 +0000 (23:52 +0000)
commit4e624478dcd119f80f33b024b2f0b9a41688b425
tree177444dfa11f9262adcdae861411c3fdbb63baeb
parent181afa9f68ca7ed0a60ac69f5ad62ee70d89a599
s4 auth ntlm: Fix integer overflow in authsam_password_check_and_record

Fix a ubsan detected integer overflow.
../../source4/auth/ntlm/auth_sam.c:445:56: runtime error:
     signed integer overflow: 60 * 600000000
     cannot be represented in type 'int'

In practice this meant that the default for the smb.conf parameter
"old password allowed period" was approximately 16 seconds, rather than
the intended 60 minutes. Similarly the value used would be 22.5 times
less than the value specified in smd.conf.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jan 13 23:52:38 UTC 2021 on sn-devel-184
source4/auth/ntlm/auth_sam.c