Re: [PATCH] memset skb to zero to avoid uninit value error from KMSAN
From: syzbot
Date: Sun Dec 07 2025 - 11:21:22 EST
> Signed-off-by: Syed Tayyab Farooq <tayyabfarooq1997@xxxxxxxxxxx>
> ---
>
> Hi syzbot,
>
> Please test this patch.
>
> #syz test: https://syzkaller.appspot.com/bug?extid=0e665e4b99cb925286a0
This crash does not have a reproducer. I cannot test it.
>
> Thanks,
> Tayyab
>
>
> net/phonet/af_phonet.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c
> index a27efa4faa4e..9279decd680b 100644
> --- a/net/phonet/af_phonet.c
> +++ b/net/phonet/af_phonet.c
> @@ -208,6 +208,8 @@ static int pn_raw_send(const void *data, int len, struct net_device *dev,
> if (skb == NULL)
> return -ENOMEM;
>
> + memset(skb, 0, MAX_PHONET_HEADER + len);
> +
> if (phonet_address_lookup(dev_net(dev), pn_addr(dst)) == 0)
> skb->pkt_type = PACKET_LOOPBACK;
>
> --
> 2.43.0
>