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