From nobody Tue Jan 30 20:30:23 2024 X-Original-To: riscv@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TPcHN0ZCJz59VlH for ; Tue, 30 Jan 2024 20:30:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TPcHM3T9lz4jvw for ; Tue, 30 Jan 2024 20:30:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706646623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Rbk9ae9LRcLJP6mCkLCqPCvf/BV7Pn3Vxp81vsccNBs=; b=RTXvJJhzjS5vteMgNA88twLCMy3uFJe0gwLGBwdwPdYuPcR/3Llm2GcnqWEzxMtoAbKhvX i0518GOrkjV2qjW/P7nQ4bELpGzIeDNINxCudfg6ID+Wnu8fSlcKvPCUBSnjbz0xOjdYMF LtV1QsYFi3r6I1qaitrBh3TZrqrSnEY2TZcvIbVoNUppQRccMEtrHfHKvWQ3p2nlLb8Kdx 0rx95bBZxiL7IYJA9/i39RGaF/+5oPOo7SinCrtWcF9loT0UjLaRKeIUxWs9ZDmAy0BdYM ze8oYHkA5N7ZFz5WSRRZJK3TfAUuUbNpqunQ1/D6uEEgwv1tb/kyYglrTpOU9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706646623; a=rsa-sha256; cv=none; b=H46XJJz0eXGWl4rnCYSfE4XaaD9d6jI6WBArqOexeLoLIt/QWjI0S0ll+7XX7VSbSnLRmo 4QxwGdLM9S16xCrolsKpMVOaOUrEoOLIDFJELERGVmTYuFsu9nEbaZUzvZEST/FkrEwsHK PCFzlSQ3YsnhVf7NnfRodLJ7gWdhqLasNIlx59IlWn7CXkUI2HMTWL94SgjNKRQWONjeXY bzLqvUXnHfWxP5ikryGuC8tABlDRPYxsslcRxeK6t4sDxnnWnw5zY6QuseWyo4cqLyKYUp 4cEFgRs36u0NvYu4lgXVKVoM6mFqwMQxyxvNlcRUZS/Tlr6Viv0HOT0H/RukUA== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TPcHM2XKjzqV0 for ; Tue, 30 Jan 2024 20:30:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 40UKUNgG085759 for ; Tue, 30 Jan 2024 20:30:23 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 40UKUNlm085758 for riscv@FreeBSD.org; Tue, 30 Jan 2024 20:30:23 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: riscv@FreeBSD.org Subject: [Bug 273438] PANIC: memory modified after free on relatively idle riscv -CURRENT Date: Tue, 30 Jan 2024 20:30:23 +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: crash X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: mhorne@freebsd.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: riscv@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status 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 List-Id: FreeBSD on the RISC-V instruction set architecture List-Archive: https://lists.freebsd.org/archives/freebsd-riscv List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-riscv@freebsd.org X-BeenThere: freebsd-riscv@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273438 Mitchell Horne changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |Open --- Comment #8 from Mitchell Horne --- (In reply to Mitchell Horne from comment #7) Okay I spoke too soon re: the offset; it is trivially calculated as 0x908 - 0x7f8 =3D 0x188 =3D 392. According to gdb, the struct dmu_buf_impl member a= t offset 392, for your revision, is db_user, an 8 byte pointer.=20 The expected contents of uninitialized memory is 0xdeadc0deadc0de, but your reports consistently show the affected address as 0x00000000de00c0de. So it= is only partially overwritten, and therefore not an abuse of the db_user field= in a dmu_buf_impl_t object. So, I'm thinking this allocation missed the zone's cache (empty), and the memory could have belonged to anything before that, meaning use-after-free could exist anywhere...=20 I'll have to see what other tips I can learn to help identify this. On other platforms we could use KASAN, but for riscv it is not implemented yet. --=20 You are receiving this mail because: You are the assignee for the bug.=