Re: [PATCH] net/netrom: fix uninit-value in nr_route_frame

From: Eric Dumazet
Date: Mon Mar 04 2024 - 00:12:36 EST


On Mon, Mar 4, 2024 at 6:05 AM Edward Adam Davis <eadavis@xxxxxx> wrote:
>
> [Syzbot reported]
>
> [Fix]
> Let's clear all skb data at alloc time.
>
> Reported-and-tested-by: syzbot+f770ce3566e60e5573ac@syzkaller.appspotmailcom
> Signed-off-by: Edward Adam Davis <eadavis@xxxxxx>
> ---
> net/core/skbuff.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/core/skbuff.c b/net/core/skbuff.c
> index edbbef563d4d..5ca5a608daec 100644
> --- a/net/core/skbuff.c
> +++ b/net/core/skbuff.c
> @@ -656,6 +656,7 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,
> * to allow max possible filling before reallocation.
> */
> prefetchw(data + SKB_WITH_OVERHEAD(size));
> + memset(data, 0, size);


We are not going to accept such a change, for obvious performance reasons.

Instead, please fix net/netrom/nr_route.c

Thank you.