# CVE-2023-54116: drm/fbdev-generic: prohibit potential out-of-bounds access

> 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.23% (percentile 8, 2026-11-26)
- **Published:** 2025-12-24T13:06:37.591Z
- **Modified:** 2026-10-15T22:17:53.263Z

## Who should check

- Anyone running Linux \>= aa15c677cc34e626789cb65b8e7375180851c03b, \< efd2821b8abeccb6b51423002e2a62921481a26e; \>= aa15c677cc34e626789cb65b8e7375180851c03b, \< 251653fa974ea551a15d16cacfed7cde68cc7f87; \>= aa15c677cc34e626789cb65b8e7375180851c03b, \< c8687694bb1f5c48134f152f8c5c2e53483eb99d
- Anyone running Linux 5.18

## Description

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

drm/fbdev-generic: prohibit potential out-of-bounds access

The fbdev test of IGT may write after EOF, which lead to out-of-bound
access for drm drivers with fbdev-generic. For example, run fbdev test
on a x86+ast2400 platform, with 1680x1050 resolution, will cause the
linux kernel hang with the following call trace:

  Oops: 0000 \[\#1\] PREEMPT SMP PTI
  \[IGT\] fbdev: starting subtest eof
  Workqueue: events drm\_fb\_helper\_damage\_work \[drm\_kms\_helper\]
  \[IGT\] fbdev: starting subtest nullptr

  RIP: 0010:memcpy\_erms+0xa/0x20
  RSP: 0018:ffffa17d40167d98 EFLAGS: 00010246
  RAX: ffffa17d4eb7fa80 RBX: ffffa17d40e0aa80 RCX: 00000000000014c0
  RDX: 0000000000001a40 RSI: ffffa17d40e0b000 RDI: ffffa17d4eb80000
  RBP: ffffa17d40167e20 R08: 0000000000000000 R09: ffff89522ecff8c0
  R10: ffffa17d4e4c5000 R11: 0000000000000000 R12: ffffa17d4eb7fa80
  R13: 0000000000001a40 R14: 000000000000041a R15: ffffa17d40167e30
  FS:  0000000000000000(0000) GS:ffff895257380000(0000) knlGS:0000000000000000
  CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
  CR2: ffffa17d40e0b000 CR3: 00000001eaeca006 CR4: 00000000001706e0
  Call Trace:
   \<TASK\>
   ? drm\_fbdev\_generic\_helper\_fb\_dirty+0x207/0x330 \[drm\_kms\_helper\]
   drm\_fb\_helper\_damage\_work+0x8f/0x170 \[drm\_kms\_helper\]
   process\_one\_work+0x21f/0x430
   worker\_thread+0x4e/0x3c0
   ? \_\_pfx\_worker\_thread+0x10/0x10
   kthread+0xf4/0x120
   ? \_\_pfx\_kthread+0x10/0x10
   ret\_from\_fork+0x2c/0x50
   \</TASK\>
  CR2: ffffa17d40e0b000
  ---\[ end trace 0000000000000000 \]---

The is because damage rectangles computed by
drm\_fb\_helper\_memory\_range\_to\_clip() function is not guaranteed to be
bound in the screen's active display area. Possible reasons are:

1) Buffers are allocated in the granularity of page size, for mmap system
   call support. The shadow screen buffer consumed by fbdev emulation may
   also choosed be page size aligned.

2) The DIV\_ROUND\_UP() used in drm\_fb\_helper\_memory\_range\_to\_clip()
   will introduce off-by-one error.

For example, on a 16KB page size system, in order to store a 1920x1080
XRGB framebuffer, we need allocate 507 pages. Unfortunately, the size
1920\*1080\*4 can not be divided exactly by 16KB.

 1920 \* 1080 \* 4 = 8294400 bytes
 506 \* 16 \* 1024 = 8290304 bytes
 507 \* 16 \* 1024 = 8306688 bytes

 line\_length = 1920\*4 = 7680 bytes

 507 \* 16 \* 1024 / 7680 = 1081.6

 off / line\_length = 507 \* 16 \* 1024 / 7680 = 1081
 DIV\_ROUND\_UP(507 \* 16 \* 1024, 7680) will yeild 1082

memcpy\_toio() typically issue the copy line by line, when copy the last
line, out-of-bound access will be happen. Because:

 1082 \* line\_length = 1082 \* 7680 = 8309760, and 8309760 \> 8306688

Note that userspace may still write to the invisiable area if a larger
buffer than width x stride is exposed. But it is not a big issue as
long as there still have memory resolve the access if not drafting so
far.

 - Also limit the y1 (Daniel)
 - keep fix patch it to minimal (Daniel)
 - screen\_size is page size aligned because of it need mmap (Thomas)
 - Adding fixes tag (Thomas)

## Affected and fixed versions

- Linux: \>= aa15c677cc34e626789cb65b8e7375180851c03b, \< efd2821b8abeccb6b51423002e2a62921481a26e; \>= aa15c677cc34e626789cb65b8e7375180851c03b, \< 251653fa974ea551a15d16cacfed7cde68cc7f87; \>= aa15c677cc34e626789cb65b8e7375180851c03b, \< c8687694bb1f5c48134f152f8c5c2e53483eb99d (cvelist)
- Linux: 5.18 (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-2023-54116. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-54116.md
Affected: Linux >= aa15c677cc34e626789cb65b8e7375180851c03b, < efd2821b8abeccb6b51423002e2a62921481a26e; >= aa15c677cc34e626789cb65b8e7375180851c03b, < 251653fa974ea551a15d16cacfed7cde68cc7f87; >= aa15c677cc34e626789cb65b8e7375180851c03b, < c8687694bb1f5c48134f152f8c5c2e53483eb99d; Linux 5.18
Fixed in: Linux 251653fa974ea551a15d16cacfed7cde68cc7f87

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

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

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

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

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

Linux \>= aa15c677cc34e626789cb65b8e7375180851c03b, \< efd2821b8abeccb6b51423002e2a62921481a26e; \>= aa15c677cc34e626789cb65b8e7375180851c03b, \< 251653fa974ea551a15d16cacfed7cde68cc7f87; \>= aa15c677cc34e626789cb65b8e7375180851c03b, \< c8687694bb1f5c48134f152f8c5c2e53483eb99d; Linux 5.18.

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

Yes. Fixed in Linux 251653fa974ea551a15d16cacfed7cde68cc7f87. No fix listed yet: follow the vendor advisory.

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

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/efd2821b8abeccb6b51423002e2a62921481a26e>
- other: <https://git.kernel.org/stable/c/251653fa974ea551a15d16cacfed7cde68cc7f87>
- other: <https://git.kernel.org/stable/c/c8687694bb1f5c48134f152f8c5c2e53483eb99d>

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

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