# CVE-2022-50652: uio: uio\_dmem\_genirq: Fix missing unlock in irq configuration

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

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.32% (percentile 18, 2026-11-26)
- **Published:** 2025-12-09T00:00:26.593Z
- **Modified:** 2026-11-10T12:10:00.177Z

## Who should check

- Anyone running Linux \>= b77fa964ecb1d72a671234f5bea95b41f77c233a, \< 9977cb7af5a8f4738198b020436e2e56c5cd721e; \>= 0151b03f43f2d295a6949454434074b34a262e06, \< a323d24a0183be730d2398b11b3a91e5c2e222a0; \>= ea6b7b1d58790ffb36bace723f6e62a1c8595c77, \< ac5585bb06a2e82177269bee93e59887ce591106; \>= 750a95d63746458e86c6d92dfad48a05c64d0ecd, \< eca77a25a7cb3201738f4b55b9b8fa1089d7d002; \>= b74351287d4bd90636c3f48bc188c2f53824c2d4, \< 9bf7a0b2b15cd12e15f7858072bd89933746de67; \>= b74351287d4bd90636c3f48bc188c2f53824c2d4, \< 79a4bdb6b9920134af1a4738a1fa36a0438cd905; \>= b74351287d4bd90636c3f48bc188c2f53824c2d4, \< 030b6c7bb1e4edebaee2b1e48fbcc9cd5998d51d; \>= b74351287d4bd90636c3f48bc188c2f53824c2d4, \< ee180e867ce4b2f744799247b81050b3e5dd62cd; \>= b74351287d4bd90636c3f48bc188c2f53824c2d4, \< 9de255c461d1b3f0242b3ad1450c3323a3e00b34; 4a117a1c581623d04bf09aa7455d8e7b66e8bb85; …
- Anyone running Linux 5.6

## Description

In the Linux kernel, the following vulnerability has been resolved:

uio: uio\_dmem\_genirq: Fix missing unlock in irq configuration

