Subject: Re: [PATCH net] netrom: do some basic forms of validation on incoming frames

From: Simon Horman <[email-masked]>
Date: Thu, 9 Apr 2026 20:03:28 +0100

On Tue, Apr 07, 2026 at 10:45:31AM +0200, Greg Kroah-Hartman wrote:
> There is a lack of much validation of frame size coming from a
> netrom-based device.  While these devices are "trusted" doing some
> sanity checks is good to at least keep the fuzzing tools happy when they
> stumble across this ancient protocol and light up with a range of bug
> reports.
> 
> Cc: "David S. Miller" <[email-masked]>
> Cc: Eric Dumazet <[email-masked]>
> Cc: Jakub Kicinski <[email-masked]>
> Cc: Paolo Abeni <[email-masked]>
> Cc: Simon Horman <[email-masked]>
> Cc: [email-masked]
> Assisted-by: gregkh_clanker_2000
> Reviewed-by: Yizhe Zhuang <[email-masked]>
> Cc: stable <[email-masked]>
> Signed-off-by: Greg Kroah-Hartman <[email-masked]>

Hi Greg 2000!

I expect that checking skb->len isn't sufficient here
and pskb_may_pull needs to be used to ensure that
the data is also available in the linear section of the skb.

Also, although I'm all for incremental enhancements,
I do suspect that similar problems exist in the call
chain of these functions.

...