diff options
| author | Hayzam Sherif <hayzam@gmail.com> | 2026-11-04 19:40:56 +0000 |
|---|---|---|
| committer | Mark Johnston <markj@FreeBSD.org> | 2026-11-04 19:41:16 +0000 |
| commit | 1cd9aa5cbb02434242fd8f3beff78983ac71061a (patch) | |
| tree | fb91399512cbd97d16c72b5a344b2dd150b97f91 /sys/dev/usb/serial/uvscom.c | |
| parent | 0857b57787cb2bdd2bb123b12638ea5e4c10eabd (diff) | |
When VBE is unavailable, vbe_init() frees the controller information
buffer and sets vbe to NULL. Console initialization still calls
vbe_default_mode(), which reaches an unguarded memset() in
vbe_find_mode_xydm(). Under BTX, the null write can overwrite the
loader's own code and cause a later protection fault.
Guard vbe_default_mode() with vbe_check(), as the other public
functions in vbe.c already do, and return 0 to indicate that no
graphics mode is available. This allows console initialization to
continue on headless systems.
Reviewed by: rmoeller, imp
MFC ater: 2 weeks
Differential Revision: https://reviews.freebsd.org/D61145
Diffstat (limited to 'sys/dev/usb/serial/uvscom.c')
0 files changed, 0 insertions, 0 deletions
