Re: [syzbot] [media?] KASAN: slab-use-after-free Read in em28xx_release_resources

Hillf Danton
2026-01-10T08:50:50Z

> Date: Thu, 08 Jan 2026 20:22:24 -0800
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: 79b95d74470d Merge tag 'hid-for-linus-2026010801' of git:/..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=112b219a580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=a94030c847137a18
> dashboard link: https://syzkaller.appspot.com/bug?extid=16062f26c6480975e5ed
> compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=152b219a580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13e6e922580000

#syz test

--- x/drivers/media/usb/em28xx/em28xx-video.c
+++ y/drivers/media/usb/em28xx/em28xx-video.c
@@ -2150,6 +2150,10 @@ static int em28xx_v4l2_open(struct file
if (mutex_lock_interruptible(&dev->lock))
return -ERESTARTSYS;

+ if (dev->v4l2 == NULL) {
+ mutex_unlock(&dev->lock);
+ return -EINVAL;
+ }
ret = v4l2_fh_open(filp);
if (ret) {
dev_err(&dev->intf->dev,
@@ -2898,6 +2902,7 @@ unregister_dev:
v4l2_device_unregister(&v4l2->v4l2_dev);
err:
dev->v4l2 = NULL;
+ em28xx_v4l2_media_release(dev);
kref_put(&v4l2->ref, em28xx_free_v4l2);
mutex_unlock(&dev->lock);
return ret;
--