Bugzilla – Bug 1191338
libc: y2038 bug in 32-bit
Last modified: 2023-03-09 16:04:43 UTC
Because the kernel has started moving to y2038 safe time values it is causing some regressions in tests e.g. https://openqa.opensuse.org/tests/1952348#step/cve-2021-26708/8 Because in 32-bit compat mode it is passing time values which are too small. In theory this is a kernel regression. However practically speaking it is more important to only use 64-bit time values in user land. Indeed the plan is to disable 32-bit time values in the 2030s (https://lwn.net/Articles/643407/). AFAICT the solution is to set __TIMESIZE == 64 when building glibc. https://www.gnu.org/software/libc/manual/html_node/64_002dbit-time-symbol-handling.html Then time values become 64-bit even in 32-bit mode. This change will require all 32bit packages which link against libc to be recompiled.
This is something for glibc then. Maybe it was already fixed?
The correct solution is to compile with _TIME_BITS=64. No need to break the ABI.