⬢ DragonFlyBSD Kernel Audit
DF-5198 / fix.diff
← back to finding ↓ download raw
--- a/sys/dev/misc/syscons/fire/fire_saver.c	2026-10-01 00:27:46.404506175 +0000
+++ b/sys/dev/misc/syscons/fire/fire_saver.c	2026-10-01 00:27:46.416506021 +0000
@@ -66,7 +66,16 @@
 	    int             red, green, blue;
 	    int             palette_index;
 
-	    set_video_mode(adp, M_VGA_CG320);
+	    if (set_video_mode(adp, M_VGA_CG320) != 0) {
+		/*
+		 * Mode switch failed: va_window would still alias the
+		 * 32KB text aperture and the 64000-byte blit below (and
+		 * every later tick) would run past it. Bail out; syscons
+		 * treats the error like any other failed LKM saver
+		 * (scsplash_saver marks SC_SAVER_FAILED and restores).
+		 */
+		return (ENODEV);
+	    }
 
 	    /* build and load palette */
 	    red = green = blue = 0;