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 A2BD1217645 for ; Wed, 26 Feb 2025 02:00:26 +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=1740535226; cv=none; b=q4IOLN0nrQ4DiJ1DTFbBdbF8RUyhMfXCk+Z21vs62WCTZQbTxWo5oPL4urNGWWU66+9tYkr33g6OnresGNIzPcMqlw9AL21EjH+KoJVpVc8nAuWfowr1ir85Cv0LmVz4PFcq23b1pXIhsLszz6KTDBz9IdDfo9H5cjU3zl/6zHM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740535226; c=relaxed/simple; bh=RfYmOERkUxqE5prlWN7OAdc6gPzsJOgsTBJ1vxiGUIU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DHCeYB7y9m0kFqFC3LA0mMD0Liqw0Y85N9qHP26yRnTF3iPel9fq8pzOQemRXMPjkcc1JZ4UNlwsZZHIAJIRcmw0kyOWMfAInplihYeJRh3CBUQEjRQ5XxwH2dffWPmFqB1sNIxB/cW42sIgf7uFAKkD6V3KS0bhNNgWWBXUcCA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=tNKNlLiN; 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="tNKNlLiN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB59DC4CEEA; Wed, 26 Feb 2025 02:00:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740535226; bh=RfYmOERkUxqE5prlWN7OAdc6gPzsJOgsTBJ1vxiGUIU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=tNKNlLiNYg/YZMFPDrwysb+oGmhI/0yAGUREnvDPIgDs4WFmTJFYfIlWjZsvZTIKc W6o4ZMK7hd/WosGIuK5JkMe4GHaaK21uZ0DNo9hpSGN4kaOhznW7BNdxHuwZtUCiUR WTed7T9yvmFDDjZ3Z8SCkTZ4y9cj3d3fd2c278C4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49281: cifs: fix handlecache and multiuser Date: Wed, 26 Feb 2025 02:58:06 +0100 Message-ID: <2025022631-CVE-2022-49281-4365@gregkh> X-Mailer: git-send-email 2.48.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=3024; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=RfYmOERkUxqE5prlWN7OAdc6gPzsJOgsTBJ1vxiGUIU=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7SiKmr2sKPWN3XC72urZ0gtGHWz25fyMW1JY+6fn7d Lqk7TXXjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjIsYUM8yNENlhObd2zKXr6 qyVplstWygX7azDM95SIvLIs1u7vb/6K7rgMrdofltcDAQ== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: cifs: fix handlecache and multiuser In multiuser each individual user has their own tcon structure for the share and thus their own handle for a cached directory. When we umount such a share we much make sure to release the pinned down dentry for each such tcon and not just the master tcon. Otherwise we will get nasty warnings on umount that dentries are still in use: [ 3459.590047] BUG: Dentry 00000000115c6f41{i=12000000019d95,n=/} still in use\ (2) [unmount of cifs cifs] ... [ 3459.590492] Call Trace: [ 3459.590500] d_walk+0x61/0x2a0 [ 3459.590518] ? shrink_lock_dentry.part.0+0xe0/0xe0 [ 3459.590526] shrink_dcache_for_umount+0x49/0x110 [ 3459.590535] generic_shutdown_super+0x1a/0x110 [ 3459.590542] kill_anon_super+0x14/0x30 [ 3459.590549] cifs_kill_sb+0xf5/0x104 [cifs] [ 3459.590773] deactivate_locked_super+0x36/0xa0 [ 3459.590782] cleanup_mnt+0x131/0x190 [ 3459.590789] task_work_run+0x5c/0x90 [ 3459.590798] exit_to_user_mode_loop+0x151/0x160 [ 3459.590809] exit_to_user_mode_prepare+0x83/0xd0 [ 3459.590818] syscall_exit_to_user_mode+0x12/0x30 [ 3459.590828] do_syscall_64+0x48/0x90 [ 3459.590833] entry_SYSCALL_64_after_hwframe+0x44/0xae The Linux kernel CVE team has assigned CVE-2022-49281 to this issue. Affected and fixed versions =========================== Fixed in 5.15.33 with commit 2fafbc198613823943c106d1ec9b516da692059f Fixed in 5.16.19 with commit ffa631c4bff59dde59b598011f570e27dfba3515 Fixed in 5.17.2 with commit e71f6a3a1d5c826a30384fec587ca7503ef6bde5 Fixed in 5.18 with commit 47178c7722ac528ea08aa82c3ef9ffa178962d7a 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-2022-49281 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/cifs/cifsfs.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/2fafbc198613823943c106d1ec9b516da692059f https://git.kernel.org/stable/c/ffa631c4bff59dde59b598011f570e27dfba3515 https://git.kernel.org/stable/c/e71f6a3a1d5c826a30384fec587ca7503ef6bde5 https://git.kernel.org/stable/c/47178c7722ac528ea08aa82c3ef9ffa178962d7a