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 C3D9615A87F for ; Mon, 29 Jul 2024 14:34:05 +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=1722263645; cv=none; b=akFmzeWN/tBmoYRBbZVXnZsgR94wgyyiX+Q2+nyw7jNeZBzcs3MemADVuPSw87sUYaRuPgFzll4cmt9CwfQt5yw7TzJBpcHXiG4IgoF9otpol+Nh6ekGMWf71bHuyIix7QRutXQ8lIjaH3B7rxgLQNeprZTAc9P9J8Iban1AeC4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722263645; c=relaxed/simple; bh=bLiIRUPWsCUffWWFffWQhxFWg4nmdUooxSAZ8hVrUj4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ZGWJMIrsYC+s9ktVC8iydmcAWe0Yn+MODGOnKaPza+kIE/XsgtmeIxZxuZ/0bXEmiZ4uQee+yItahcQnH9C1xyD7VaZJ9GhfQdQelKRzSTPoDkWBex82x5rGvzg281PJMx0lVnKhgqfBfEhpHMH10QZ+4LgWeqqWXu6eiVGvJ1w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=TxT6vD1O; 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="TxT6vD1O" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41BB4C32786; Mon, 29 Jul 2024 14:34:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1722263645; bh=bLiIRUPWsCUffWWFffWQhxFWg4nmdUooxSAZ8hVrUj4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=TxT6vD1OLgY3U3CqLhzBNfwpgXBbLUGjobr2fMKXV2QTnAEy//JbHPIJqwKDhU3Ls NqOesu+tmY6qe+UIvTxoSDj0f7KwK8mNjUAczxMp3T9ye27IshtQo30dkR8wXCVioV meSFSmy++qi4b3VJgSso8lP9Z9ZNBfFFbW1QBLr4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-41030: ksmbd: discard write access to the directory open Date: Mon, 29 Jul 2024 16:32:25 +0200 Message-ID: <2024072921-CVE-2024-41030-301a@gregkh> X-Mailer: git-send-email 2.45.2 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=2559; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=bLiIRUPWsCUffWWFffWQhxFWg4nmdUooxSAZ8hVrUj4=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnLl38tatK/s3jfu9CMRxdrPk1eWOL3oXna0hjdL3HPj e4nS7r3dMSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEDN8wLDisoZ5Zt7U8W8zx 6aXzu02UEhmsjBnmh06K6n7xXeZL01SdDxz7mMv5jSZtAwA= 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: ksmbd: discard write access to the directory open may_open() does not allow a directory to be opened with the write access. However, some writing flags set by client result in adding write access on server, making ksmbd incompatible with FUSE file system. Simply, let's discard the write access when opening a directory. list_add corruption. next is NULL. ------------[ cut here ]------------ kernel BUG at lib/list_debug.c:26! pc : __list_add_valid+0x88/0xbc lr : __list_add_valid+0x88/0xbc Call trace: __list_add_valid+0x88/0xbc fuse_finish_open+0x11c/0x170 fuse_open_common+0x284/0x5e8 fuse_dir_open+0x14/0x24 do_dentry_open+0x2a4/0x4e0 dentry_open+0x50/0x80 smb2_open+0xbe4/0x15a4 handle_ksmbd_work+0x478/0x5ec process_one_work+0x1b4/0x448 worker_thread+0x25c/0x430 kthread+0x104/0x1d4 ret_from_fork+0x10/0x20 The Linux kernel CVE team has assigned CVE-2024-41030 to this issue. Affected and fixed versions =========================== Fixed in 6.1.100 with commit 66cf853e1c7a Fixed in 6.6.41 with commit 9e84b1ba5c98 Fixed in 6.9.10 with commit 198498b2049c Fixed in 6.10 with commit e2e33caa5dc2 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-2024-41030 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/smb/server/smb2pdu.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/66cf853e1c7a2407f15d9f7aaa3e47d61745e361 https://git.kernel.org/stable/c/9e84b1ba5c98fb5c9f869c85db1d870354613baa https://git.kernel.org/stable/c/198498b2049c0f11f7670be6974570e02b0cc035 https://git.kernel.org/stable/c/e2e33caa5dc2eae7bddf88b22ce11ec3d760e5cd