From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 E04403A544A for ; Thu, 28 May 2026 09:44:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779961480; cv=none; b=KX+JcgWmG62+eAlk9SWzVL48PZpkUl5vdOCCLZFbDnkqooaty31DZs5oQ9f4yQUrfrNu5p7KAATiNzqphrfd+lHYDcd2Ue2l61dSG4xfWG5bCqlx71IPPfs4HwybZdtf456XWW7bM5KYQCX2Tv8xtoz19z59lQyE05jn2TYg9M4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779961480; c=relaxed/simple; bh=RYn6gQBwVqaxU7emNtrpCLRrljQDwin8s2MO9LONHn8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=OnKxZaZkz9hGEUT/G8UWqHfFeL+nQQyP37pcV6DnKDWbWvHG+dM9lcMhbj0Dsrf838eYsAwRqhrptCto8Xun+w0siEZ3rizBEDRLYo5xyOPrrPNyF5KL2aTodrgpNPDPN35tN5DZrqpoe2d5kn5xDYy+8H1MoeWMsDi4gfgiutc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=VugcfQw4; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="VugcfQw4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 480ED1F000E9; Thu, 28 May 2026 09:44:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779961478; bh=U4bZ9lIZlI4RPztBqijS+3ubrD30oJ6feVIRV3rMabA=; h=From:To:Cc:Subject:Date:Reply-To; b=VugcfQw4G7E3tXEOCnR2snyDMczlw0ZZMtsFGPoNLPrGXxawALTpRoX++JfkAuzB/ ptUHpkR6WAnHiAR7hHFt2c6Tig2NkcTod4DK+CTvszOSUxF9/wNNl3wvB7u0gCkhjc C+84/Q1ZcNz+VhoQTlTyGd6nKdmTZuXtYQt4QikI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-46202: HID: appletb-kbd: run inactivity autodim from workqueues Date: Thu, 28 May 2026 11:40:37 +0200 Message-ID: <2026052832-CVE-2026-46202-e976@gregkh> X-Mailer: git-send-email 2.54.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3938; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=/+hLO69xmBHu4lJIL6r5ka+MLvG6Q3QtPa+DeKHpZ0o=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkSvBNXLsmSdX65KHbpMVfGOzaCvOXnvJp929z7rn5/6 d/sZLy+I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACby6yjDggOTNK/tNWi+73a0 ddNDEwf+M6tkdzLM4brkE79vg/fSR+bmh7btCHaZIVf1DwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: HID: appletb-kbd: run inactivity autodim from workqueues The autodim code in hid-appletb-kbd takes backlight_device->ops_lock via backlight_device_set_brightness() -> mutex_lock() from two different atomic contexts: * appletb_inactivity_timer() is a struct timer_list callback, so it runs in softirq context. Every expiry triggers BUG: sleeping function called from invalid context at kernel/locking/mutex.c:591 Call Trace: __might_resched __mutex_lock backlight_device_set_brightness appletb_inactivity_timer call_timer_fn run_timer_softirq * reset_inactivity_timer() is called from appletb_kbd_hid_event() and appletb_kbd_inp_event(). On real USB hardware these run in softirq/IRQ context (URB completion and input-event dispatch). When the Touch Bar has already been dimmed or turned off, the reset path calls backlight_device_set_brightness() directly to restore brightness, producing the same warning. Both call sites hit the same mutex_lock()-from-atomic bug. Fix them together by moving the blocking work onto the system workqueue: * Convert the inactivity timer from struct timer_list to struct delayed_work; the callback (appletb_inactivity_work) now runs in process context where mutex_lock() is legal. * Add a dedicated struct work_struct restore_brightness_work and have reset_inactivity_timer() schedule it instead of calling backlight_device_set_brightness() directly. Cancel both works synchronously during driver tear-down alongside the existing backlight reference drop. The semantics are unchanged (same delays, same state transitions on dim, turn-off and user activity); only the execution context of the sleeping call changes. The timer field and callback are renamed to match their new type; reset_inactivity_timer() keeps its name because it is invoked from input event paths that read naturally as "reset the inactivity timer". The Linux kernel CVE team has assigned CVE-2026-46202 to this issue. Affected and fixed versions =========================== Issue introduced in 6.15 with commit 93a0fc48948107e0cc34e1de22c3cb363a8f2783 and fixed in 6.18.32 with commit 5c0830323689ef15224f0025276176988861b3b0 Issue introduced in 6.15 with commit 93a0fc48948107e0cc34e1de22c3cb363a8f2783 and fixed in 7.0.9 with commit 2473a334c292af257ef68e33bc7760f4a8251812 Issue introduced in 6.15 with commit 93a0fc48948107e0cc34e1de22c3cb363a8f2783 and fixed in 7.1-rc4 with commit 1654e53349d4e657b331de354313461f401f5063 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-2026-46202 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/hid/hid-appletb-kbd.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/5c0830323689ef15224f0025276176988861b3b0 https://git.kernel.org/stable/c/2473a334c292af257ef68e33bc7760f4a8251812 https://git.kernel.org/stable/c/1654e53349d4e657b331de354313461f401f5063