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 1D9301F9402 for ; Mon, 21 Oct 2024 12:18:01 +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=1729513081; cv=none; b=HTou05cqZCQa0e9TKebCl00ywwQG+LNrBy52hWbn8Z0W+Un8OSiSxqA/58KPEXD7NQC79pOu14qn+jSrJ233z+CiLl1GGvED2znybVayUhgPogSLq+j9OQI+QksNdZKs6Ew/2KJlI65f1SCP2qcPiSPscR5NF3mc87ik0YZpIDs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729513081; c=relaxed/simple; bh=tHpAwB7i8mCXIIpiY8rikWUr8UJcaNx9fu95t6nyv8I=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=jKpetf27IrFk3asPwXW4/kvLEBxPMM13CAiOV+YiJfIavYoTmen64eyn5XCbFFmz/ThoaqH7aUPm5cxlx5vXXffZ/mt6zh1iQjj5cLzZNv+7tpy0EjnnKwuNr+KHLkd+uu3qG9XXGaTYMeIBjoyzt0zbNlEMxNC0xfzlfq1l3Gs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=IwfK5jwx; 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="IwfK5jwx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 909C3C4CEE8; Mon, 21 Oct 2024 12:18:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1729513081; bh=tHpAwB7i8mCXIIpiY8rikWUr8UJcaNx9fu95t6nyv8I=; h=From:To:Cc:Subject:Date:Reply-to:From; b=IwfK5jwxADpTH64ZqidrssNgVBk8UdDKEHyxPvuwAhPIBRW7LqtEA01d5/nPhjBED Uw+zzKMZoshFSgVlc/z6PgTPhUA3hXawtfKy8eXO+lg6cmzAvyhcJiylcQ3mWL+jId Or9+0jvbfCR4i9tHWibYHedVpTZNeUuBeI4sqJvc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-47733: netfs: Delete subtree of 'fs/netfs' when netfs module exits Date: Mon, 21 Oct 2024 14:16:12 +0200 Message-ID: <2024102107-CVE-2024-47733-6591@gregkh> X-Mailer: git-send-email 2.47.0 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=2735; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=tHpAwB7i8mCXIIpiY8rikWUr8UJcaNx9fu95t6nyv8I=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlibuyuTnwn//HFpWZKNvyuuag1VS1XgHXx9WMdSxtvc 13Z8GxCRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzE+DHDgpurvmtWLeD8477n 8vy7XxgnvW982MAwTyehT163SX7R46q/Sjci1i/bdpFlDwA= 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: netfs: Delete subtree of 'fs/netfs' when netfs module exits In netfs_init() or fscache_proc_init(), we create dentry under 'fs/netfs', but in netfs_exit(), we only delete the proc entry of 'fs/netfs' without deleting its subtree. This triggers the following WARNING: ================================================================== remove_proc_entry: removing non-empty directory 'fs/netfs', leaking at least 'requests' WARNING: CPU: 4 PID: 566 at fs/proc/generic.c:717 remove_proc_entry+0x160/0x1c0 Modules linked in: netfs(-) CPU: 4 UID: 0 PID: 566 Comm: rmmod Not tainted 6.11.0-rc3 #860 RIP: 0010:remove_proc_entry+0x160/0x1c0 Call Trace: netfs_exit+0x12/0x620 [netfs] __do_sys_delete_module.isra.0+0x14c/0x2e0 do_syscall_64+0x4b/0x110 entry_SYSCALL_64_after_hwframe+0x76/0x7e ================================================================== Therefore use remove_proc_subtree() instead of remove_proc_entry() to fix the above problem. The Linux kernel CVE team has assigned CVE-2024-47733 to this issue. Affected and fixed versions =========================== Issue introduced in 6.8 with commit 7eb5b3e3a0a5 and fixed in 6.10.13 with commit 603f95cefbee Issue introduced in 6.8 with commit 7eb5b3e3a0a5 and fixed in 6.11.2 with commit 7a9eaf97d566 Issue introduced in 6.8 with commit 7eb5b3e3a0a5 and fixed in 6.12-rc1 with commit 3c58a9575e02 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-47733 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/netfs/main.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/603f95cefbee06a31b03137b777f03e3c2163d72 https://git.kernel.org/stable/c/7a9eaf97d56625e55b31a7beb558e1ee185ca461 https://git.kernel.org/stable/c/3c58a9575e02c2b90a3180007d57105ceaa7c246