{"id":"CVE-2026-138825","summary":"fbdev: core: Initialize modelist in framebuffer_alloc()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nfbdev: core: Initialize modelist in framebuffer_alloc()\n\nframebuffer_alloc() returns zeroed memory, so info-\u003emodelist starts out\nwith NULL next and prev pointers. The list head is initialized only\nlater, by fb_videomode_to_modelist() or by do_register_framebuffer().\n\nThe \"fix potential memory leak\" commits listed below added\nfb_destroy_modelist(&info-\u003emodelist) to the probe error paths of s3fb,\ntdfxfb, tridentfb, i740fb and carminefb. These paths can run before\nthe list head is initialized:\n\n - s3fb, tdfxfb, tridentfb and i740fb call fb_videomode_to_modelist()\n   only after a successful EDID read, and tridentfb can also hit the\n   error path on an ioremap() or kmalloc() failure before that;\n - carminefb jumps to the error path when fb_find_mode() fails, before\n   its fb_videomode_to_modelist() call.\n\nfb_destroy_modelist() then dereferences the NULL head. Reproduced on\nDebian 12 (6.1.180) by binding s3fb to a VGA device without EDID and\nforcing fb_alloc_cmap() to fail:\n\n  s3fb 0000:00:03.0: cannot allocate colormap\n  BUG: kernel NULL pointer dereference, address: 0000000000000000\n  RIP: 0010:fb_destroy_modelist+0x10/0x80\n  Call Trace:\n   s3_pci_probe.cold+0x12b/0x2bf [s3fb]\n   local_pci_probe+0x41/0x80\n   pci_device_probe+0xc3/0x240\n   really_probe+0xde/0x380\n   __driver_probe_device+0x84/0x150\n   driver_probe_device+0x1f/0x90\n   __driver_attach+0xce/0x1c0\n   bus_for_each_dev+0x87/0xd0\n   bus_add_driver+0x1ae/0x200\n   driver_register+0x89/0xe0\n   do_one_initcall+0x59/0x220\n   do_init_module+0x4a/0x1f0\n\nInitialize the list head in framebuffer_alloc(), so info-\u003emodelist is\nalways a valid, possibly empty, list and fb_destroy_modelist() is safe\non every error path. Keep the lazy initialization in\ndo_register_framebuffer(), as drivers that embed struct fb_info rather\nthan calling framebuffer_alloc() still depend on it.","modified":"2026-12-01T21:02:35.468915036Z","published":"2026-11-30T13:25:20.178Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138825.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/06f03a1313b8e9673761e2521219cc31228df4c1"},{"type":"WEB","url":"https://git.kernel.org/stable/c/0ac836741b782fe2b463478f7e61e3a2459c72fe"},{"type":"WEB","url":"https://git.kernel.org/stable/c/0c9cb9321cb3863b52bdea4b8ae5a27705762c9e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/439dcd4dce386c304fa7c1b56635195366c843a2"},{"type":"WEB","url":"https://git.kernel.org/stable/c/5ba5a7d6cffc85f6e2ec94d3f2b422e8fe74c222"},{"type":"WEB","url":"https://git.kernel.org/stable/c/aeb9ab8009b5c4f44c8aa06033586d3b4cb4a052"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e138768e628bd18f0b7c769b102b1317e9614796"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e43f63fce2a9e01a99885ffced90f40529aa86f1"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138825.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138825"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"d3776b1bf9c100873c7365bd31a67ed6caacbd82"},{"fixed":"0ac836741b782fe2b463478f7e61e3a2459c72fe"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"ccf073cd4a2f783adc40b04db3805dbddaaf9f31"},{"fixed":"aeb9ab8009b5c4f44c8aa06033586d3b4cb4a052"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"aebdbe61b3960cd22b8bb6e70e3d94fb3bbb202c"},{"fixed":"5ba5a7d6cffc85f6e2ec94d3f2b422e8fe74c222"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"e1ecbaeec5fbf0b0e2d5810ec574f762d148771e"},{"fixed":"e43f63fce2a9e01a99885ffced90f40529aa86f1"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"3c0cf89b74e7b8ebc21a1542937c8e912d19f22b"},{"fixed":"06f03a1313b8e9673761e2521219cc31228df4c1"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"146b708bc75f1e6cf70df31195632c9946cb70fd"},{"fixed":"e138768e628bd18f0b7c769b102b1317e9614796"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"6fcca16a2b19c37f60693c56cbc0c923364ff3ef"},{"fixed":"439dcd4dce386c304fa7c1b56635195366c843a2"},{"fixed":"0c9cb9321cb3863b52bdea4b8ae5a27705762c9e"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"97b6c3f6e82a526d95dcfbfcf1c42ba44c61c3d6"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"6069044e74b7510bf2f034ccd049bc962fb9c765"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"b51990be8411335c263b51e9f4def1e84bfaa923"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"d21e6747f3f68dcce59b5d2205f98633d28f69eb"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"bcc43b2f7410eddb21f73e9a650499a6432c9383"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"d81860691e4cfa14d596136ea2727f244e9e5950"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"dae8f6ddc35cb1673dba32d2fd8f1f85cd377adf"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"2ede8fa708235c81ab18de14077f1a458bec7e22"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"37f4b8bd9e3835a7d4da26baf80b497e478d3123"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"ef6c5e4607483259a0daf6584e9e34ef643a655d"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"fc90ec978a3cef6f6d8c6074bee538998c7c9837"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"0d0fa8425b29657b3d3e5bb36f50a50e57c8101f"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"25b354f74b028a3f91b12e6b446256965744c477"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"ad54698255a4b988cae1ad908c158c1d4128887c"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"56964e8039150a14462005458b25f19d6cad8f4a"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"237611edf15172e4dc7fa9b3b71c2445602d3459"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"2199d70efc5bea0e9b4462a4f9e4c3d3c21c5d34"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"b039e0693df003c5baa1e89630344f92a78afb15"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"dfbb1a695d8891774c80c0e2a9192afb66469eb7"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"b7b26adc2718ca8f81ca75cd03aee94269d00e8a"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"e1ca9b8559e0f5959228626bdeaae530a1ee0337"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"2fd16a94bea5e0c3e93791436cf8a800b175762a"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"868432039a3fd7c2c0d515e48f33d5e43391666c"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"089d149ccd7c3ac3d5e14ac65e558dcd9ec27583"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"de9cf16e39c0378716e9764fc0fbb6d4b45a1ee1"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"8d16e5bc78478176621cac0f4c381136d3c92c5f"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"5bdb6f11ad0398b11a3ae4d9104035f9dc628cdc"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"4ebe2c3a7db6332aab3655f8c552ca387c1dc199"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"2efd9797331a559b93ab888f451838f87bd6dfa3"}]}],"versions":["v5.10.274","v5.10.273","v5.10.272","v5.10.271","v5.10.270","v5.10.269","v5.10.268","v5.10.267","v5.10.266","v5.10.265","v5.10.264","v5.10.263","v5.10.262","v5.10.261","v5.15.225","v5.15.224","v5.15.223","v5.15.222","v5.15.221","v5.15.220","v5.15.219","v5.15.218","v5.15.217","v5.15.216","v5.15.215","v5.15.214","v5.15.213","v5.15.212","v6.1.192","v6.1.191","v6.1.190","v6.1.189","v6.1.188","v6.1.187","v6.1.186","v6.1.185","v6.1.184","v6.1.183","v6.1.182","v6.1.181","v6.1.180","v6.1.179","v6.1.178","v6.6.162","v6.6.161","v6.6.160","v6.6.159","v6.6.158","v6.6.157","v6.6.156","v6.6.155","v6.6.154","v6.6.153","v6.6.152","v6.6.151","v6.6.150","v6.6.149","v6.6.148","v6.6.147","v6.6.146","v6.6.145","v6.12.117","v6.12.116","v6.12.115","v6.12.114","v6.12.113","v6.12.112","v6.12.111","v6.12.110","v6.12.109","v6.12.108","v6.12.107","v6.12.106","v6.12.105","v6.12.104","v6.12.103","v6.12.102","v6.12.101","v6.12.100","v6.12.99","v6.12.98","v6.12.97","v6.18.63","v6.18.62","v6.18.61","v6.18.60","v6.18.59","v6.18.58","v6.18.57","v6.18.56","v6.18.55","v6.18.54","v6.18.53","v6.18.52","v6.18.51","v6.18.50","v6.18.49","v6.18.48","v6.18.47","v6.18.46","v6.18.45","v6.18.44","v6.18.43","v6.18.42","v6.18.41","v6.18.40","v5.10.276","v5.10.275","v5.15.227","v5.15.226","v6.1.193","v6.6.163","v6.12.120","v6.12.119","v6.12.118","v6.18.66","v6.18.65","v6.18.64","v7.1.13","v7.1.12","v7.1.11","v7.1.10","v7.1.9","v7.1.8","v7.1.7","v7.1.6","v7.1.5"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-138825.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.10.261"},{"fixed":"5.10.275"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.15.212"},{"fixed":"5.15.226"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.1.178"},{"fixed":"6.1.193"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.6.145"},{"fixed":"6.6.163"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.12.97"},{"fixed":"6.12.118"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.18.40"},{"fixed":"6.18.64"}]},{"type":"ECOSYSTEM","events":[{"introduced":"7.1.5"},{"fixed":"7.2"}]},{"type":"ECOSYSTEM","events":[{"introduced":"7.2.0"},{"fixed":"7.3.4"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-138825.json"}}],"schema_version":"1.9.2"}