From nobody Tue Jan 21 09:47:40 2025 X-Original-To: net@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 4Ycj714xpPz5kqXp for ; Tue, 21 Jan 2025 09:47: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 4Ycj714GVPz3Qvw for ; Tue, 21 Jan 2025 09:47:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737452861; 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=pMAm63Y4w9s4Go1m0lsY8PISZQYk8hBXqJGYlOuDEE8=; b=AmVNK3TvLiHjw5q0B6saAgdfXbP6uv4yH6DHSBTRlsw55TuIO6hTMc0EEnldYI/AYIBMq8 SDdwqljjFYbRwZTYM/ou7tPcfM+8GtdCFD/MxSvXJE8l5A2176vT/ERElqQrrMjoi3yfyn PHqLwK9FWs8PGMUxc8mrhci6OrmauuZKTFqg8oL1XIXXiJ4kKjEcL6KTTGL1dUZ468FhU9 BTacSCKKMjGoeKN1VWAsr8lULmieGBwEeIjVejNASpwkVAYKqpX4RlchcUqszBTDyxKJ9J XRkub5OScczRN7MhZRfOE3BVYtHtsAY+bwuY8B1xxiI5zRpi+GeEQHQ9k8VFhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737452861; 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=pMAm63Y4w9s4Go1m0lsY8PISZQYk8hBXqJGYlOuDEE8=; b=W+KA3VV/1MhqYQbkM2+weoaJoQF/KRjAk4sE+cM2BLHXd4AAdE4w7aeczdiT7u+ayplK32 vMMy6XGuNG1iHFE9hBWs0g1k4H1820nSxr0B9rpNSRluYZBEsFqSI1f/EzhRsgTR6gUT85 2gTnCayQ4nR56ldjzA3QRpb2osQE4Mx85qcA0gEi508Pbp8z6RrUr84oeLj3GLuMtpjBIE aefDvqzZnORKS61sST5IMWZfk4wYxwZYfTM1dGicbYHiH8zdQVEYDc+ZQNhUKy+m9UBhwG 9o66ufgxwfR4stGA36+qcsPHmjmdOqo18Fh1gC7DzlwKGV7XA4GwSHbHSB92ng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737452861; a=rsa-sha256; cv=none; b=aRrxbO+sfyi3Z0zfAKA/xQlBhNtmR7QsmlD+9TcRnx3x7m1Zo6xLrdRlmpmUV3A8ov1BKm PUcgqCYn9J7AuiEeTQy/pcuphWbhCmNX3kASXh4bMYTxsD4BNKvnoTgTy+enjnl8QCDakd 7PJGeLjfc7SUQI3+IvVJKx7P6e0mGligCt9XDpE7/qWFlU4hYArOnWjmmS8kiroidsVxO5 DjhOO2RjlAnD1bXHOaep43ts55iEtvKWnEC7BYosRCfGTRqGu66BMZ5rvDNy3q+jNo2u/6 yxOU5O4D/3LJzOWVTv3cJMvtxblMFUQhEzaw5WIay1tt+bZEofTfksCx8I1sGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4Ycj713p2Zz11Yl for ; Tue, 21 Jan 2025 09:47: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 50L9lf9O074793 for ; Tue, 21 Jan 2025 09:47:41 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 50L9lful074792 for net@FreeBSD.org; Tue, 21 Jan 2025 09:47: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: net@FreeBSD.org Subject: [Bug 284073] bnxt: kernel panic on 14.2-RELEASE Date: Tue, 21 Jan 2025 09:47:40 +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: 14.2-RELEASE X-Bugzilla-Keywords: crash X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: zlei@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D284073 --- Comment #15 from Zhenlei Huang --- Update: After carefully reading the disassembled code, I can confirm the fa= ult address is RIP (0xffffffff80b4dee7). For `sysctl_handle_string()`, `req` is the last arg which is passed via register %rcx. ``` ffffffff80b4de2e: 48 89 cb movq %rcx, %rbx ``` It was saved to callee-saved register %rbx, and the following flow does not touch it. It was `0000000500000005` when passed in. Then indirect memory ac= cess ``` ffffffff80b4dee7: 4c 8b 63 10 movq 0x10(%rbx), %r12 ``` will panic. Part of disassembled code of if_bnxt.ko, ``` $ objdump --disassemble-symbols=3Dbnxt_dcb_list_app -r /boot/kernel/if_bnxt= .ko ... 1a5cc: 53 pushq %rbx 1a5cd: 48 81 ec 28 02 00 00 subq $0x228, %rsp # i= mm =3D 0x228, reserve app[128] and other local vars.=20 1a5d4: 48 89 cb movq %rcx, %rbx # save req ... 1a622: 48 89 5d c8 movq %rbx, -0x38(%rbp) ... 1a6f0: ba 00 10 00 00 movl $0x1000, %edx # i= mm =3D 0x1000 1a6f5: 4c 89 f7 movq %r14, %rdi 1a6f8: 4c 89 fe movq %r15, %rsi 1a6fb: 48 8b 4d c8 movq -0x38(%rbp), %rcx # previo= usly saved req 1a6ff: e8 00 00 00 00 callq 0x1a704 000000000001a700: R_X86_64_PLT32=20=20=20=20=20=20 sysctl_handle_string-0x4 ``` If `bnxt_dcb_ieee_listapp()` OOB write the on stack variable app[128], then= it make sense that we get `%rbx =3D=3D 0000000500000005`. We can add assertin= g for that. --=20 You are receiving this mail because: You are the assignee for the bug.=