From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: Andrew Lunn <andrew@lunn.ch>, Steffen Jaeckel <sjaeckel@suse.de>
Cc: <cve@kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-cve-announce@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@kernel.org>,
Vitaly Lifshits <vitaly.lifshits@intel.com>,
<dima.ruinskiy@intel.com>, Mikael Wessel <post@mikaelkw.online>,
Mor Bar-Gabay <morx.bar.gabay@intel.com>, <davem@davemloft.net>,
<kuba@kernel.org>, <pabeni@redhat.com>, <edumazet@google.com>,
<andrew+netdev@lunn.ch>
Subject: Re: CVE-2025-39898: e1000e: fix heap overflow in e1000_set_eeprom
Date: Tue, 28 Oct 2025 11:14:30 -0700 [thread overview]
Message-ID: <0ec765e1-1bbd-4a7d-baf6-0163b64fd9a3@intel.com> (raw)
In-Reply-To: <a42d374f-22e8-466f-a7a5-ef1d51ef6635@lunn.ch>
On 10/27/2025 2:46 PM, Andrew Lunn wrote:
>> we believe that this CVE is invalid since the sole caller is
>> `net/ethtool/ioctl.c:ethtool_set_eeprom()`, which already does all the
>> necessary checks before invoking a driver specific implementation.
>
> It is either invalid, or the fix is only fixing e1000, and very
> likely, the same issue exists in lots of other drivers, so the fix is
> wrong and should be done somewhere else...
>
> This fix adds to the e1000e driver:
>
> + if (check_add_overflow(eeprom->offset, eeprom->len, &total_len) ||
> + total_len > max_len)
> + return -EFBIG;
>
> In the core, ethtool_set_eeprom() we have:
>
> /* Check for wrap and zero */
> if (eeprom.offset + eeprom.len <= eeprom.offset)
> return -EINVAL;
>
> /* Check for exceeding total eeprom len */
> if (eeprom.offset + eeprom.len > ops->get_eeprom_len(dev))
> return -EINVAL;
>
> Are they equivalent? Is the core broken?
The checks in ethtool_set_eeprom() look to be equivalent to what we were
adding to e1000e so I think core checks are sufficient, and the e1000e
ones, unneeded.
Thanks,
Tony
>
> I will leave it to somebody who understands wraparound to decide.
>
> Andrew
prev parent reply other threads:[~2025-10-28 18:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-01 7:43 CVE-2025-39898: e1000e: fix heap overflow in e1000_set_eeprom Greg Kroah-Hartman
2025-10-24 10:53 ` Steffen Jaeckel
2025-10-24 11:26 ` Greg Kroah-Hartman
2025-10-24 17:04 ` Tony Nguyen
2025-10-24 12:27 ` David Laight
2025-10-24 12:40 ` Greg Kroah-Hartman
2025-10-24 14:11 ` David Laight
2025-10-27 21:46 ` Andrew Lunn
2025-10-28 18:14 ` Tony Nguyen [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=0ec765e1-1bbd-4a7d-baf6-0163b64fd9a3@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=cve@kernel.org \
--cc=davem@davemloft.net \
--cc=dima.ruinskiy@intel.com \
--cc=edumazet@google.com \
--cc=gregkh@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-cve-announce@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=morx.bar.gabay@intel.com \
--cc=pabeni@redhat.com \
--cc=post@mikaelkw.online \
--cc=sjaeckel@suse.de \
--cc=vitaly.lifshits@intel.com \
/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.