[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250118110555.1978-1-hdanton@sina.com>
Date: Sat, 18 Jan 2025 19:05:54 +0800
From: Hillf Danton <hdanton@...a.com>
To: syzbot <syzbot+827272712bd6d12c79a4@...kaller.appspotmail.com>
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [net?] KASAN: slab-use-after-free Read in handle_tx (2)
On Fri, 17 Jan 2025 09:11:25 -0800
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: 9bffa1ad25b8 Merge tag 'drm-fixes-2025-01-17' of https://g..
> git tree: upstream
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17d6c2b0580000
#syz test
--- x/drivers/net/caif/caif_serial.c
+++ y/drivers/net/caif/caif_serial.c
@@ -304,11 +304,14 @@ static void ser_release(struct work_stru
spin_unlock(&ser_lock);
if (!list_empty(&list)) {
+ struct tty_struct *tty;
rtnl_lock();
list_for_each_entry_safe(ser, tmp, &list, node) {
+ tty = ser->tty;
dev_close(ser->dev);
unregister_netdevice(ser->dev);
debugfs_deinit(ser);
+ tty_kref_put(tty);
}
rtnl_unlock();
}
@@ -369,8 +372,6 @@ static void ldisc_close(struct tty_struc
{
struct ser_device *ser = tty->disc_data;
- tty_kref_put(ser->tty);
-
spin_lock(&ser_lock);
list_move(&ser->node, &ser_release_list);
spin_unlock(&ser_lock);
--
Powered by blists - more mailing lists