From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5E3ED38618F1; Mon, 29 Mar 2021 20:55:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5E3ED38618F1 From: "adrian.ratiu at collabora dot com" To: glibc-bugs@sourceware.org Subject: [Bug time/27662] adjtimex/clock_adjtime: y2038 regression causes segfault Date: Mon, 29 Mar 2021 20:55:44 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: time X-Bugzilla-Version: 2.32 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: adrian.ratiu at collabora dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2021 20:55:44 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27662 Adrian Ratiu changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|NOTABUG |--- Status|RESOLVED |UNCONFIRMED --- Comment #2 from Adrian Ratiu --- (In reply to Andreas Schwab from comment #1) > NULL is not a valid argument for adjtimex. Yes, but the call shouldn't segfault nevertheless and just return -1 and set errno to -EFAULT when the argument is NULL, right? This is definitely a regression (only happens on 32bit armv7 for me). Also I have a small error in my example code (I tested retcode for EFAULT), here is the fixed version: #include #include #include int main(void) { int ret; /* Test with nullptr buffer. Should fail with EFAULT. */ ret =3D adjtimex(NULL); if (ret =3D=3D -1 && errno =3D=3D EFAULT) return 0; return 1; } --=20 You are receiving this mail because: You are on the CC list for the bug.=