netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kuniyuki Iwashima <kuni1840@gmail.com>
To: syzbot+1d3c235276f62963e93a@syzkaller.appspotmail.com
Cc: 3chas3@gmail.com, kuni1840@gmail.com, kuniyu@google.com,
	linux-atm-general@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [atm?] KMSAN: uninit-value in atmtcp_c_send
Date: Thu, 12 Jun 2025 20:00:38 -0700	[thread overview]
Message-ID: <20250613030043.226990-1-kuni1840@gmail.com> (raw)
In-Reply-To: <684b8f83.a00a0220.279073.0008.GAE@google.com>

From: syzbot <syzbot+1d3c235276f62963e93a@syzkaller.appspotmail.com>
Date: Thu, 12 Jun 2025 19:40:03 -0700
> Hello,
> 
> syzbot tried to test the proposed patch but the build/boot failed:
> 
> drivers/atm/atmtcp.c:293:24: error: use of undeclared identifier 'atmtcp_hdr'; did you mean 'atm_tcp_ops'?

Oops, I forgot struct :/

#syz test

diff --git a/drivers/atm/atmtcp.c b/drivers/atm/atmtcp.c
index d4aa0f353b6c..96c0969ce584 100644
--- a/drivers/atm/atmtcp.c
+++ b/drivers/atm/atmtcp.c
@@ -288,7 +288,11 @@ static int atmtcp_c_send(struct atm_vcc *vcc,struct sk_buff *skb)
 	struct sk_buff *new_skb;
 	int result = 0;
 
-	if (!skb->len) return 0;
+	if (!skb->len)
+		return 0;
+	if (skb->len < sizeof(struct atmtcp_hdr))
+		return -EINVAL;
+
 	dev = vcc->dev_data;
 	hdr = (struct atmtcp_hdr *) skb->data;
 	if (hdr->length == ATMTCP_HDR_MAGIC) {

  reply	other threads:[~2025-06-13  3:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-12 23:41 [syzbot] [atm?] KMSAN: uninit-value in atmtcp_c_send syzbot
2025-06-12 23:49 ` Kuniyuki Iwashima
2025-06-13  2:40   ` syzbot
2025-06-13  3:00     ` Kuniyuki Iwashima [this message]
2025-06-13  3:48       ` syzbot
2025-06-13  4:24         ` Kuniyuki Iwashima
2025-06-13  5:11           ` syzbot

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=20250613030043.226990-1-kuni1840@gmail.com \
    --to=kuni1840@gmail.com \
    --cc=3chas3@gmail.com \
    --cc=kuniyu@google.com \
    --cc=linux-atm-general@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=syzbot+1d3c235276f62963e93a@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.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).