[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iJKZCfsNzM8D=JQqQ=vyaun38oXfcC77AC6BTC0MWvUog@mail.gmail.com>
Date: Fri, 5 Sep 2025 03:47:02 -0700
From: Eric Dumazet <edumazet@...gle.com>
To: Stanislav Fort <stanislav.fort@...le.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, kuba@...nel.org,
pabeni@...hat.com, horms@...nel.org, linux-hams@...r.kernel.org,
linux-kernel@...r.kernel.org, security@...nel.org,
Stanislav Fort <disclosure@...le.com>
Subject: Re: [PATCH net v3] netrom: linearize and validate lengths in nr_rx_frame()
On Wed, Sep 3, 2025 at 11:19 AM Stanislav Fort <stanislav.fort@...le.com> wrote:
>
> Linearize skb and add targeted length checks in nr_rx_frame() to avoid out-of-bounds reads and potential use-after-free when processing malformed NET/ROM frames.
>
> - Linearize skb and require at least NR_NETWORK_LEN + NR_TRANSPORT_LEN (20 bytes) before reading network/transport fields.
> - For existing sockets path, ensure NR_CONNACK includes the window byte (>= 21 bytes).
> - For CONNREQ handling, ensure window (byte 20) and user address (bytes 21-27) are present (>= 28 bytes).
> - Maintain existing BPQ extension handling:
> - NR_CONNACK len == 22 implies 1 extra byte (TTL)
> - NR_CONNREQ len == 37 implies 2 extra bytes (timeout)
>
> Suggested-by: Eric Dumazet <edumazet@...gle.com>
> Reported-by: Stanislav Fort <disclosure@...le.com>
> Signed-off-by: Stanislav Fort <disclosure@...le.com>
> ---
Reviewed-by: Eric Dumazet <edumazet@...gle.com>
Powered by blists - more mailing lists