netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Laight <david.laight.linux@gmail.com>
To: Syed Tayyab Farooq <syedtayyabfarooq08@gmail.com>
Cc: netdev@vger.kernel.org,
	syzbot+0e665e4b99cb925286a0@syzkaller.appspotmail.com,
	Syed Tayyab Farooq <tayyabfarooq1997@outlook.com>
Subject: Re: [PATCH] memset skb to zero to avoid uninit value error from KMSAN
Date: Sun, 7 Dec 2025 17:54:42 +0000	[thread overview]
Message-ID: <20251207175442.7d5ea387@pumpkin> (raw)
In-Reply-To: <20251207162109.113159-1-tayyabfarooq1997@outlook.com>

On Mon,  8 Dec 2025 00:20:52 +0800
Syed Tayyab Farooq <syedtayyabfarooq08@gmail.com> wrote:

> Signed-off-by: Syed Tayyab Farooq <tayyabfarooq1997@outlook.com>
> ---
> 
> Hi syzbot,
> 
> Please test this patch.
> 
> #syz test: https://syzkaller.appspot.com/bug?extid=0e665e4b99cb925286a0
> 
> 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);

That looks entirely broken.
Did you try running it?

	David


> +
>  	if (phonet_address_lookup(dev_net(dev), pn_addr(dst)) == 0)
>  		skb->pkt_type = PACKET_LOOPBACK;
>  


      parent reply	other threads:[~2025-12-07 17:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-07 16:20 [PATCH] memset skb to zero to avoid uninit value error from KMSAN Syed Tayyab Farooq
2025-12-07 16:21 ` syzbot
2025-12-07 17:54 ` David Laight [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251207175442.7d5ea387@pumpkin \
    --to=david.laight.linux@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=syedtayyabfarooq08@gmail.com \
    --cc=syzbot+0e665e4b99cb925286a0@syzkaller.appspotmail.com \
    --cc=tayyabfarooq1997@outlook.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).