CVE-2018-16857 dsdb/util: Correctly treat lockOutObservationWindow as 64-bit int
authorTim Beale <timbeale@catalyst.net.nz>
Mon, 12 Nov 2018 23:24:16 +0000 (12:24 +1300)
committerKarolin Seeger <kseeger@samba.org>
Wed, 28 Nov 2018 07:22:25 +0000 (08:22 +0100)
commitc7b937c5aae40483f2f37727758ed50877f17a5b
tree37d4a19d98378e7fcd4995b99ce3f66fa57cab50
parent77de8278e4b467b66a477c09945a9bcc6b08b194
CVE-2018-16857 dsdb/util: Correctly treat lockOutObservationWindow as 64-bit int

Commit 442a38c918ae1666b35 refactored some code into a new
get_lockout_observation_window() function. However, in moving the code,
an ldb_msg_find_attr_as_int64() inadvertently got converted to a
ldb_msg_find_attr_as_int().

ldb_msg_find_attr_as_int() will only work for values up to -2147483648
(about 3.5 minutes in MS timestamp form). Unfortunately, the automated
tests used a low enough timeout that they still worked, however,
password lockout would not work with the Samba default settings.

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

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
selftest/knownfail.d/password_lockout
source4/dsdb/common/util.c