Re: [PATCH] parisc: eisa_enumerator: Fix out-of-bounds reads of the EEPROM buffer
From: Rolf Eike Beer
Date: Sun Aug 23 2026 - 15:26:25 EST
> @@ -491,6 +492,13 @@ int eisa_enumerator(unsigned long eeprom_addr,
> printk(KERN_INFO "Enumerating EISA bus\n");
>
> eh = (struct eeprom_header*)(eeprom_buf);
> + /*
> + * The EEPROM contents are not to be trusted: clamp the number of
> + * slots so that all slot records fit into eeprom_buf.
> + */
> + eh->num_slots = min_t(u8, eh->num_slots,
> + (HPEE_MAX_LENGTH - sizeof(*eh)) /
> + sizeof(struct eeprom_eisa_slot_info));
I wonder if that should write out any sort of warning message about a broken
EEPROM here.
Greetings,
Eike
Attachment:
signature.asc
Description: This is a digitally signed message part.