# CVE-2023-53795: iommufd: IOMMUFD\_DESTROY should not increase the refcount

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

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; 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.22% (percentile 7, 2026-11-26)
- **Published:** 2025-12-09T00:00:51.992Z
- **Modified:** 2026-08-05T09:16:02.978Z

## Who should check

- Anyone running Linux \>= 2ff4bed7fee72ba1abfcff5f11ae8f8e570353f2, \< 495b327435b0298e9b3b434f5834d459a93673ce; \>= 2ff4bed7fee72ba1abfcff5f11ae8f8e570353f2, \< 99f98a7c0d6985d5507c8130a981972e4b7b3bdc
- Anyone running Linux 6.2

## Description

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

iommufd: IOMMUFD\_DESTROY should not increase the refcount

syzkaller found a race where IOMMUFD\_DESTROY increments the refcount:

       obj = iommufd\_get\_object(ucmd-\>ictx, cmd-\>id, IOMMUFD\_OBJ\_ANY);
       if (IS\_ERR(obj))
               return PTR\_ERR(obj);
       iommufd\_ref\_to\_users(obj);
       /\* See iommufd\_ref\_to\_users() \*/
       if (!iommufd\_object\_destroy\_user(ucmd-\>ictx, obj))

As part of the sequence to join the two existing primitives together.

Allowing the refcount the be elevated without holding the destroy\_rwsem
violates the assumption that all temporary refcount elevations are
protected by destroy\_rwsem. Racing IOMMUFD\_DESTROY with
iommufd\_object\_destroy\_user() will cause spurious failures:

  WARNING: CPU: 0 PID: 3076 at drivers/iommu/iommufd/device.c:477 iommufd\_access\_destroy+0x18/0x20 drivers/iommu/iommufd/device.c:478
  Modules linked in:
  CPU: 0 PID: 3076 Comm: syz-executor.0 Not tainted 6.3.0-rc1-syzkaller \#0
  Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/2023
  RIP: 0010:iommufd\_access\_destroy+0x18/0x20 drivers/iommu/iommufd/device.c:477
  Code: e8 3d 4e 00 00 84 c0 74 01 c3 0f 0b c3 0f 1f 44 00 00 f3 0f 1e fa 48 89 fe 48 8b bf a8 00 00 00 e8 1d 4e 00 00 84 c0 74 01 c3 \<0f\> 0b c3 0f 1f 44 00 00 41 57 41 56 41 55 4c 8d ae d0 00 00 00 41
  RSP: 0018:ffffc90003067e08 EFLAGS: 00010246
  RAX: 0000000000000000 RBX: ffff888109ea0300 RCX: 0000000000000000
  RDX: 0000000000000001 RSI: 0000000000000000 RDI: 00000000ffffffff
  RBP: 0000000000000004 R08: 0000000000000000 R09: ffff88810bbb3500
  R10: ffff88810bbb3e48 R11: 0000000000000000 R12: ffffc90003067e88
  R13: ffffc90003067ea8 R14: ffff888101249800 R15: 00000000fffffffe
  FS:  00007ff7254fe6c0(0000) GS:ffff888237c00000(0000) knlGS:0000000000000000
  CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
  CR2: 0000555557262da8 CR3: 000000010a6fd000 CR4: 0000000000350ef0
  Call Trace:
   \<TASK\>
   iommufd\_test\_create\_access drivers/iommu/iommufd/selftest.c:596 \[inline\]
   iommufd\_test+0x71c/0xcf0 drivers/iommu/iommufd/selftest.c:813
   iommufd\_fops\_ioctl+0x10f/0x1b0 drivers/iommu/iommufd/main.c:337
   vfs\_ioctl fs/ioctl.c:51 \[inline\]
   \_\_do\_sys\_ioctl fs/ioctl.c:870 \[inline\]
   \_\_se\_sys\_ioctl fs/ioctl.c:856 \[inline\]
   \_\_x64\_sys\_ioctl+0x84/0xc0 fs/ioctl.c:856
   do\_syscall\_x64 arch/x86/entry/common.c:50 \[inline\]
   do\_syscall\_64+0x38/0x80 arch/x86/entry/common.c:80
   entry\_SYSCALL\_64\_after\_hwframe+0x63/0xcd

The solution is to not increment the refcount on the IOMMUFD\_DESTROY path
at all. Instead use the xa\_lock to serialize everything. The refcount
check == 1 and xa\_erase can be done under a single critical region. This
avoids the need for any refcount incrementing.

It has the downside that if userspace races destroy with other operations
it will get an EBUSY instead of waiting, but this is kind of racing is
already dangerous.

## Affected and fixed versions

- Linux: \>= 2ff4bed7fee72ba1abfcff5f11ae8f8e570353f2, \< 495b327435b0298e9b3b434f5834d459a93673ce; \>= 2ff4bed7fee72ba1abfcff5f11ae8f8e570353f2, \< 99f98a7c0d6985d5507c8130a981972e4b7b3bdc (cvelist)
- Linux: 6.2 (cvelist)

## Mitigation

- Upgrade Linux to 99f98a7c0d6985d5507c8130a981972e4b7b3bdc or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2023-53795.md
Affected: Linux >= 2ff4bed7fee72ba1abfcff5f11ae8f8e570353f2, < 495b327435b0298e9b3b434f5834d459a93673ce; >= 2ff4bed7fee72ba1abfcff5f11ae8f8e570353f2, < 99f98a7c0d6985d5507c8130a981972e4b7b3bdc; Linux 6.2
Fixed in: Linux 495b327435b0298e9b3b434f5834d459a93673ce, Linux 99f98a7c0d6985d5507c8130a981972e4b7b3bdc

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-2023-53795 being exploited?

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

### How serious is CVE-2023-53795?

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

### Which versions are affected by CVE-2023-53795?

Linux \>= 2ff4bed7fee72ba1abfcff5f11ae8f8e570353f2, \< 495b327435b0298e9b3b434f5834d459a93673ce; \>= 2ff4bed7fee72ba1abfcff5f11ae8f8e570353f2, \< 99f98a7c0d6985d5507c8130a981972e4b7b3bdc; Linux 6.2.

### Is there a fix for CVE-2023-53795?

Yes. Fixed in Linux 495b327435b0298e9b3b434f5834d459a93673ce, Linux 99f98a7c0d6985d5507c8130a981972e4b7b3bdc. Upgrade Linux to 99f98a7c0d6985d5507c8130a981972e4b7b3bdc or later.

### How do I check if I'm affected by CVE-2023-53795?

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/495b327435b0298e9b3b434f5834d459a93673ce>
- other: <https://git.kernel.org/stable/c/99f98a7c0d6985d5507c8130a981972e4b7b3bdc>

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

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