CVE-2026-138825: fbdev: core: Initialize modelist in framebuffer_alloc()

Published Nov 30, 2026
·
Updated

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

fbdev: core: Initialize modelist in framebufferalloc()

framebufferalloc() returns zeroed memory, so info->modelist starts out with NULL next and prev pointers. The list head is initialized only later, by fbvideomodetomodelist() or by doregisterframebuffer().

The "fix potential memory leak" commits listed below added fbdestroymodelist(&info->modelist) to the probe error paths of s3fb, tdfxfb, tridentfb, i740fb and carminefb. These paths can run before the list head is initialized:

- s3fb, tdfxfb, tridentfb and i740fb call fbvideomodetomodelist() only after a successful EDID read, and tridentfb can also hit the error path on an ioremap() or kmalloc() failure before that; - carminefb jumps to the error path when fbfindmode() fails, before its fbvideomodetomodelist() call.

fbdestroymodelist() then dereferences the NULL head. Reproduced on Debian 12 (6.1.180) by binding s3fb to a VGA device without EDID and forcing fballoccmap() to fail:

s3fb 0000:00:03.0: cannot allocate colormap BUG: kernel NULL pointer dereference, address: 0000000000000000 RIP: 0010:fbdestroymodelist+0x10/0x80 Call Trace: s3pciprobe.cold+0x12b/0x2bf [s3fb] localpciprobe+0x41/0x80 pcideviceprobe+0xc3/0x240 reallyprobe+0xde/0x380 driverprobedevice+0x84/0x150 driverprobedevice+0x1f/0x90 driverattach+0xce/0x1c0 busforeachdev+0x87/0xd0 busadddriver+0x1ae/0x200 driverregister+0x89/0xe0 dooneinitcall+0x59/0x220 doinitmodule+0x4a/0x1f0

Initialize the list head in framebufferalloc(), so info->modelist is always a valid, possibly empty, list and fbdestroymodelist() is safe on every error path. Keep the lazy initialization in doregisterframebuffer(), as drivers that embed struct fbinfo rather than calling framebufferalloc() still depend on it.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    Initialize the modelist list head in framebuffer_alloc() so info->modelist is always a valid, possibly empty, list.

Event History

Nov 30, 2026
CVE Published
via MITRE·01:25 PM
Data Sourced
via MITRE·01:25 PM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203