[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250817060739.4907-1-hdanton@sina.com>
Date: Sun, 17 Aug 2025 14:07:38 +0800
From: Hillf Danton <hdanton@...a.com>
To: syzbot <syzbot+abbfd103085885cf16a2@...kaller.appspotmail.com>
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [usb?] KASAN: slab-out-of-bounds Read in usbtmc_interrupt
> Date: Fri, 15 Aug 2025 20:07:34 -0700 [thread overview]
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 931e46dcbc7e Add linux-next specific files for 20250814
> git tree: linux-next
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=11ef65a2580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=bb7fbecfa2364d1c
> dashboard link: https://syzkaller.appspot.com/bug?extid=abbfd103085885cf16a2
> compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14a99842580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17108da2580000
#syz test
--- x/fs/smb/server/transport_rdma.h
+++ y/fs/smb/server/transport_rdma.h
@@ -61,7 +61,7 @@ void init_smbd_max_io_size(unsigned int
unsigned int get_smbd_max_read_write_size(void);
#else
static inline int ksmbd_rdma_init(void) { return 0; }
-static inline void ksmbd_rdma_stop_listening(void) { return };
+static inline void ksmbd_rdma_stop_listening(void) { }
static inline void ksmbd_rdma_destroy(void) { return; }
static inline bool ksmbd_rdma_capable_netdev(struct net_device *netdev) { return false; }
static inline void init_smbd_max_io_size(unsigned int sz) { }
--- x/drivers/usb/class/usbtmc.c
+++ y/drivers/usb/class/usbtmc.c
@@ -2453,7 +2453,7 @@ static int usbtmc_probe(struct usb_inter
kref_get(&data->kref);
/* allocate buffer for interrupt in */
- data->iin_buffer = kmalloc(data->iin_wMaxPacketSize,
+ data->iin_buffer = kzalloc(max(256, data->iin_wMaxPacketSize),
GFP_KERNEL);
if (!data->iin_buffer) {
retcode = -ENOMEM;
--
Powered by blists - more mailing lists