All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rolf Eike Beer <eike-kernel@sf-tec.de>
To: jeandelu@tutamail.com
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
	Linux Parisc <linux-parisc@vger.kernel.org>,
	Helge Deller <deller@gmx.de>
Subject: Re: [PATCH] parisc: eisa_enumerator: Fix out-of-bounds reads of the EEPROM buffer
Date: Sun, 23 Aug 2026 21:26:08 +0200	[thread overview]
Message-ID: <2531343.FHFDcahYGt@eto.sf-tec.de> (raw)
In-Reply-To: <OzWfYcD--F-9@tutamail.com>

[-- Attachment #1: Type: text/plain, Size: 555 bytes --]

> @@ -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 #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

      parent reply	other threads:[~2026-08-23 19:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-08 14:02 [PATCH] parisc: eisa_enumerator: Fix out-of-bounds reads of the EEPROM buffer jeandelu
2026-08-08 15:37 ` Helge Deller
2026-08-23 19:26 ` Rolf Eike Beer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2531343.FHFDcahYGt@eto.sf-tec.de \
    --to=eike-kernel@sf-tec.de \
    --cc=deller@gmx.de \
    --cc=jeandelu@tutamail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.