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 A92351482F6 for ; Sat, 17 Aug 2024 09:24:31 +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=1723886671; cv=none; b=svTgz3b79FgQFltgurLlhS+ISgakEFsSFfQ1k9ZjTOcr9b3L+VvrftjGONx+x7/wr2Zo9/xl0NZyEPItXpC/+JadrFPAGcasnhkk2MRak3vvLHarDUiV8ZbnuK2Bkts5cxAVBxOs98kX9SmiRRlGrqHv8sLtsLykGBs+UsaejD8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723886671; c=relaxed/simple; bh=f1vjMOSq4GZJAkJJwTsCxrQAmfpIM3OURXQIQAn2QZs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gviL5rPTrAfB/SymDQpfMDIvdVGqDYq4zvA+tdvJljtLTY4Kjwi347lU+qLXNOTxsVRNvrp75GsJvnpLPiBP21LkT6dmuTbDXbGlrNAbIGMOKXIxCfOWgm8MJhlyXMqMsXEGTnoKyNMbPB/1AMiKDcnLcWpiG9kB0KvauU/jKPI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=biofQxwf; 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="biofQxwf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C77CC116B1; Sat, 17 Aug 2024 09:24:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1723886671; bh=f1vjMOSq4GZJAkJJwTsCxrQAmfpIM3OURXQIQAn2QZs=; h=From:To:Cc:Subject:Date:Reply-to:From; b=biofQxwf+dSAujCYkH6W2rLnW71f0WcQlI7krJYdth1uak1y/VniIMoKWCXukPo2v ENexPzhOcb6j8D8Ju3jRPy0ot3ugVywQ9ID8hc6KKrKzitsj92preNsdB3Lq+Z56g3 1f9pbUOYIY2zgJZiej3zXUedNRENYg7pTTBb+w1c= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-43830: leds: trigger: Unregister sysfs attributes before calling deactivate() Date: Sat, 17 Aug 2024 11:22:34 +0200 Message-ID: <2024081727-CVE-2024-43830-3b85@gregkh> X-Mailer: git-send-email 2.46.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=2671; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=f1vjMOSq4GZJAkJJwTsCxrQAmfpIM3OURXQIQAn2QZs=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkHsi9rh35YdN+8LeX0yWkWWT1mNX5buThEjzi9kf1cx /Zydph4RywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenANzk8wzzbL0vu5qUhjz0slzN J3Kz7X5Iysp1DHP4i28tWzohoaWpYZKN/JePj1ymTWoCAA== 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: leds: trigger: Unregister sysfs attributes before calling deactivate() Triggers which have trigger specific sysfs attributes typically store related data in trigger-data allocated by the activate() callback and freed by the deactivate() callback. Calling device_remove_groups() after calling deactivate() leaves a window where the sysfs attributes show/store functions could be called after deactivation and then operate on the just freed trigger-data. Move the device_remove_groups() call to before deactivate() to close this race window. This also makes the deactivation path properly do things in reverse order of the activation path which calls the activate() callback before calling device_add_groups(). The Linux kernel CVE team has assigned CVE-2024-43830 to this issue. Affected and fixed versions =========================== Issue introduced in 4.19 with commit a7e7a3156300 and fixed in 6.1.103 with commit 734ba6437e80 Issue introduced in 4.19 with commit a7e7a3156300 and fixed in 6.6.44 with commit cb8aa9d2a4c8 Issue introduced in 4.19 with commit a7e7a3156300 and fixed in 6.10.3 with commit 0788a6f3523d Issue introduced in 4.19 with commit a7e7a3156300 and fixed in 6.11-rc1 with commit c0dc9adf9474 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-43830 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: drivers/leds/led-triggers.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/734ba6437e80dfc780e9ee9d95f912392d12b5ea https://git.kernel.org/stable/c/cb8aa9d2a4c8a15d6a43ccf901ef3d094aa60374 https://git.kernel.org/stable/c/0788a6f3523d3686a9eed5ea1e6fcce6841277b2 https://git.kernel.org/stable/c/c0dc9adf9474ecb7106e60e5472577375aedaed3