Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6052A351C36 for ; Fri, 3 Apr 2026 15:27:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775230042; cv=none; b=JrG+Q+sP2Tv19QFO53aLwrh3aVOE0e397O0rpWnFsGuwkDI0bVJWPgEIzNbUwHXu1wEeVGIJZSEPOQDNCTF5NM2MlDuZZ1h4gcT35UsyjWDrxmCFbhVhXpuQsfUcNq8MkInU0bdwvQpSTSK8jYscThNskGKcRn2AEPAAJG0on30= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775230042; c=relaxed/simple; bh=IV22vczMPqM6abHXL4o9rUgaXcTUQx7IdJxlpnFHpfs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=tknrPM4X+9357k1DfxSpN5WVdzcJRfU4nFj5dBMZA656XgjZzavISWQw9ujm2kkFVP5KqqfxPkb4QJ6xP3nqNBX7Q2XgoIMzjB3xGZiyXu7/4kZ9FHL1chkmpeobghqrsnl/FjTbmmzcfkOnNUiHOnCd0o8Nf0bHT1aiLb08nlo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=URDtcB1X; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="URDtcB1X" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D721AC4CEF7; Fri, 3 Apr 2026 15:27:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1775230042; bh=IV22vczMPqM6abHXL4o9rUgaXcTUQx7IdJxlpnFHpfs=; h=From:To:Cc:Subject:Date:Reply-To:From; b=URDtcB1XJz+qelW1F5GiwBi0fzVjBB/FTzRwR7PTaoadGTlNu904mWK8XTQLjVQZc TFLJgtXXIj1CQrO3Ag1iCFoB+AyRoqQ9PhFKxWoSJ8CWK9m9tG6dDzYxXRVzBvYscB Utt/+1l7BQmXyBp0Kzc+faUmo4CRKaMh7J27rcxc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-31403: NFSD: Hold net reference for the lifetime of /proc/fs/nfs/exports fd Date: Fri, 3 Apr 2026 17:19:11 +0200 Message-ID: <2026040328-CVE-2026-31403-5446@gregkh> X-Mailer: git-send-email 2.53.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3636; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=5Fcck/QeHQPxKFSiwAXys9Lk4bpsFq8dwue3iJ6pq2c=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnnb7mEFltf7Nz2quWc/lFe/eKMidnd2ZwN6e4XRIz2P kniP7qmI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACYyLYNhvovkzUZudlVWfbaD N/Rk5krtj1dexDDf7crrG5mzkk5fYEjLjQnc9fuAfMs9AA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: NFSD: Hold net reference for the lifetime of /proc/fs/nfs/exports fd The /proc/fs/nfs/exports proc entry is created at module init and persists for the module's lifetime. exports_proc_open() captures the caller's current network namespace and stores its svc_export_cache in seq->private, but takes no reference on the namespace. If the namespace is subsequently torn down (e.g. container destruction after the opener does setns() to a different namespace), nfsd_net_exit() calls nfsd_export_shutdown() which frees the cache. Subsequent reads on the still-open fd dereference the freed cache_detail, walking a freed hash table. Hold a reference on the struct net for the lifetime of the open file descriptor. This prevents nfsd_net_exit() from running -- and thus prevents nfsd_export_shutdown() from freeing the cache -- while any exports fd is open. cache_detail already stores its net pointer (cd->net, set by cache_create_net()), so exports_release() can retrieve it without additional per-file storage. The Linux kernel CVE team has assigned CVE-2026-31403 to this issue. Affected and fixed versions =========================== Issue introduced in 3.9 with commit 96d851c4d28de8cc83fe2bd5c6bc2eb8f253a6c5 and fixed in 6.1.167 with commit c7f406fb341d6747634b8b1fa5461656e5e56076 Issue introduced in 3.9 with commit 96d851c4d28de8cc83fe2bd5c6bc2eb8f253a6c5 and fixed in 6.6.130 with commit d1a19217995df9c7e4118f5a2820c5032fef2945 Issue introduced in 3.9 with commit 96d851c4d28de8cc83fe2bd5c6bc2eb8f253a6c5 and fixed in 6.12.78 with commit e3d77f935639e6ae4b381c80464c31df998d61f4 Issue introduced in 3.9 with commit 96d851c4d28de8cc83fe2bd5c6bc2eb8f253a6c5 and fixed in 6.18.20 with commit db4a9f99b12a7ee1c19d86c83a3b752c7effa6c6 Issue introduced in 3.9 with commit 96d851c4d28de8cc83fe2bd5c6bc2eb8f253a6c5 and fixed in 6.19.10 with commit 6a8d70e2ad6aad2c345a5048edcb8168036f97d6 Issue introduced in 3.9 with commit 96d851c4d28de8cc83fe2bd5c6bc2eb8f253a6c5 and fixed in 7.0-rc5 with commit e7fcf179b82d3a3730fd8615da01b087cc654d0b Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-31403 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: fs/nfsd/nfsctl.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/c7f406fb341d6747634b8b1fa5461656e5e56076 https://git.kernel.org/stable/c/d1a19217995df9c7e4118f5a2820c5032fef2945 https://git.kernel.org/stable/c/e3d77f935639e6ae4b381c80464c31df998d61f4 https://git.kernel.org/stable/c/db4a9f99b12a7ee1c19d86c83a3b752c7effa6c6 https://git.kernel.org/stable/c/6a8d70e2ad6aad2c345a5048edcb8168036f97d6 https://git.kernel.org/stable/c/e7fcf179b82d3a3730fd8615da01b087cc654d0b