[Bug 3787] Files with a creation date later than January 19, 2038 are not displayed in 32-bit sftp

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Thu Feb 13 15:25:31 AEDT 2025


https://bugzilla.mindrot.org/show_bug.cgi?id=3787

Darren Tucker <dtucker at dtucker.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dtucker at dtucker.net

--- Comment #1 from Darren Tucker <dtucker at dtucker.net> ---
(In reply to Evgeniy from comment #0)
> If you install the 32-bit openssh on Linux amd64, files with a
> creation date later than January 19, 2038 are not displayed in 32bit
> sftp client.

So don't do that?

The sftp protocol specifies those timestamps as unsigned 32 bit, but
the client processes them using all the platform's standard
time-handling functions such as strftime(), and those use the native
time_t which on your 32bit Linux seems to be the default of a signed
32bit.

Quoting the Linux time(3) man page:

   Applications  intended  to  run  after 2038 should use ABIs with
   time_t wider than 32 bits; see time_t(3type).

It looks like you can compile the libraries with _TIME_BITS to embiggen
its time_t, but that's something that would need to be done by the
platform in question.

-- 
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list