openssh-portable icon indicating copy to clipboard operation
openssh-portable copied to clipboard

Fix for Y2038 gettimeofday for Win32 builds

Open LainOTN2 opened this issue 1 year ago • 0 comments

PR Summary This is the second part of the fix for Y2038 issues, first part is on LibreSSL https://github.com/PowerShell/LibreSSL/pull/30 , we need to override the definition of timeval from winsock2.h.

PR Context OpenSSH uses gettimeofday from LibreSSL, OpenSSH and LibreSSL has been using the definition of winsock2.h https://learn.microsoft.com/en-us/windows/win32/api/winsock2/ns-winsock2-timeval that is signed integer, this made LibreSSL and OpenSSH prone to the Y2038 problem. As we modify the declaration of gettimeofday on LibreSSL we need to override the declaration of timeval in OpenSSH also to match the LibreSSL signature. Note that if we made this change the version of LibreSSL with the fix has to be released at the same time or signatures will not match.

LainOTN2 avatar Aug 06 '24 09:08 LainOTN2