All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+79340d79a8ed013a2313@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [syzbot] Re: [syzbot] [can?] [usb?] KASAN: slab-out-of-bounds Read in ucan_probe
Date: Wed, 26 Mar 2025 18:28:20 -0700	[thread overview]
Message-ID: <67e4a9b4.050a0220.2f068f.0018.GAE@google.com> (raw)
In-Reply-To: <67e46af0.050a0220.2f068f.000e.GAE@google.com>

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

Subject: Re: [syzbot] [can?] [usb?] KASAN: slab-out-of-bounds Read in ucan_probe
Author: lizhi.xu@windriver.com

#syz test

diff --git a/drivers/net/can/usb/ucan.c b/drivers/net/can/usb/ucan.c
index 39a63b731..97c6cfa2d 100644
--- a/drivers/net/can/usb/ucan.c
+++ b/drivers/net/can/usb/ucan.c
@@ -1399,7 +1399,7 @@ static int ucan_probe(struct usb_interface *intf,
 
 	/* Prepare Memory for control transfers */
 	ctl_msg_buffer = devm_kzalloc(&udev->dev,
-				      sizeof(union ucan_ctl_payload),
+				      sizeof(union ucan_ctl_payload) + 1,
 				      GFP_KERNEL);
 	if (!ctl_msg_buffer) {
 		dev_err(&udev->dev,

  reply	other threads:[~2025-03-27  1:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-26 21:00 [syzbot] [can?] [usb?] KASAN: slab-out-of-bounds Read in ucan_probe syzbot
2025-03-27  1:28 ` syzbot [this message]
2025-03-27  5:33 ` Vincent Mailhol
2025-03-27  6:43 ` [PATCH] can: ucan: the memory allocated to ctl_msg_buffer is one byte less Lizhi Xu

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=67e4a9b4.050a0220.2f068f.0018.GAE@google.com \
    --to=syzbot+79340d79a8ed013a2313@syzkaller.appspotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.