⬢ DragonFlyBSD Kernel Audit
DF-3944 / run.log
← back to finding ↓ download raw
== DF-3944: gamut packet checksum OOB read, dead-path check ==
-- the vulnerable loop (dc_resource.c):
2152:		ptr = &gamut_packet->sb[3];
2153-
2154-		for (i = 0; i <= gamut_packet->sb[1]; i++)
2155-			chk_sum += ptr[i];
2156-

-- dc_info_packet sb size:
524:struct dc_info_packet {
525-	bool valid;
526-	uint8_t hb0;
527-	uint8_t hb1;
528-	uint8_t hb2;
529-	uint8_t hb3;
530-	uint8_t sb[32];
531-};

-- any in-tree write that sets encoder_info_frame.gamut valid (dead-path proof):
771:		dce110_update_hdmi_info_packet(enc110, 1, &info_frame->gamut);
784:		dce110_update_hdmi_info_packet(enc110, 2, &info_frame->gamut);
       0
-- the only assignment to info->gamut.valid is false in resource_build_info_frame:
2623-	/* default all packets to invalid */
2624-	info->avi.valid = false;
2625:	info->gamut.valid = false;
2626-	info->vendor.valid = false;
2627-	info->spd.valid = false;