[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <trinity-3d43505a-735f-402f-8b14-90a32b289a0c-1652773898430@3c-app-mailcom-bs07>
Date: Tue, 17 May 2022 09:51:38 +0200
From: Arnaud Panaïotis <arnaud.panaiotis@....fr>
To: linux-kernel@...r.kernel.org
Subject: PROBLEM: with daemon.c after y2038 on 32-bits Kernel
Hello,
I'm working for a client to generate embedded 32-bits Linux Kernel working after y2038 issue.
I generated a 5.15 Kernel thought Buildroot with Coreutils 9.0, GCC 11.2.0, Binutils 2.37, Glibc 2.34-9 and CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64.
I encounter an issue while working with OpenSSH (I initially contacted them before).
After 2038, /usr/sbin/sshd does not create an error but it child does generate this one:
daemon() failed: Value too large for defined data type
This happend here in sshd.c:
2019 /*
2020 * If not in debugging mode, not started from inetd and not already
2021 * daemonized (eg re-exec via SIGHUP), disconnect from the controlling
2022 * terminal, and fork. The original process exits.
2023 */
2024 already_daemon = daemonized();
2025 if (!(debug_flag || inetd_flag || no_daemon_flag || already_daemon)) {
2026
2027 if (daemon(0, 0) == -1)
2028 fatal("daemon() failed: %.200s", strerror(errno));
To reproduce:
# date -s "2040-05-12"
# hwclock --systohc
# reboot
# /usr/sbin/sshd
Note this error occurs only after the reboot, and setting a date before 2038 also require a reboot to remove the error.
strace and gdb trace linked.
Let me know if you need additional information.
Best regards,
PS: I had a similar issue with binutils cp
Discussion : debbugs.gnu.org/cgi/bugreport.cgi?bug=55023
Fix : sourceware.org/bugzilla/show_bug.cgi?id=29097
--
Arnaud PANAÏOTIS | Lead Developer Freelance
+33 6 34 82 12 62 | arnaud.panaiotis@....fr
18 place Jean Moulin - 38000 Grenoble
APsudo - www.panaiotis.fr
View attachment "sshd_gdb.txt" of type "text/plain" (12728 bytes)
Download attachment "sshd_strace.log" of type "application/octet-stream" (35596 bytes)
Powered by blists - more mailing lists