CVE-2026-80580: fbdev: bound mode sysfs output to the sysfs buffer
In the Linux kernel, the following vulnerability has been resolved:
fbdev: bound mode sysfs output to the sysfs buffer
modestring() uses snprintf() which can return a value larger than the remaining buffer space. showmodes() accumulates the return value into i without checking whether i has reached PAGESIZE, causing the offset to advance past the sysfs buffer if the modelist is long enough.
Add a size parameter to modestring() and use scnprintf() to return only the bytes actually written. Add an early return when offset already exceeds the buffer. In showmodes(), stop accumulating once the buffer is full.
Affected Software
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Linux kernel systems using fbdev are affected when the framebuffer mode list is long enough for the sysfs mode output to exceed the PAGE_SIZE buffer.
What condition triggers the vulnerable behavior?
The issue is triggered while generating sysfs mode output if repeated mode strings cause the accumulated output offset to advance past the sysfs buffer. The flaw results from counting snprintf()’s would-have-written length rather than the bytes actually stored.