Thread View: linux.kernel.netdev
1 messages
1 total messages
Started by Andrew Lunn
Wed, 21 Oct 2026 17:26
Re: [PATCH net v3 3/3] net: fealnx: bound card_idx to prevent out-of-bounds access
Author: Andrew Lunn
Date: Wed, 21 Oct 2026 17:26
Date: Wed, 21 Oct 2026 17:26
21 lines
9610 bytes
9610 bytes
> > + if (card_idx >= MAX_CARD_IDX) {
> > + dev_err(&pdev->dev, "card_idx is too big %d, aborting",
> > card_idx);
> > + return -ENODEV;
> > + }
> > card_idx++;
> card_idx can reach 100000 is it ok?
It is one of those stupid LLM issues which never happens, but
$DEVELOPER wants to fix it anyway.
If you unbind and bind the device lots, you can eventually get
card_idx to overflow. Assuming card_idx is a 32 bit int, and it takes
10ms to unbind/bind, you could make it overflow in about 18 months.
100,000 iterations makes it around 16 hours, which is feasible, so i
hope the submitted has tested it. But probably not, it is just
pointless LLM churn wasting all our time.
Andrew
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads