UBUNTU-CVE-2026-99305: Use After Free
In the Linux kernel, the following vulnerability has been resolved: fbdev: udlfb: don't rebuild the mode list while the framebuffer is in use dlfbsetupmodes() frees info->modelist with fbdestroymodelist() and rebuilds it, but fbcon holds raw pointers into that list in fbdisplay[i].mode and nothing un-publishes them the way dounregisterframebuffer() and storemodes() do with fbcondeletemodelist(). The function does refuse to install a new mode while the framebuffer has users (dlfb->fbcount != 0), but only after the list is already destroyed. Reached from the 0666 "edid" sysfs attribute, an unprivileged write to /sys/class/graphics/fb0/edid therefore fails with -EINVAL and still leaves every fbdisplay[i].mode dangling; the next console switch reads the freed fbvideomode in fbvideomodetovar(). Test fbcount before touching the list. fbcon takes a reference through fbconopen(), so that condition covers exactly the states in which fbdisplay[] points into the list, and the errno returned to userspace is unchanged. BUG: KASAN: slab-use-after-free in fbvideomodetovar (drivers/video/fbdev/core/modedb.c:905) Read of size 4 at addr ffff8880107b449c by task kworker/1:1/47 Workqueue: events consolecallback Call Trace: fbvideomodetovar (drivers/video/fbdev/core/modedb.c:905) displaytovar (drivers/video/fbdev/core/fbcon.c:998) fbconswitch (drivers/video/fbdev/core/fbcon.c:2182) redrawscreen (drivers/tty/vt/vt.c:994) completechangeconsole (drivers/tty/vt/vtioctl.c:1141) consolecallback (drivers/tty/vt/vt.c:3358) processonework (kernel/workqueue.c:3396) workerthread (kernel/workqueue.c:3479 kernel/workqueue.c:3560) kthread (kernel/kthread.c:436) retfromfork (arch/x86/kernel/process.c:158) retfromforkasm (arch/x86/entry/entry64.S:245) ... The buggy address is located 28 bytes inside of freed 96-byte region [ffff8880107b4480, ffff8880107b44e0)
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In fbdev udlfb, test dlfb->fb_count before touching or rebuilding info->modelist in dlfb_setup_modes().
Event History
Frequently Asked Questions
Who can trigger the issue?
A local unprivileged user can write to the world-writable edid sysfs attribute at /sys/class/graphics/fb0/edid. Exploitation also requires the affected framebuffer to be in use, indicated by a nonzero framebuffer user count.
What event causes the use-after-free to be dereferenced after the write?
The write can leave fbcon display-mode pointers dangling even though the write returns -EINVAL. A subsequent console switch can dereference the freed mode data in fb_videomode_to_var().
Which Ubuntu kernel packages are listed as affected?
The listed packages are ubuntu/linux, ubuntu/linux-fips, ubuntu/linux-aws, ubuntu/linux-azure, ubuntu/linux-gcp, ubuntu/linux-oracle, ubuntu/linux-aws-fips, and ubuntu/linux-azure-fips.
What can be done before a fix is deployed?
Avoid writes to /sys/class/graphics/fb0/edid while the framebuffer is in use, particularly on systems where console switching may occur afterward. The vulnerable edid attribute is mode 0666, so access to that interface should be controlled where possible.
How might an existing trigger be identified?
Kernel diagnostics may report a KASAN slab use-after-free in fb_videomode_to_var(), involving a read from freed fb_videomode data. The fault may occur during a console switch after an edid write that returned -EINVAL.