From nobody Tue Oct 22 12:30:41 2024 X-Original-To: bugs@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 4XXs355qgvz5PPfj for ; Tue, 22 Oct 2024 12:30:41 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XXs353hxqz4vk6 for ; Tue, 22 Oct 2024 12:30:41 +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=1729600241; 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; bh=Nk6zHRCEmap7w2LvVuhtDhq2DJciirk/qFZe1oKXVoc=; b=Oc834Q+09Ix7GguZNudlV7+J+IGnW9CqNY712VZMkvAZ+K30mZRd+c0O3mEJEN5e+yoTb6 2faXLF5RFylUrgSb8eWZLBEBJWJpHyOKbbmIbZ5JZSJtgBaJXV2PgC8eI0B48XnQ1S7bGx v04xXuoQpYhnFH8ScsxQMKZfqGsg+Bt/Yk5TCgl8Pze6zHX2p0R+QXlj5Y9qkWtFQqprqq aGGHteV0X/mUT95fB0t6CoyoGkij8IxjSpvniSMQlhOV252e6ORZimfO5pLrzRYC0JrH5D wiJWLS010WzRTk0tmrJGDmv7OCx72mnDo4O2BPH9u2D7aUyoXeVk8LcTgASbWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729600241; a=rsa-sha256; cv=none; b=VInrasApSr1oloc56Uo5WIn9TaFGUVoHHqr4GbQDQExp3Pno5cHLBrCR4D83wC2AdIwsVZ oG9zMo1vYSirMqCWdDmwodE+xgA7cnXzJKCHeJANJBqt+Iaghv8rtYyGX+hhxX5RIZVi6/ b0EHVuY1AB9l+QqMHh0xAV4Lc1gOhEA0NDSnzHRk5Q342KILVXMH81rOSg5tkwGjIRVryK trVkyaVHEwldtAokxULE8l9qoBjTHOOG1zbMFSpbhIubtqqckdcjBU/2+0m282wYRYnZXy nY2q43d0oE2hXm7hkJELI4AlIiJ5Om5MF0PF9fgO7qtSKgYGN8AMSaY+fX18Sw== 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 4XXs3539T3z1CvQ for ; Tue, 22 Oct 2024 12:30:41 +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 49MCUfb0018941 for ; Tue, 22 Oct 2024 12:30:41 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 49MCUfIn018940 for bugs@FreeBSD.org; Tue, 22 Oct 2024 12:30:41 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 282268] linker_load_module() panics with KASAN after post-panic reboot Date: Tue, 22 Oct 2024 12:30:41 +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: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: christos@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: bug_id short_desc product version rep_platform op_sys bug_status 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 List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D282268 Bug ID: 282268 Summary: linker_load_module() panics with KASAN after post-panic reboot Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: christos@freebsd.org Created attachment 254444 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D254444&action= =3Dedit linker_load_module() disassembly This is a relatively consistent bug, although it does not have a 100% reproduction rate. What I usually do is the following: 1. Boot into a KASAN kernel. 2. Panic the kernel somehow and reboot. 3. During the reboot, it is likely that linker_load_module() will panic when rc(8) is trying to load the modules. I have also attached the linker_load_module() disassembly. Sample panic message: Loading kernel modules: panic: ASan: Invalid access, 4-byte read at 0xfffffe0047935020, MallocRedZone(fb) cpuid =3D 1 time =3D 1729606284 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0xa5/frame 0xfffffe0046c3f= 070 kdb_backtrace() at kdb_backtrace+0xc6/frame 0xfffffe0046c3f1d0 vpanic() at vpanic+0x226/frame 0xfffffe0046c3f370 panic() at panic+0xb5/frame 0xfffffe0046c3f440 kasan_code_name() at kasan_code_name/frame 0xfffffe0046c3f510 linker_load_module() at linker_load_module+0xe03/frame 0xfffffe0046c3fbb0 kern_kldload() at kern_kldload+0x233/frame 0xfffffe0046c3fc70 sys_kldload() at sys_kldload+0xd2/frame 0xfffffe0046c3fd10 amd64_syscall() at amd64_syscall+0x39e/frame 0xfffffe0046c3ff30 fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe0046c3ff30 --- syscall (304, FreeBSD ELF64, kldload), rip =3D 0x311d0dce37da, rsp =3D 0x311d0c9d2428, rbp =3D 0x311d0c9d29a0 --- KDB: enter: panic [ thread pid 92 tid 100096 ] Stopped at kdb_enter+0x34: movq $0,0x1f09b11(%rip) db> --=20 You are receiving this mail because: You are the assignee for the bug.=