Commit b74351287d4b ("uio: fix a sleep-in-atomic-context bug in
uio\_dmem\_genirq\_irqcontrol()") started calling disable\_irq() without
holding the spinlock because it can sleep. However, that fix introduced
another bug: if interrupt is already disabled and a new disable request
comes in, then the spinlock is not unlocked:

root@localhost:~\# printf '\\x00\\x00\\x00\\x00' \> /dev/uio0
root@localhost:~\# printf '\\x00\\x00\\x00\\x00' \> /dev/uio0
root@localhost:~\# \[   14.851538\] BUG: scheduling while atomic: bash/223/0x00000002
\[   14.851991\] Modules linked in: uio\_dmem\_genirq uio myfpga(OE) bochs drm\_vram\_helper drm\_ttm\_helper ttm drm\_kms\_helper drm snd\_pcm ppdev joydev psmouse snd\_timer snd e1000fb\_sys\_fops syscopyarea parport sysfillrect soundcore sysimgblt input\_leds pcspkr i2c\_piix4 serio\_raw floppy evbug qemu\_fw\_cfg mac\_hid pata\_acpi ip\_tables x\_tables autofs4 \[last unloaded: parport\_pc\]
\[   14.854206\] CPU: 0 PID: 223 Comm: bash Tainted: G           OE      6.0.0-rc7 \#21
\[   14.854786\] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
\[   14.855664\] Call Trace:
\[   14.855861\]  \<TASK\>
\[   14.856025\]  dump\_stack\_lvl+0x4d/0x67
\[   14.856325\]  dump\_stack+0x14/0x1a
\[   14.856583\]  \_\_schedule\_bug.cold+0x4b/0x5c
\[   14.856915\]  \_\_schedule+0xe81/0x13d0
\[   14.857199\]  ? idr\_find+0x13/0x20
\[   14.857456\]  ? get\_work\_pool+0x2d/0x50
\[   14.857756\]  ? \_\_flush\_work+0x233/0x280
\[   14.858068\]  ? \_\_schedule+0xa95/0x13d0
\[   14.858307\]  ? idr\_find+0x13/0x20
\[   14.858519\]  ? get\_work\_pool+0x2d/0x50
\[   14.858798\]  schedule+0x6c/0x100
\[   14.859009\]  schedule\_hrtimeout\_range\_clock+0xff/0x110
\[   14.859335\]  ? tty\_write\_room+0x1f/0x30
\[   14.859598\]  ? n\_tty\_poll+0x1ec/0x220
\[   14.859830\]  ? tty\_ldisc\_deref+0x1a/0x20
\[   14.860090\]  schedule\_hrtimeout\_range+0x17/0x20
\[   14.860373\]  do\_select+0x596/0x840
\[   14.860627\]  ? \_\_kernel\_text\_address+0x16/0x50
\[   14.860954\]  ? poll\_freewait+0xb0/0xb0
\[   14.861235\]  ? poll\_freewait+0xb0/0xb0
\[   14.861517\]  ? rpm\_resume+0x49d/0x780
\[   14.861798\]  ? common\_interrupt+0x59/0xa0
\[   14.862127\]  ? asm\_common\_interrupt+0x2b/0x40
\[   14.862511\]  ? \_\_uart\_start.isra.0+0x61/0x70
\[   14.862902\]  ? \_\_check\_object\_size+0x61/0x280
\[   14.863255\]  core\_sys\_select+0x1c6/0x400
\[   14.863575\]  ? vfs\_write+0x1c9/0x3d0
\[   14.863853\]  ? vfs\_write+0x1c9/0x3d0
\[   14.864121\]  ? \_copy\_from\_user+0x45/0x70
\[   14.864526\]  do\_pselect.constprop.0+0xb3/0xf0
\[   14.864893\]  ? do\_syscall\_64+0x6d/0x90
\[   14.865228\]  ? do\_syscall\_64+0x6d/0x90
\[   14.865556\]  \_\_x64\_sys\_pselect6+0x76/0xa0
\[   14.865906\]  do\_syscall\_64+0x60/0x90
\[   14.866214\]  ? syscall\_exit\_to\_user\_mode+0x2a/0x50
\[   14.866640\]  ? do\_syscall\_64+0x6d/0x90
\[   14.866972\]  ? do\_syscall\_64+0x6d/0x90
\[   14.867286\]  ? do\_syscall\_64+0x6d/0x90
\[   14.867626\]  entry\_SYSCALL\_64\_after\_hwframe+0x63/0xcd
\[...\] stripped
\[   14.872959\]  \</TASK\>

('myfpga' is a simple 'uio\_dmem\_genirq' driver I wrote to test this)

The implementation of "uio\_dmem\_genirq" was based on "uio\_pdrv\_genirq" and
it is used in a similar manner to the "uio\_pdrv\_genirq" driver with respect
to interrupt configuration and handling. At the time "uio\_dmem\_genirq" was
introduced, both had the same implementation of the 'uio\_info' handlers
irqcontrol() and handler(). Then commit 34cb27528398 ("UIO: Fix concurrency
issue"), which was only applied to "uio\_pdrv\_genirq", ended up making them
a little different. That commit, among other things, changed disable\_irq()
to disable\_irq\_nosync() in the implementation of irqcontrol(). The
motivation there was to avoid a deadlock between irqcontrol() and
handler(), since it added a spinlock in the irq handler, and disable\_irq()
waits for the completion of the irq handler.

By changing disable\_irq() to disable\_irq\_nosync() in irqcontrol(), we also
avoid the sleeping-whil
---truncated---

## Affected and fixed versions

- Linux: \>= b77fa964ecb1d72a671234f5bea95b41f77c233a, \< 9977cb7af5a8f4738198b020436e2e56c5cd721e; \>= 0151b03f43f2d295a6949454434074b34a262e06, \< a323d24a0183be730d2398b11b3a91e5c2e222a0; \>= ea6b7b1d58790ffb36bace723f6e62a1c8595c77, \< ac5585bb06a2e82177269bee93e59887ce591106; \>= 750a95d63746458e86c6d92dfad48a05c64d0ecd, \< eca77a25a7cb3201738f4b55b9b8fa1089d7d002; \>= b74351287d4bd90636c3f48bc188c2f53824c2d4, \< 9bf7a0b2b15cd12e15f7858072bd89933746de67; \>= b74351287d4bd90636c3f48bc188c2f53824c2d4, \< 79a4bdb6b9920134af1a4738a1fa36a0438cd905; \>= b74351287d4bd90636c3f48bc188c2f53824c2d4, \< 030b6c7bb1e4edebaee2b1e48fbcc9cd5998d51d; \>= b74351287d4bd90636c3f48bc188c2f53824c2d4, \< ee180e867ce4b2f744799247b81050b3e5dd62cd; \>= b74351287d4bd90636c3f48bc188c2f53824c2d4, \< 9de255c461d1b3f0242b3ad1450c3323a3e00b34; 4a117a1c581623d04bf09aa7455d8e7b66e8bb85; … (cvelist)
- Linux: 5.6 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2022-50652.md
Affected: Linux >= b77fa964ecb1d72a671234f5bea95b41f77c233a, < 9977cb7af5a8f4738198b020436e2e56c5cd721e; >= 0151b03f43f2d295a6949454434074b34a262e06, < a323d24a0183be730d2398b11b3a91e5c2e222a0; >= ea6b7b1d58790ffb36bace723f6e62a1c8595c77, < ac5585bb06a2e82177269bee93e59887ce591106; >= 750a95d63746458e86c6d92…
Fixed in: Linux 9977cb7af5a8f4738198b020436e2e56c5cd721e, Linux 9bf7a0b2b15cd12e15f7858072bd89933746de67, Linux 79a4bdb6b9920134af1a4738a1fa36a0438cd905, Linux 030b6c7bb1e4edebaee2b1e48fbcc9cd5998d51d, Linux 9de255c461d1b3f0242b3ad1450c3323a3e00b34

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-50652 being exploited?

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

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

It has no CVSS score yet. Unknown.

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

Linux \>= b77fa964ecb1d72a671234f5bea95b41f77c233a, \< 9977cb7af5a8f4738198b020436e2e56c5cd721e; \>= 0151b03f43f2d295a6949454434074b34a262e06, \< a323d24a0183be730d2398b11b3a91e5c2e222a0; \>= ea6b7b1d58790ffb36bace723f6e62a1c8595c77, \< ac5585bb06a2e82177269bee93e59887ce591106; \>= 750a95d63746458e86c6d92dfad48a05c64d0ecd, \< eca77a25a7cb3201738f4b55b9b8fa1089d7d002; \>= b74351287d4bd90636c3f48bc188c2f53824c2d4, \< 9bf7a0b2b15cd12e15f7858072bd89933746de67; \>= b74351287d4bd90636c3f48bc188c2f53824c2d4, \< 79a4bdb6b9920134af1a4738a1fa36a0438cd905; \>= b74351287d4bd90636c3f48bc188c2f53824c2d4, \< 030b6c7bb1e4edebaee2b1e48fbcc9cd5998d51d; \>= b74351287d4bd90636c3f48bc188c2f53824c2d4, \< ee180e867ce4b2f744799247b81050b3e5dd62cd; \>= b74351287d4bd90636c3f48bc188c2f53824c2d4, \< 9de255c461d1b3f0242b3ad1450c3323a3e00b34; 4a117a1c581623d04bf09aa7455d8e7b66e8bb85; …; Linux 5.6.

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

Yes. Fixed in Linux 9977cb7af5a8f4738198b020436e2e56c5cd721e, Linux 9bf7a0b2b15cd12e15f7858072bd89933746de67, Linux 79a4bdb6b9920134af1a4738a1fa36a0438cd905, Linux 030b6c7bb1e4edebaee2b1e48fbcc9cd5998d51d, Linux 9de255c461d1b3f0242b3ad1450c3323a3e00b34. No fix listed yet: follow the vendor advisory.

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

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

- other: <https://git.kernel.org/stable/c/9977cb7af5a8f4738198b020436e2e56c5cd721e>
- other: <https://git.kernel.org/stable/c/a323d24a0183be730d2398b11b3a91e5c2e222a0>
- other: <https://git.kernel.org/stable/c/ac5585bb06a2e82177269bee93e59887ce591106>
- other: <https://git.kernel.org/stable/c/eca77a25a7cb3201738f4b55b9b8fa1089d7d002>
- other: <https://git.kernel.org/stable/c/9bf7a0b2b15cd12e15f7858072bd89933746de67>
- other: <https://git.kernel.org/stable/c/79a4bdb6b9920134af1a4738a1fa36a0438cd905>
- other: <https://git.kernel.org/stable/c/030b6c7bb1e4edebaee2b1e48fbcc9cd5998d51d>
- other: <https://git.kernel.org/stable/c/ee180e867ce4b2f744799247b81050b3e5dd62cd>
- other: <https://git.kernel.org/stable/c/9de255c461d1b3f0242b3ad1450c3323a3e00b34>

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

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