New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NTP sync failure if offset with BIOS date is greater than a signed long #450
Comments
Just have to ask, on what hw is this, and how did the clock end up in that state? |
That's a Supermicro X11DPi-NT, they end up in 1921 if the CMOS battery is depleted or removed. |
PR #455 created, validated on an impacted system with a BIOS date set to 1921. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
On some servers with a BIOS date configured in 1921, the "ntp" iPXE command will succeed but the resulting system date is false. It looks this is due to an integer overflow starting here :
https://github.com/ipxe/ipxe/blob/master/src/net/udp/ntp.c#L116
When trying to boot an iPXE compiled with "DEBUG=ntp:1" on a server with a BIOS date in 1921, we get :
So, we end up with a negative offset instead of the expected value of 3153600000 seconds (100 years).
Feel free to ask if you need more details.
Yannick.
The text was updated successfully, but these errors were encountered: