]> git.ipfire.org Git - thirdparty/bind9.git/commit
Fix CID 510858: Null ptr derefs in check_keys
authorMatthijs Mekking <matthijs@isc.org>
Thu, 24 Oct 2024 12:03:58 +0000 (14:03 +0200)
committerMatthijs Mekking <matthijs@isc.org>
Fri, 25 Oct 2024 11:19:50 +0000 (11:19 +0000)
commite777efb5767a11b2fa3679b6ea4c6ec4290bd23e
tree3bc5df4c23ec568064f1a5abb5490555cf73cc8e
parent81667b13c730c4f7173a2223c5a91924ac5929af
Fix CID 510858: Null ptr derefs in check_keys

Coverity Scan reported a new issue for the ksr system test. There
is allegedly a null pointer dereference (FORWARD_NULL) in check_keys().

This popped up because previously we set 'retired' to 0 in case of
unlimited lifetime, but we changed it to None.

It is actually a false positive, because if lifetime is unlimited
there will be only one key in 'keys'.

However, the code would be better if we always initialized 'active'
and if it is not the first key and retired is set, set the successor
key's active time to the retire time of the predecessor key.
bin/tests/system/ksr/tests_ksr.py