⬢ DragonFlyBSD Kernel Audit
DF-4377 / fix.diff
← back to finding ↓ download raw
--- a/sys/dev/video/bktr/bktr_card.c
+++ b/sys/dev/video/bktr/bktr_card.c
@@ -606,6 +606,11 @@
 	int 		tuner_i2c_address = -1;
 	int 		eeprom_i2c_address = -1;
 
+	/* DF-4377: readEEProm() may fail without touching (all of) the
+	 * buffer and every call site below ignores its return value; zero
+	 * it so a failed read cannot consume or print uninitialized stack. */
+	memset(eeprom, 0, sizeof(eeprom));
+
 	/* Select all GPIO bits as inputs */
 	OUTL(bktr, BKTR_GPIO_OUT_EN, 0);
 	if (bootverbose)