[Bug 267157] system reboots when date is set far in the future
Date: Mon, 17 Oct 2022 19:11:03 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267157 Bug ID: 267157 Summary: system reboots when date is set far in the future Product: Base System Version: 13.1-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Many People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: jschauma@netmeister.org As noted in this thread: https://lists.freebsd.org/archives/freebsd-hackers/2022-October/001550.html FreeBSD/amd64 13.1R on at least AWS instances ami-0cf377776fddcf8ba spontaneously reboot if the date is set to values larger than epoch 49282253052249598. (On 13.0R / ami-00e91cb82b335d15f, this cut-off date appears to be epoch 44093078356492799.) To reproduce: Boot an instance of the given AMI above and log in as ec2-user. $ su # date -f "%s" 49282253052249598 Fri Dec 31 23:59:58 UTC 1561694399 # date -f "%s" 49282253052249599 Fri Dec 31 23:59:59 UTC 1561694399 [ reboots ~three seconds later ] Rather than leading to a reboot, settimeofday(2) (I'm guessing) should return EINVAL. asomers@ noted that assertions in https://github.com/freebsd/freebsd-src/commit/90a79ac5765a09d48b085183503324584ef0f956 could be added. -- You are receiving this mail because: You are the assignee for the bug.