Thread (7 messages) 7 messages, 3 authors, 4d ago

Re: [PATCH net] e1000e: Fix out-of-bounds MMIO access by validating BAR0 size

From: Breno Leitao <leitao@debian.org>
Date: 2026-07-20 12:54:01
Also in: lkml

On Mon, Jul 20, 2026 at 07:56:20PM +0800, Pu Lehui wrote:
On 2026/7/20 17:47, Breno Leitao wrote:
quoted
On Wed, Jul 15, 2026 at 03:58:50AM +0000, Pu Lehui wrote:
quoted
+/* Minimum MMIO (BAR0) len, the largest offset is lower than 64K */
Why "the largest" in this case?
Hi Breno,

Thanks for pointing that out. I meant the maximum register offset accessed
by the driver.

IIUC, common e1000e NIC usually have a 128K BAR0. But since I'm not 100%
sure if older NIC might be smaller, I picked 64K as a safe lower limit
because it covers the largest register offset used in the driver's codebase.
If my assumption here is off, I'd really appreciate any corrections!

And for this comment, how about the follow?
/* Minimum MMIO (BAR0) length to safely cover the maximum register offset
accessed by the driver */
Thanks, Would something like this be a bit better?

     /* 
      * Smallest BAR0 that covers every register the driver accesses
      */
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help