From nobody Tue Dec 14 10:54:05 2021 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 CD1A818D946C for ; Tue, 14 Dec 2021 10:54:05 +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 4JCwH13zT1z3Jq1 for ; Tue, 14 Dec 2021 10:54:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 685BE26BF9 for ; Tue, 14 Dec 2021 10:54:05 +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 1BEAs5Ri006477 for ; Tue, 14 Dec 2021 10:54:05 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 1BEAs5OZ006476 for bugs@FreeBSD.org; Tue, 14 Dec 2021 10:54:05 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 260412] NFS v4 client crash if server sends a second CB_SEQUENCE with wild slotid Date: Tue, 14 Dec 2021 10:54:05 +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: rtm@lcs.mit.edu 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.mimetype 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639479245; 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=x644TFr/a67pMqB1NTGPvUGpr6j5nR80ET+5oVBm95k=; b=H7VULb/OeWMO499sdZ7tnSpOOOE99PGnM8r0aL8sRJapEWfJjzr37oQXrprWu2Rb9mQNaS 8rqQkE0Kec8uegxlaajn/2JAvMtkMXXl/nGsqciHdp9NPHfmoy08uYL7bKLoY9bey2psZl 6Vny9gK0ufeza4rRi2n2hjm/OkQBPDZWthva8EU4NCwsr2og9C8SFr5MX33RHMOky5Bdjr 08nq6QaXuc/D6eoj9ToqdgSUVY5vSBKtJ8nFJGEKF+H6ZkjV1bHlYIChAw2tROz8pvVnvN +yUcOYUduR8jpf76eNP4LvaZxEuIOFjwycxKPqoSyZfX/pUSTMw3+nKpaVGMQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639479245; a=rsa-sha256; cv=none; b=Qy5YnFZqYstXb3RBHoKLfeUWhXV2lfgXhUbOjpJOda9nPr7YLARmSDoD6LPAPbVxxUN/8v 3sRgT9jyofpf7WVMNJoRqwvOz/xlfWEulBYi8PO/ynmiKpDzYe84iESBTePbts0S/kxxY9 qEzoyra44wlxA6BjoFPrOyFNv5HGzl1B644sN6QhRv2pW0HbUo+eHHhDakBJCCH1PJh2a/ ql3BTyXA/3dR9Y4qDYxaZesc/AsBCe5wHk/xsCUHwoYH/ayY4EPfpcJ6JXRuC3ELd08wQf +aV6Qsj9IUhTJkCTwgGwbNQCECCeUsyMggGfhQjSfpIIFrd5UHjB6xAEM1xi7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D260412 Bug ID: 260412 Summary: NFS v4 client crash if server sends a second CB_SEQUENCE with wild slotid Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: rtm@lcs.mit.edu Attachment #230107 text/plain mime type: Created attachment 230107 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D230107&action= =3Dedit Crash an NFS v4 client with two CB_SEQUENCEs and a wild slotid If a callback message contains two CB_SEQUENCE operators, and the first one is valid, but the second contains a wild slotid, then at the end of nfscl_docb() gotseq_ok will be non-zero, and the wild slotid will be passed to nfsv4_seqsess_cacherep(). The latter indexes an array with slotid. I've attached a demo: # uname -a FreeBSD junk.doesnotexist.org 14.0-CURRENT FreeBSD 14.0-CURRENT #147 main-n250911-3ff4b4101008-dirty: Tue Dec 14 05:47:56 EST 2021=20=20=20=20 rtm@xxx:/usr/obj/usr/rtm/symbsd/src/riscv.riscv64/sys/RTM riscv # cc fnfs_11.c # ./a.out ... panic: Fatal page fault at 0xffffffc0002104d0: 0xffffffe001428c28 --- exception 13, tval =3D 0xffffffe001428c28 nfsv4_seqsess_cacherep() at nfsv4_seqsess_cacherep+0x18 nfscl_docb() at nfscl_docb+0x3aa nfscb_program() at nfscb_program+0xee svc_run_internal() at svc_run_internal+0x810 svc_run() at svc_run+0x1a2 nfscbd_nfsd() at nfscbd_nfsd+0xce nfssvc_nfscl() at nfssvc_nfscl+0x204 sys_nfssvc() at sys_nfssvc+0xd0 do_trap_user() at do_trap_user+0x220 cpu_exception_handler_user() at cpu_exception_handler_user+0x72 --=20 You are receiving this mail because: You are the assignee for the bug.=