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 A646741213 for ; Fri, 17 May 2024 12:25:44 +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=1715948744; cv=none; b=JqKA3anz/3NnynD4oLZ9xniClemizT+qdoExj730tm0XeQixBcchjrcjz/2cl9H8qT0o+zX84GuR4WhqrcknHf8UNQ5CiYRTmLx2HIaidB0j8DackwzKfKhthdAae/ZeTxHxBx6h4qa3vLTszK8e4ceEBdGmIQuVMejONgo+0og= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715948744; c=relaxed/simple; bh=iexlCtnXkFsGW11ZfmOnq+E8W/c4NAvNgHZt7A0Lf88=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qr20fJAzaIrOnNww+ky4l+a2psJTZ0DAqB2h0K5zzeL9E8HPr0T/0UTEcAug34xtEt2xS5Wtq8n0DAE5u6kJktQm/ROiOMMiHqEYrBCvLuXJ+aqA+1uQlYj7AmxyJ4YUtOtKHrVacvvnOAAMkpDU/KOXZ4nwCH1N5QefZeq2k+M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Gd/Tu73T; 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="Gd/Tu73T" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA2A3C32786; Fri, 17 May 2024 12:25:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1715948744; bh=iexlCtnXkFsGW11ZfmOnq+E8W/c4NAvNgHZt7A0Lf88=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Gd/Tu73TUfubxqjgsu5DlFZLaiZxlRpjee81NK4M92WUSbJl6C94MecXxjQe/47Mz brIaqHm4fT0Srh3r1PuiZhCLyodQ+5NbuObUgx3eVrQKgjD1EK/oBiR4JS0uSU40+V AYOw4vGCPNU8nC7xcjZ7AF8YKVgWE8DN6fE3QkoA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-35793: debugfs: fix wait/cancellation handling during remove Date: Fri, 17 May 2024 14:25:14 +0200 Message-ID: <2024051709-CVE-2024-35793-6171@gregkh> X-Mailer: git-send-email 2.45.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=2344; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=iexlCtnXkFsGW11ZfmOnq+E8W/c4NAvNgHZt7A0Lf88=; b=kA0DAAIRMUfUDdst+ykByyZiAGZHTKWhugjiflfvaStkne/fW6k9JtrgpFerf8RaBLnRVL3uh 4hdBAARAgAdFiEE9LYMxb94wiFKMT3LMUfUDdst+ykFAmZHTKUACgkQMUfUDdst+yl3BQCgnWeV sMgaf0Gz3wN4C+jGC0uUgAoAoKnMmyswvkTE6CGDkBQH6rln9dK3 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: debugfs: fix wait/cancellation handling during remove Ben Greear further reports deadlocks during concurrent debugfs remove while files are being accessed, even though the code in question now uses debugfs cancellations. Turns out that despite all the review on the locking, we missed completely that the logic is wrong: if the refcount hits zero we can finish (and need not wait for the completion), but if it doesn't we have to trigger all the cancellations. As written, we can _never_ get into the loop triggering the cancellations. Fix this, and explain it better while at it. The Linux kernel CVE team has assigned CVE-2024-35793 to this issue. Affected and fixed versions =========================== Issue introduced in 6.7 with commit 8c88a474357e and fixed in 6.7.12 with commit e88b5ae01901 Issue introduced in 6.7 with commit 8c88a474357e and fixed in 6.8.3 with commit 3d08cca5fd0a Issue introduced in 6.7 with commit 8c88a474357e and fixed in 6.9 with commit 952c3fce297f 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-35793 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/debugfs/inode.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/e88b5ae01901c4a655a53158397746334778a57b https://git.kernel.org/stable/c/3d08cca5fd0aabb62b7015067ab40913b33da906 https://git.kernel.org/stable/c/952c3fce297f12c7ff59380adb66b564e2bc9b64