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 241A7330D2E for ; Wed, 17 Sep 2025 14:57:11 +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=1758121031; cv=none; b=bfFTGZNJHft/HB64l+ukezvbThKV4vOYALc9GyAYWCmjwiSA15QWXl2ez/OHcHqIImhprhUb7LQcN3met2jVXMh5+g8aF851V/bgyq2Ef3UNjEfgpszIvFnmYvdC8yMjDF6p/dgKzGylkjb38K4mdZWJ7tcSu4wlhBdx6hqzl0U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758121031; c=relaxed/simple; bh=V8y/LyKE3qPh1OTZcAEkc1Fi4KkDl8lgAjWNhzM4ceM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Qb/Qrw6aMHTDl1CYbi/ukHIAnl9BkSvHYhqko+A/kAOrwtVSh6MJGqXPuqNvOUvmJDcNQpmW/yYsrL55zWgBXcnlzdnqIYFx3QlCuhEbAZD/WhyubQu3QHuUmw4MqO5a+lOR4lv1jrzyg7hmKWUefJ8EMIsXxJa3ESwM/tBR8jo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=HSyx5OcI; 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="HSyx5OcI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8A902C4CEE7; Wed, 17 Sep 2025 14:57:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758121031; bh=V8y/LyKE3qPh1OTZcAEkc1Fi4KkDl8lgAjWNhzM4ceM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=HSyx5OcImBH9Am3dd6W2bRnyh2veC0mcxCmVKGOYCiumhTbSfxWiz0kvy0P40Xywf XcxiNdS9hPgvpj47hVZ9HGeh5o0Tzw3YLgLW+Alaf5CM1aj7ND7V3IBFknOGNuZ9Hv y9bX+xaFc+AfxzlZIFytjLA+QeDTWz4HxB5yoikg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50371: led: qcom-lpg: Fix sleeping in atomic Date: Wed, 17 Sep 2025 16:56:30 +0200 Message-ID: <2025091717-CVE-2022-50371-593f@gregkh> X-Mailer: git-send-email 2.51.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=3432; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=5ho5kGWqTCtnEEgboWYbDG0vxQ0wDDQOt+h0r5Tpclk=; b=owGbwMvMwCRo6H6F97bub03G02pJDBmnzghar2n51rlQPufOmUA+/ciZ1qJvd/3nlY3zLbHj4 PyvdUq7I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACbyVZthNptA9ZypX6qqnsoF pKfektDndm+pYVhwad/cThl519yCnB+PQiOmzM0WWaMNAA== 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: led: qcom-lpg: Fix sleeping in atomic lpg_brighness_set() function can sleep, while led's brightness_set() callback must be non-blocking. Change LPG driver to use brightness_set_blocking() instead. BUG: sleeping function called from invalid context at kernel/locking/mutex.c:580 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 0, name: swapper/0 preempt_count: 101, expected: 0 INFO: lockdep is turned off. CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 6.1.0-rc1-00014-gbe99b089c6fc-dirty #85 Hardware name: Qualcomm Technologies, Inc. DB820c (DT) Call trace: dump_backtrace.part.0+0xe4/0xf0 show_stack+0x18/0x40 dump_stack_lvl+0x88/0xb4 dump_stack+0x18/0x34 __might_resched+0x170/0x254 __might_sleep+0x48/0x9c __mutex_lock+0x4c/0x400 mutex_lock_nested+0x2c/0x40 lpg_brightness_single_set+0x40/0x90 led_set_brightness_nosleep+0x34/0x60 led_heartbeat_function+0x80/0x170 call_timer_fn+0xb8/0x340 __run_timers.part.0+0x20c/0x254 run_timer_softirq+0x3c/0x7c _stext+0x14c/0x578 ____do_softirq+0x10/0x20 call_on_irq_stack+0x2c/0x5c do_softirq_own_stack+0x1c/0x30 __irq_exit_rcu+0x164/0x170 irq_exit_rcu+0x10/0x40 el1_interrupt+0x38/0x50 el1h_64_irq_handler+0x18/0x2c el1h_64_irq+0x64/0x68 cpuidle_enter_state+0xc8/0x380 cpuidle_enter+0x38/0x50 do_idle+0x244/0x2d0 cpu_startup_entry+0x24/0x30 rest_init+0x128/0x1a0 arch_post_acpi_subsys_init+0x0/0x18 start_kernel+0x6f4/0x734 __primary_switched+0xbc/0xc4 The Linux kernel CVE team has assigned CVE-2022-50371 to this issue. Affected and fixed versions =========================== Issue introduced in 5.19 with commit 24e2d05d1b68981f22c984c766fabc5a93c83dba and fixed in 6.0.16 with commit 9deba7b51d5ee7a2d93fabb69f9b8189241f90e3 Issue introduced in 5.19 with commit 24e2d05d1b68981f22c984c766fabc5a93c83dba and fixed in 6.1.2 with commit 380304391fa7fb084745f26b4b9a59f4666520c1 Issue introduced in 5.19 with commit 24e2d05d1b68981f22c984c766fabc5a93c83dba and fixed in 6.2 with commit 3031993b3474794ecb71b6f969a3e60e4bda9d8a 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-2022-50371 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/rgb/leds-qcom-lpg.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/9deba7b51d5ee7a2d93fabb69f9b8189241f90e3 https://git.kernel.org/stable/c/380304391fa7fb084745f26b4b9a59f4666520c1 https://git.kernel.org/stable/c/3031993b3474794ecb71b6f969a3e60e4bda9d8a