From owner-freebsd-bugs@freebsd.org Wed Sep 26 03:55:59 2018 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62EE8109ECE4 for ; Wed, 26 Sep 2018 03:55:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 020648D3F3 for ; Wed, 26 Sep 2018 03:55:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id B7253109ECDF; Wed, 26 Sep 2018 03:55:58 +0000 (UTC) Delivered-To: bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 918D4109ECDD for ; Wed, 26 Sep 2018 03:55:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3431D8D3DE for ; Wed, 26 Sep 2018 03:55:58 +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 mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 4501F168BA for ; Wed, 26 Sep 2018 03:55:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w8Q3tvWn029691 for ; Wed, 26 Sep 2018 03:55:57 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w8Q3tvNe029690 for bugs@FreeBSD.org; Wed, 26 Sep 2018 03:55:57 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 231080] callout struture corruption and panic Date: Wed, 26 Sep 2018 03:55:56 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: regression X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: markj@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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.27 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Sep 2018 03:55:59 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D231080 --- Comment #17 from Mark Johnston --- (In reply to Sean Bruno from comment #16) The new kernel dump is more useful. The callout looks like this: $2 =3D { c_links =3D { le =3D { le_next =3D 0x11777be9162acbc1, le_prev =3D 0xffffffff80c9a01a }, sle =3D { sle_next =3D 0x11777be9162acbc1 }, tqe =3D { tqe_next =3D 0x11777be9162acbc1, tqe_prev =3D 0xffffffff80c9a01a } }, c_time =3D 577765376, c_precision =3D 0, c_arg =3D 0x6, c_func =3D 0x158, c_lock =3D 0x0, c_flags =3D 0, c_iflags =3D 0, c_cpu =3D 0 } (kgdb) x/s 0xffffffff80c9a01a 0xffffffff80c9a01a: "dr->dt.di.dr_mtx" So the second long word is the beginning of the dr_mtx field of a dbuf_dirty_record_t. (The 0x6 indicates that the lock is already destroyed= .) It thus looks like the structure containing the callout was freed and reused for a dbuf_dirty_record_t. These records are allocated using malloc= (9) and would come from the 512 byte zone (the mutex is at byte offset 192), so we're looking for a structure between 256 and 512 bytes in size containing a struct callout at byte offset 184, assuming that nothing called uma_recla= im() before the dbuf_dirty_record_t was allocated. Since there's been very litt= le page daemon activity on this system, I think that's a safe assumption for n= ow. Using ctfdump -t on the kernel and modules, I find two structures with these properties: struct ata_request and struct lle_entry. The latter seems to b= e a more likely candidate for use-after-free. --=20 You are receiving this mail because: You are the assignee for the bug.=