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

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.18%, higher than 8% of CVEs (2026-12-01)
- Published: 2026-11-30T13:25:20.178Z
- Modified: 2026-11-30T14:17:36.683Z
- Assigned by: Linux

## Description

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

fbdev: core: Initialize modelist in framebuffer_alloc()

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

The "fix potential memory leak" commits listed below added
fb_destroy_modelist(&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 fb_videomode_to_modelist()
   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 fb_find_mode() fails, before
   its fb_videomode_to_modelist() call.

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

  s3fb 0000:00:03.0: cannot allocate colormap
  BUG: kernel NULL pointer dereference, address: 0000000000000000
  RIP: 0010:fb_destroy_modelist+0x10/0x80
  Call Trace:
   s3_pci_probe.cold+0x12b/0x2bf [s3fb]
   local_pci_probe+0x41/0x80
   pci_device_probe+0xc3/0x240
   really_probe+0xde/0x380
   __driver_probe_device+0x84/0x150
   driver_probe_device+0x1f/0x90
   __driver_attach+0xce/0x1c0
   bus_for_each_dev+0x87/0xd0
   bus_add_driver+0x1ae/0x200
   driver_register+0x89/0xe0
   do_one_initcall+0x59/0x220
   do_init_module+0x4a/0x1f0

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

(As written by CVE List.)

## Affected

- Linux Linux: from d3776b1bf9c100873c7365bd31a67ed6caacbd82 before 0ac836741b782fe2b463478f7e61e3a2459c72fe; from ccf073cd4a2f783adc40b04db3805dbddaaf9f31 before aeb9ab8009b5c4f44c8aa06033586d3b4cb4a052; from aebdbe61b3960cd22b8bb6e70e3d94fb3bbb202c before 5ba5a7d6cffc85f6e2ec94d3f2b422e8fe74c222; from e1ecbaeec5fbf0b0e2d5810ec574f762d148771e before e43f63fce2a9e01a99885ffced90f40529aa86f1; from 3c0cf89b74e7b8ebc21a1542937c8e912d19f22b before 06f03a1313b8e9673761e2521219cc31228df4c1; from 146b708bc75f1e6cf70df31195632c9946cb70fd before e138768e628bd18f0b7c769b102b1317e9614796; from 6fcca16a2b19c37f60693c56cbc0c923364ff3ef before 439dcd4dce386c304fa7c1b56635195366c843a2; from 6fcca16a2b19c37f60693c56cbc0c923364ff3ef before 0c9cb9321cb3863b52bdea4b8ae5a27705762c9e; 97b6c3f6e82a526d95dcfbfcf1c42ba44c61c3d6; 6069044e74b7510bf2f034ccd049bc962fb9c765; b51990be8411335c263b51e9f4def1e84bfaa923; d21e6747f3f68dcce59b5d2205f98633d28f69eb; and 33 more (not affected: before 7.2; from 5.10.275 up to 5.10.*; from 5.15.226 up to 5.15.*; from 6.1.193 up to 6.1.*; from 6.6.163 up to 6.6.*; from 6.12.118 up to 6.12.*; from 6.18.64 up to 6.18.*; from 7.3.4 up to 7.3.*; from 7.4-rc1 up to *)

## References

- <https://git.kernel.org/stable/c/0ac836741b782fe2b463478f7e61e3a2459c72fe>
- <https://git.kernel.org/stable/c/aeb9ab8009b5c4f44c8aa06033586d3b4cb4a052>
- <https://git.kernel.org/stable/c/5ba5a7d6cffc85f6e2ec94d3f2b422e8fe74c222>
- <https://git.kernel.org/stable/c/e43f63fce2a9e01a99885ffced90f40529aa86f1>
- <https://git.kernel.org/stable/c/06f03a1313b8e9673761e2521219cc31228df4c1>
- <https://git.kernel.org/stable/c/e138768e628bd18f0b7c769b102b1317e9614796>
- <https://git.kernel.org/stable/c/439dcd4dce386c304fa7c1b56635195366c843a2>
- <https://git.kernel.org/stable/c/0c9cb9321cb3863b52bdea4b8ae5a27705762c9e>

## Sources

- CVE List: [CVE-2026-138825](https://www.cve.org/CVERecord?id=CVE-2026-138825), CVE Terms of Use, modified 2026-11-30
- NVD: [CVE-2026-138825](https://nvd.nist.gov/vuln/detail/CVE-2026-138825), Public domain, modified 2026-11-30

---

Page: https://cve.day/CVE-2026-138825 · Whole record: https://cve.day/CVE-2026-138825.json · Rebuilt by cve.day 2026-11-30T14:32:32.254Z
