3
4
Fork
You've already forked validns
5

fix: parse RRSIG timestamps in UTC and accept dates past 2038年01月19日 #116

Merged
jelu merged 1 commit from tobez/validns:fix-y2038-rrsig-timestamp into main 2026年05月12日 10:37:37 +02:00
Collaborator
Copy link

SvenVD-be reported that validns rejects any RRSIG with an inception or expiration timestamp after 2038年01月19日 03:14:07 UTC with "signature expiration is not valid". The cause was a hard year > 2037 cap in the YYYYMMDDHHMMSS parser. The same parser also used mktime(), which interprets the broken-down time as local time, but RFC 4034 §3.1.5 specifies the field as a 32-bit unsigned count of UTC seconds since 1970.

extract_timestamp() now computes the epoch arithmetically in UTC and accepts the full uint32 range (through 2106年02月07日 06:28:15 UTC). The result is independent of the host time zone. Two signed-zone fixtures under t/issues/89-year-2038-timestamp/ — one window crossing the boundary, one fully past it — guard against regression.

Fixes #89

SvenVD-be reported that validns rejects any RRSIG with an inception or expiration timestamp after 2038年01月19日 03:14:07 UTC with "signature expiration is not valid". The cause was a hard `year > 2037` cap in the YYYYMMDDHHMMSS parser. The same parser also used `mktime()`, which interprets the broken-down time as local time, but RFC 4034 §3.1.5 specifies the field as a 32-bit unsigned count of UTC seconds since 1970. `extract_timestamp()` now computes the epoch arithmetically in UTC and accepts the full uint32 range (through 2106年02月07日 06:28:15 UTC). The result is independent of the host time zone. Two signed-zone fixtures under `t/issues/89-year-2038-timestamp/` — one window crossing the boundary, one fully past it — guard against regression. Fixes #89
fix: parse RRSIG timestamps in UTC and accept dates past 2038年01月19日
All checks were successful
builds.sr.ht/freebsd Job completed
builds.sr.ht/openbsd Job completed
test / debian (pull_request) Successful in 41s
test / ubuntu (pull_request) Successful in 43s
test / centos (pull_request) Successful in 57s
test / scan-build (pull_request) Successful in 1m7s
e2f417ca53
Owner
Copy link

#build

#build
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DNS-OARC/validns!116
Reference in a new issue
DNS-OARC/validns
No description provided.
Delete branch "tobez/validns:fix-y2038-rrsig-timestamp"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?