From nobody Fri Jun 26 01:31:09 2026 X-Original-To: dev-commits-src-all@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 4gmdRl1GVMz6jjGR for ; Fri, 26 Jun 2026 01:31:15 +0000 (UTC) (envelope-from git@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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gmdRk6Cn3z44Zx for ; Fri, 26 Jun 2026 01:31:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782437474; 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=VXPjqURtyRYishT0Bn5eMFzlB+g16KXJ6hxYFSxR9ww=; b=yNW+dh8/1x502HMnLHSgb6S/sv0V4FVgxBV8KI/zzJukclHNm4YY8xjnDhUdEvfjXvuUkY TWceZwToeAHTtbp/VvIWCHr0EWu5v6+NYW7PpV9qd4TpdYTVNtdxuSye2ngJz27w73GOvs mtO6LSYPceDfO7zbWcdYJQQ+F5jGIb950A/4bWDjtOumsDFt1ppJ1I6nS3xdkcTPw6HGN8 oGxljclj1khQPV2qsc7FlV5vHGkjNHYgsBoFhLmXfQrQ4zyiIcrPAiupPoKr3F43ayckXj hbPFC1Kf+O4C7n37iVFpRCL2rT6TjblRs9oWVTupamT95ARaQ9AZL6p5mkMirA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1782437474; a=rsa-sha256; cv=none; b=ShOr4aL2yISuuoT2IUd5rhaiiRIGAXQx13IlEV1Vlr+nJ0QpN3MlrQYWGwUVAj66A4hpm5 UmJjoWWGsVNrBeIb3fz2eOOgnstV7p0Iw+da4mrqVVR5gJxKA2VWCgJfgRCifOsDecg6jW mrbiL0motqX5tn2GDdmr7BYZU5AEzgb159vuiGmQtjNcIPp4GscLDJD7SnimrkPHdJXC2t 0nD4RWF23lVnasMq5DermIs4p5F8g7USIo7Th/35/kxLXzV05Gswb3kGxggmthH6fpZ0Ly pBw3Mb1cQqxyD2a5i7o9lr9m66PFaEBBA3v0v6g9n4h7+W5eRUy4TrvUCtrgfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782437474; 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=VXPjqURtyRYishT0Bn5eMFzlB+g16KXJ6hxYFSxR9ww=; b=SunbPA1snbk7q18lfnaPD+B3KSPFcQULiiSRKLQDKWyNwH8ks4lBWptQgPW2dG+kWqJJIv FmlceCR/P3dhMkS/e/KrwnRlF7LaejomP4TuQ1xvI5w9qPCDVKF/kJVgrFyB8FGoo/Kvf1 UbqweOSBWHcjsMlWWxHb5jLUqnY2q4wLdbW0gAiUtAqindpaOvBFzy3gRzeboh5SFurxLL WcUSt1GHza4/fQX/Emcz3LQclmivaMGd48squ1aDHmPLlFkO8j+NS/BNdPhvNzcpQ4XV13 D+uuCIbVtwP/+6x7TIrgs4fDgDyA4X97aQ0kQVLdgVpXlTrRYh7+13ewaYujdw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gmdRk4PBszy6 for ; Fri, 26 Jun 2026 01:31:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42dd1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 26 Jun 2026 01:31:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 84043284ad1f - stable/15 - nfs: Fix argument typo to avoid a crash List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 84043284ad1f6e7c0423555f28c9133efd37b6a8 Auto-Submitted: auto-generated Date: Fri, 26 Jun 2026 01:31:09 +0000 Message-Id: <6a3dd65d.42dd1.385e59a4@gitrepo.freebsd.org> The branch stable/15 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=84043284ad1f6e7c0423555f28c9133efd37b6a8 commit 84043284ad1f6e7c0423555f28c9133efd37b6a8 Author: Rick Macklem AuthorDate: 2026-05-25 19:22:32 +0000 Commit: Rick Macklem CommitDate: 2026-06-26 01:28:58 +0000 nfs: Fix argument typo to avoid a crash A typo resulted in the wrong argument for a bytewise comparison that could result in a crash if the incorrect argument was not a valid pointer. This patch fixes the argument. While investigating this, I noticed that the correct argument was not being filled in as required, so this patch fixes that, as well. Somehow, recovery from a NFSv4.1/4.2 server crash worked during testing, so this was not detected. The bug/patch only affects NFS client mounts using NFSv4.1/4.2. PR: 294925 (cherry picked from commit 4d80d4913e79c8b5918b1f04c1c7b38e6c76b9b4) --- sys/fs/nfs/nfs_commonkrpc.c | 5 +++-- sys/fs/nfs/nfs_commonsubs.c | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c index 9ea4e5f4c9df..2d4c41994c0e 100644 --- a/sys/fs/nfs/nfs_commonkrpc.c +++ b/sys/fs/nfs/nfs_commonkrpc.c @@ -1265,8 +1265,9 @@ tryagain: goto out; } sep = NFSMNT_MDSSESSION(nmp); - if (bcmp(sep->nfsess_sessionid, nd->nd_sequence, - NFSX_V4SESSIONID) == 0) { + if (bcmp(sep->nfsess_sessionid, + nd->nd_sessionid, NFSX_V4SESSIONID) == 0 && + sep->nfsess_defunct == 0) { printf("Initiate recovery. If server " "has not rebooted, " "check NFS clients for unique " diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index cc93c2270fa0..090bee203a6d 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -368,6 +368,7 @@ nfscl_reqstart(struct nfsrv_descript *nd, int procnum, struct nfsmount *nmp, * First, fill in some of the fields of nd. */ nd->nd_slotseq = NULL; + NFSBZERO(nd->nd_sessionid, NFSX_V4SESSIONID); if (vers == NFS_VER4) { nd->nd_flag = ND_NFSV4 | ND_NFSCL; if (minorvers == NFSV41_MINORVERSION) @@ -5350,6 +5351,7 @@ nfsv4_setsequence(struct nfsmount *nmp, struct nfsrv_descript *nd, NFSM_BUILD(tl, uint32_t *, NFSX_V4SESSIONID + 4 * NFSX_UNSIGNED); nd->nd_sequence = tl; bcopy(sessionid, tl, NFSX_V4SESSIONID); + bcopy(sessionid, nd->nd_sessionid, NFSX_V4SESSIONID); tl += NFSX_V4SESSIONID / NFSX_UNSIGNED; nd->nd_slotseq = tl; if (error == 0) { @@ -5596,6 +5598,7 @@ nfsrpc_destroysession(struct nfsmount *nmp, struct nfsclsession *tsep, 0, NULL); NFSM_BUILD(tl, uint32_t *, NFSX_V4SESSIONID); bcopy(tsep->nfsess_sessionid, tl, NFSX_V4SESSIONID); + bcopy(tsep->nfsess_sessionid, nd->nd_sessionid, NFSX_V4SESSIONID); nd->nd_flag |= ND_USEGSSNAME; error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, NULL, p, cred, NFS_PROG, NFS_VER4, NULL, 1, NULL, NULL);