# CVE-2022-50371: led: qcom-lpg: Fix sleeping in atomic

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.17% (percentile 4, 2026-11-26)
- **CWE:** CWE-667
- **Published:** 2025-09-17T14:56:26.854Z
- **Modified:** 2026-06-17T05:23:21.563Z

## Who should check

- Anyone running Linux \>= 24e2d05d1b68981f22c984c766fabc5a93c83dba, \< 9deba7b51d5ee7a2d93fabb69f9b8189241f90e3; \>= 24e2d05d1b68981f22c984c766fabc5a93c83dba, \< 380304391fa7fb084745f26b4b9a59f4666520c1; \>= 24e2d05d1b68981f22c984c766fabc5a93c83dba, \< 3031993b3474794ecb71b6f969a3e60e4bda9d8a
- Anyone running Linux 5.19

## 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

## Affected and fixed versions

- Linux: \>= 24e2d05d1b68981f22c984c766fabc5a93c83dba, \< 9deba7b51d5ee7a2d93fabb69f9b8189241f90e3; \>= 24e2d05d1b68981f22c984c766fabc5a93c83dba, \< 380304391fa7fb084745f26b4b9a59f4666520c1; \>= 24e2d05d1b68981f22c984c766fabc5a93c83dba, \< 3031993b3474794ecb71b6f969a3e60e4bda9d8a (cvelist)
- Linux: 5.19 (cvelist)

## Mitigation

- Upgrade Linux to 3031993b3474794ecb71b6f969a3e60e4bda9d8a or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-50371. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50371.md
Affected: Linux >= 24e2d05d1b68981f22c984c766fabc5a93c83dba, < 9deba7b51d5ee7a2d93fabb69f9b8189241f90e3; >= 24e2d05d1b68981f22c984c766fabc5a93c83dba, < 380304391fa7fb084745f26b4b9a59f4666520c1; >= 24e2d05d1b68981f22c984c766fabc5a93c83dba, < 3031993b3474794ecb71b6f969a3e60e4bda9d8a; Linux 5.19
Fixed in: Linux 9deba7b51d5ee7a2d93fabb69f9b8189241f90e3, Linux 380304391fa7fb084745f26b4b9a59f4666520c1, Linux 3031993b3474794ecb71b6f969a3e60e4bda9d8a

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-50371 being exploited?

There is no confirmed exploitation: CVE-2022-50371 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.17% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-50371?

Medium: CVSS 5.5 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-50371?

Linux \>= 24e2d05d1b68981f22c984c766fabc5a93c83dba, \< 9deba7b51d5ee7a2d93fabb69f9b8189241f90e3; \>= 24e2d05d1b68981f22c984c766fabc5a93c83dba, \< 380304391fa7fb084745f26b4b9a59f4666520c1; \>= 24e2d05d1b68981f22c984c766fabc5a93c83dba, \< 3031993b3474794ecb71b6f969a3e60e4bda9d8a; Linux 5.19.

### Is there a fix for CVE-2022-50371?

Yes. Fixed in Linux 9deba7b51d5ee7a2d93fabb69f9b8189241f90e3, Linux 380304391fa7fb084745f26b4b9a59f4666520c1, Linux 3031993b3474794ecb71b6f969a3e60e4bda9d8a. Upgrade Linux to 3031993b3474794ecb71b6f969a3e60e4bda9d8a or later.

### How do I check if I'm affected by CVE-2022-50371?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/9deba7b51d5ee7a2d93fabb69f9b8189241f90e3>
- patch: <https://git.kernel.org/stable/c/380304391fa7fb084745f26b4b9a59f4666520c1>
- patch: <https://git.kernel.org/stable/c/3031993b3474794ecb71b6f969a3e60e4bda9d8a>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-50371>

HTML: <https://flawdb.com/CVE-2022-50371> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-50371>
