From owner-freebsd-bugs@freebsd.org Thu Aug 18 09:34:02 2016 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 674FEBBD25F for ; Thu, 18 Aug 2016 09:34:02 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DC0F1622 for ; Thu, 18 Aug 2016 09:34:02 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u7I9Y2gI095986 for ; Thu, 18 Aug 2016 09:34:02 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 211960] [PATCH] Page fault panic under settimeofday when tv_sec / SECDAY overflows signed 32 bit int Date: Thu, 18 Aug 2016 09:34:02 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: justin.mcomie@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status keywords bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Aug 2016 09:34:02 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D211960 Bug ID: 211960 Summary: [PATCH] Page fault panic under settimeofday when tv_sec / SECDAY overflows signed 32 bit int Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Keywords: patch Severity: Affects Many People Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: justin.mcomie@gmail.com Keywords: patch Created attachment 173816 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D173816&action= =3Dedit Patch with variable type changes. Repro on FreeBSD-12.0-CURRENT-amd64-20160809-r303880: Set the date to a value exceeding the number of seconds in a day multipli= ed by the capacity of a signed a 32 bit integer. Does not panic: date -f "%s" `bc -l -e '24*60*60 * 2^31 -1' -e quit` Panics: date -f "%s" `bc -l -e '24*60*60 * 2^31' -e quit` Stack backtrace: #0 0xffffffff80aa8cd0 at witness_debugger+0x70 #1 0xffffffff80aa9fb7 at witness_warn+0x3d7 #2 0xffffffff80ebc427 at trap_pfault+0x57 #3 0xffffffff80ebbab4 at trap+0x284 #4 0xffffffff80e9c941 at calltrap+0x8 #5 0xffffffff810030dc at atrtc_settime+0xc #6 0xffffffff80a934a8 at resettodr+0xd8 #7 0xffffffff80a5d5f4 at settime+0x154 #8 0xffffffff80a5daa0 at sys_settimeofday+0x90 #9 0xffffffff80ebcb7b at amd64_syscall+0x2db #10 0xffffffff80e9cc2b at Xfast_syscall+0xfb For a fix I change container variable types from int to time_t in clock_ts_to_ct. --=20 You are receiving this mail because: You are the assignee for the bug.=