[PATCH net-next 1/3] net: selftests: use skb_share_check() in the loopback receive hook

Nicolai Buchwitz nb at tipi-net.de
Thu Oct 15 01:01:41 PDT 2026


Hi Maxime

On 15.10.2026 09:46, Maxime Chevallier wrote:

> [...]

>>> Could an IPv4 frame that arrives during ethtool -t make the hook read 
>>> up
>>> to about 64 bytes past skb->tail? Examples would be a minimum-size 
>>> TCP
>>> segment or a frame with ihl=15.
>>> 
>>> The over-read seems to stay inside the skb head allocation, because
>>> skb_shared_info follows skb->end. If so, the only effect is a 
>>> possibly
>>> wrong selftest result.
>> 
>> The length check is pre-existing, will address that in a follow-up 
>> patch.
> 
> I'm unsure about this, Can we instead assume that when one is running 
> the
> "ethtool -t" selftests on a machine, they are doing so in some 
> controlled
> conditions ?
> 
> IOW can we take the assumption that we won't get incoming traffic at 
> the same
> time as we run the selftests, and if we do get some and that triggers a 
> wrong
> result, this is expected ? ethtool selftests are very cheap to run, 
> only a
> handful of seconds, and don't require any extra dependency, it doesn't 
> cost
> much to re-run them if something unexpected happens during them.
> 
> ofc. getting a stray frame during the selftests mustn't crash :)
> 
> That's my take on these tests, but feel free to disagree :)

Also fine with me. A stray frame just fails the magic check and gets
dropped anyway, so the test result doesn't even change...

Two patches less to fight with Clashiko over :)

Regards
Nicolai



More information about the linux-arm-kernel mailing list