]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: acme: possible overflow on scheduling computation
authorWilliam Lallemand <wlallemand@haproxy.com>
Thu, 25 Sep 2025 12:39:31 +0000 (14:39 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Thu, 25 Sep 2025 13:12:03 +0000 (15:12 +0200)
commit68770479ea4dee323f5bb56e995282f7c2100d4f
tree606e90695acacdd3566e0f30385ac973b6f104d3
parent3be8b06a60a37756a2c596f36727268cbfc4edf9
BUG/MINOR: acme: possible overflow on scheduling computation

acme_schedule_date() computes the schedule date using notAfter and
notBefore from the certificate. However notBefore could be greater than
notAfter and could result in an overflow.

This is unlikely to happen and would mean an incorrect certificate.

This patch fixes the issue by checking that notAfter > notBefore.

It also replace the int type by a time_t to avoid overflow on 64bits
architecture which is also unlikely to happen with certificates.

Fix issue #3136.

Need to be backported to 3.2.
src/acme.c