[syzbot] [input?] KASAN: slab-use-after-free Read in atkbd_set_repeat_rate

Jeffin Philip posted 1 patch 4 weeks, 1 day ago
[syzbot] [input?] KASAN: slab-use-after-free Read in atkbd_set_repeat_rate
Posted by Jeffin Philip 4 weeks, 1 day ago
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 818bebeb63dd

diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index 5736f4bc5a50..bfad2e2ac937 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -961,7 +961,9 @@ static void atkbd_disconnect(struct serio *serio)
 {
 	struct atkbd *atkbd = atkbd_from_serio(serio);
 
+	scoped_guard(mutex_intr, &atkbd->mutex) {
 	atkbd_disable(atkbd);
+	}
 
 	input_unregister_device(atkbd->dev);
Re: [syzbot] [input?] KASAN: slab-use-after-free Read in atkbd_set_repeat_rate
Posted by syzbot 4 weeks, 1 day ago
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-by: syzbot+1e2ef9bcb29af666b2e6@syzkaller.appspotmail.com
Tested-by: syzbot+1e2ef9bcb29af666b2e6@syzkaller.appspotmail.com

Tested on:

commit:         818bebeb drm/xe: Don't hand out the flat CCS storage a..
git tree:       git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=126a6d79580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=ccca94d2c01b9e78
dashboard link: https://syzkaller.appspot.com/bug?extid=1e2ef9bcb29af666b2e6
compiler:       gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
patch:          https://syzkaller.appspot.com/x/patch.diff?x=17ecf625580000

Note: testing is done by a robot and is best-effort only.