* [syzbot] [media?] KASAN: use-after-free Read in em28xx_close_extension (2)
@ 2024-09-19 15:00 syzbot
2024-09-20 11:28 ` Hillf Danton
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: syzbot @ 2024-09-19 15:00 UTC (permalink / raw)
To: linux-kernel, linux-media, linux-usb, mchehab, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: 68d4209158f4 sub: cdns3: Use predefined PCI vendor ID cons..
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
console output: https://syzkaller.appspot.com/x/log.txt?x=139b97c7980000
kernel config: https://syzkaller.appspot.com/x/.config?x=cb61872d4d8c5df9
dashboard link: https://syzkaller.appspot.com/bug?extid=a11c46f37ee083a73deb
compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1571e797980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11166200580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/c69290425359/disk-68d42091.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/caf4f26a3e85/vmlinux-68d42091.xz
kernel image: https://storage.googleapis.com/syzbot-assets/3acdec4b62e6/bzImage-68d42091.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+a11c46f37ee083a73deb@syzkaller.appspotmail.com
list_del corruption. next->prev should be ffff888112424250, but was 0000000000000000. (next=ffff888112acc250)
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:65!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 0 UID: 0 PID: 42 Comm: kworker/0:2 Not tainted 6.11.0-rc7-syzkaller-00152-g68d4209158f4 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
Workqueue: usb_hub_wq hub_event
RIP: 0010:__list_del_entry_valid_or_report+0x141/0x1c0 lib/list_debug.c:65
Code: e1 fe 90 0f 0b 48 89 c2 48 c7 c7 a0 9e 46 87 e8 05 b1 e1 fe 90 0f 0b 48 89 d1 48 c7 c7 20 9f 46 87 48 89 c2 e8 f0 b0 e1 fe 90 <0f> 0b 48 89 34 24 e8 d4 2e 57 ff 48 8b 34 24 e9 d5 fe ff ff 48 89
RSP: 0018:ffffc900004d76f0 EFLAGS: 00010282
RAX: 000000000000006d RBX: ffffffff89df37a0 RCX: ffffffff813560b9
RDX: 0000000000000000 RSI: ffffffff8135f4f6 RDI: 0000000000000005
RBP: ffff888112424250 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000001 R12: dffffc0000000000
R13: ffff888112424000 R14: ffffffff89e0d908 R15: ffff888121f0c000
FS: 0000000000000000(0000) GS:ffff8881f5800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055853d6842e0 CR3: 0000000111614000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
__list_del_entry_valid include/linux/list.h:124 [inline]
__list_del_entry include/linux/list.h:215 [inline]
list_del include/linux/list.h:229 [inline]
em28xx_close_extension+0x10e/0x2b0 drivers/media/usb/em28xx/em28xx-core.c:1137
em28xx_usb_disconnect+0x19d/0x610 drivers/media/usb/em28xx/em28xx-cards.c:4197
usb_unbind_interface+0x1e8/0x970 drivers/usb/core/driver.c:461
device_remove drivers/base/dd.c:568 [inline]
device_remove+0x122/0x170 drivers/base/dd.c:560
__device_release_driver drivers/base/dd.c:1272 [inline]
device_release_driver_internal+0x44a/0x610 drivers/base/dd.c:1295
bus_remove_device+0x22f/0x420 drivers/base/bus.c:574
device_del+0x396/0x9f0 drivers/base/core.c:3871
usb_disable_device+0x36c/0x7f0 drivers/usb/core/message.c:1418
usb_disconnect+0x2e1/0x920 drivers/usb/core/hub.c:2304
hub_port_connect drivers/usb/core/hub.c:5361 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5661 [inline]
port_event drivers/usb/core/hub.c:5821 [inline]
hub_event+0x1bed/0x4f40 drivers/usb/core/hub.c:5903
process_one_work+0x9c5/0x1b40 kernel/workqueue.c:3231
process_scheduled_works kernel/workqueue.c:3312 [inline]
worker_thread+0x6c8/0xed0 kernel/workqueue.c:3389
kthread+0x2c1/0x3a0 kernel/kthread.c:389
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__list_del_entry_valid_or_report+0x141/0x1c0 lib/list_debug.c:65
Code: e1 fe 90 0f 0b 48 89 c2 48 c7 c7 a0 9e 46 87 e8 05 b1 e1 fe 90 0f 0b 48 89 d1 48 c7 c7 20 9f 46 87 48 89 c2 e8 f0 b0 e1 fe 90 <0f> 0b 48 89 34 24 e8 d4 2e 57 ff 48 8b 34 24 e9 d5 fe ff ff 48 89
RSP: 0018:ffffc900004d76f0 EFLAGS: 00010282
RAX: 000000000000006d RBX: ffffffff89df37a0 RCX: ffffffff813560b9
RDX: 0000000000000000 RSI: ffffffff8135f4f6 RDI: 0000000000000005
RBP: ffff888112424250 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000001 R12: dffffc0000000000
R13: ffff888112424000 R14: ffffffff89e0d908 R15: ffff888121f0c000
FS: 0000000000000000(0000) GS:ffff8881f5800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055853d6842e0 CR3: 0000000111614000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [syzbot] [media?] KASAN: use-after-free Read in em28xx_close_extension (2)
2024-09-19 15:00 [syzbot] [media?] KASAN: use-after-free Read in em28xx_close_extension (2) syzbot
@ 2024-09-20 11:28 ` Hillf Danton
2024-09-20 12:00 ` syzbot
2024-09-20 23:00 ` Hillf Danton
2025-11-10 9:59 ` Fedor Pchelkin
2 siblings, 1 reply; 7+ messages in thread
From: Hillf Danton @ 2024-09-20 11:28 UTC (permalink / raw)
To: syzbot; +Cc: linux-kernel, syzkaller-bugs
On Thu, 19 Sep 2024 08:00:19 -0700
> syzbot found the following issue on:
>
> HEAD commit: 68d4209158f4 sub: cdns3: Use predefined PCI vendor ID cons..
> git tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11166200580000
#syz test
--- x/drivers/media/usb/em28xx/em28xx-core.c
+++ y/drivers/media/usb/em28xx/em28xx-core.c
@@ -1134,7 +1134,7 @@ void em28xx_close_extension(struct em28x
ops->fini(dev);
}
}
- list_del(&dev->devlist);
+ list_del_init(&dev->devlist);
mutex_unlock(&em28xx_devlist_mutex);
}
--- x/drivers/media/usb/em28xx/em28xx-cards.c
+++ y/drivers/media/usb/em28xx/em28xx-cards.c
@@ -3910,6 +3910,7 @@ static int em28xx_usb_probe(struct usb_i
retval = -ENOMEM;
goto err;
}
+ INIT_LIST_HEAD(&dev->devlist);
/* compute alternate max packet sizes */
dev->alt_max_pkt_size_isoc = kcalloc(intf->num_altsetting,
@@ -4156,6 +4157,8 @@ static int em28xx_usb_probe(struct usb_i
return 0;
err_free:
+ if (!list_empty(&dev->devlist))
+ em28xx_close_extension(dev);
kfree(dev->alt_max_pkt_size_isoc);
kfree(dev);
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [syzbot] [media?] KASAN: use-after-free Read in em28xx_close_extension (2)
2024-09-20 11:28 ` Hillf Danton
@ 2024-09-20 12:00 ` syzbot
0 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2024-09-20 12:00 UTC (permalink / raw)
To: hdanton, linux-kernel, syzkaller-bugs
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
KASAN: use-after-free Read in em28xx_init_extension
em28xx 1-1:0.0: No AC97 audio processor
==================================================================
BUG: KASAN: use-after-free in __list_add_valid_or_report+0xe4/0x100 lib/list_debug.c:32
Read of size 8 at addr ffff88811ec98250 by task kworker/0:2/42
CPU: 0 UID: 0 PID: 42 Comm: kworker/0:2 Not tainted 6.11.0-rc7-syzkaller-00152-g68d4209158f4-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
Workqueue: usb_hub_wq hub_event
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:93 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:119
print_address_description mm/kasan/report.c:377 [inline]
print_report+0xc3/0x620 mm/kasan/report.c:488
kasan_report+0xd9/0x110 mm/kasan/report.c:601
__list_add_valid_or_report+0xe4/0x100 lib/list_debug.c:32
__list_add_valid include/linux/list.h:88 [inline]
__list_add include/linux/list.h:150 [inline]
list_add_tail include/linux/list.h:183 [inline]
em28xx_init_extension+0x48/0x200 drivers/media/usb/em28xx/em28xx-core.c:1114
em28xx_init_dev.constprop.0+0x197b/0x3090 drivers/media/usb/em28xx/em28xx-cards.c:3679
em28xx_usb_probe+0x1151/0x3770 drivers/media/usb/em28xx/em28xx-cards.c:4035
usb_probe_interface+0x309/0x9d0 drivers/usb/core/driver.c:399
call_driver_probe drivers/base/dd.c:578 [inline]
really_probe+0x23e/0xa90 drivers/base/dd.c:657
__driver_probe_device+0x1de/0x440 drivers/base/dd.c:799
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:829
__device_attach_driver+0x1df/0x310 drivers/base/dd.c:957
bus_for_each_drv+0x157/0x1e0 drivers/base/bus.c:457
__device_attach+0x1e8/0x4b0 drivers/base/dd.c:1029
bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:532
device_add+0x114b/0x1a70 drivers/base/core.c:3682
usb_set_configuration+0x10cb/0x1c50 drivers/usb/core/message.c:2210
usb_generic_driver_probe+0xb1/0x110 drivers/usb/core/generic.c:254
usb_probe_device+0xec/0x3e0 drivers/usb/core/driver.c:294
call_driver_probe drivers/base/dd.c:578 [inline]
really_probe+0x23e/0xa90 drivers/base/dd.c:657
__driver_probe_device+0x1de/0x440 drivers/base/dd.c:799
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:829
__device_attach_driver+0x1df/0x310 drivers/base/dd.c:957
bus_for_each_drv+0x157/0x1e0 drivers/base/bus.c:457
__device_attach+0x1e8/0x4b0 drivers/base/dd.c:1029
bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:532
device_add+0x114b/0x1a70 drivers/base/core.c:3682
usb_new_device+0xd90/0x1a10 drivers/usb/core/hub.c:2651
hub_port_connect drivers/usb/core/hub.c:5521 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5661 [inline]
port_event drivers/usb/core/hub.c:5821 [inline]
hub_event+0x2e58/0x4f40 drivers/usb/core/hub.c:5903
process_one_work+0x9c5/0x1b40 kernel/workqueue.c:3231
process_scheduled_works kernel/workqueue.c:3312 [inline]
worker_thread+0x6c8/0xed0 kernel/workqueue.c:3389
kthread+0x2c1/0x3a0 kernel/kthread.c:389
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
</TASK>
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88811ec9aa00 pfn:0x11ec98
flags: 0x200000000000000(node=0|zone=2)
page_type: 0xbfffffff(buddy)
raw: 0200000000000000 ffffea000446c508 ffffea0004668f08 0000000000000000
raw: ffff88811ec9aa00 0000000000000002 00000000bfffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 2, migratetype Unmovable, gfp_mask 0x140cc0(GFP_USER|__GFP_COMP), pid 8, tgid 8 (kworker/0:0), ts 189962545246, free_ts 190359765080
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1500
prep_new_page mm/page_alloc.c:1508 [inline]
get_page_from_freelist+0x1311/0x25f0 mm/page_alloc.c:3446
__alloc_pages_noprof+0x21e/0x2290 mm/page_alloc.c:4702
__alloc_pages_node_noprof include/linux/gfp.h:269 [inline]
alloc_pages_node_noprof include/linux/gfp.h:296 [inline]
___kmalloc_large_node+0x7f/0x1a0 mm/slub.c:4107
__kmalloc_large_node_noprof+0x1c/0x70 mm/slub.c:4134
__do_kmalloc_node mm/slub.c:4150 [inline]
__kmalloc_node_track_caller_noprof.cold+0x5/0x5e mm/slub.c:4181
kmemdup_noprof+0x29/0x60 mm/util.c:133
kmemdup_noprof include/linux/fortify-string.h:753 [inline]
em28xx_duplicate_dev drivers/media/usb/em28xx/em28xx-cards.c:3732 [inline]
em28xx_usb_probe+0x1f2e/0x3770 drivers/media/usb/em28xx/em28xx-cards.c:4083
usb_probe_interface+0x309/0x9d0 drivers/usb/core/driver.c:399
call_driver_probe drivers/base/dd.c:578 [inline]
really_probe+0x23e/0xa90 drivers/base/dd.c:657
__driver_probe_device+0x1de/0x440 drivers/base/dd.c:799
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:829
__device_attach_driver+0x1df/0x310 drivers/base/dd.c:957
bus_for_each_drv+0x157/0x1e0 drivers/base/bus.c:457
__device_attach+0x1e8/0x4b0 drivers/base/dd.c:1029
bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:532
page last free pid 8 tgid 8 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1101 [inline]
free_unref_page+0x698/0xce0 mm/page_alloc.c:2619
__folio_put+0x1dc/0x260 mm/swap.c:128
em28xx_free_device drivers/media/usb/em28xx/em28xx-cards.c:3566 [inline]
kref_put include/linux/kref.h:65 [inline]
em28xx_usb_disconnect+0x4e0/0x610 drivers/media/usb/em28xx/em28xx-cards.c:4207
usb_unbind_interface+0x1e8/0x970 drivers/usb/core/driver.c:461
device_remove drivers/base/dd.c:568 [inline]
device_remove+0x122/0x170 drivers/base/dd.c:560
__device_release_driver drivers/base/dd.c:1272 [inline]
device_release_driver_internal+0x44a/0x610 drivers/base/dd.c:1295
bus_remove_device+0x22f/0x420 drivers/base/bus.c:574
device_del+0x396/0x9f0 drivers/base/core.c:3871
usb_disable_device+0x36c/0x7f0 drivers/usb/core/message.c:1418
usb_disconnect+0x2e1/0x920 drivers/usb/core/hub.c:2304
hub_port_connect drivers/usb/core/hub.c:5361 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5661 [inline]
port_event drivers/usb/core/hub.c:5821 [inline]
hub_event+0x1bed/0x4f40 drivers/usb/core/hub.c:5903
process_one_work+0x9c5/0x1b40 kernel/workqueue.c:3231
process_scheduled_works kernel/workqueue.c:3312 [inline]
worker_thread+0x6c8/0xed0 kernel/workqueue.c:3389
kthread+0x2c1/0x3a0 kernel/kthread.c:389
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Memory state around the buggy address:
ffff88811ec98100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88811ec98180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88811ec98200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88811ec98280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88811ec98300: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
Tested on:
commit: 68d42091 sub: cdns3: Use predefined PCI vendor ID cons..
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
console output: https://syzkaller.appspot.com/x/log.txt?x=130b2e9f980000
kernel config: https://syzkaller.appspot.com/x/.config?x=cb61872d4d8c5df9
dashboard link: https://syzkaller.appspot.com/bug?extid=a11c46f37ee083a73deb
compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=15aa1607980000
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [syzbot] [media?] KASAN: use-after-free Read in em28xx_close_extension (2)
2024-09-19 15:00 [syzbot] [media?] KASAN: use-after-free Read in em28xx_close_extension (2) syzbot
2024-09-20 11:28 ` Hillf Danton
@ 2024-09-20 23:00 ` Hillf Danton
2024-09-20 23:19 ` syzbot
2025-11-10 9:59 ` Fedor Pchelkin
2 siblings, 1 reply; 7+ messages in thread
From: Hillf Danton @ 2024-09-20 23:00 UTC (permalink / raw)
To: syzbot; +Cc: linux-kernel, syzkaller-bugs
On Thu, 19 Sep 2024 08:00:19 -0700
> syzbot found the following issue on:
>
> HEAD commit: 68d4209158f4 sub: cdns3: Use predefined PCI vendor ID cons..
> git tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11166200580000
#syz test
--- x/drivers/media/usb/em28xx/em28xx-core.c
+++ y/drivers/media/usb/em28xx/em28xx-core.c
@@ -1134,7 +1134,7 @@ void em28xx_close_extension(struct em28x
ops->fini(dev);
}
}
- list_del(&dev->devlist);
+ list_del_init(&dev->devlist);
mutex_unlock(&em28xx_devlist_mutex);
}
--- x/drivers/media/usb/em28xx/em28xx-cards.c
+++ y/drivers/media/usb/em28xx/em28xx-cards.c
@@ -3735,6 +3735,7 @@ static int em28xx_duplicate_dev(struct e
dev->dev_next = NULL;
return -ENOMEM;
}
+ INIT_LIST_HEAD(&sec_dev->devlist);
/* Check to see next free device and mark as used */
do {
nr = find_first_zero_bit(em28xx_devused, EM28XX_MAXBOARDS);
@@ -3910,6 +3911,7 @@ static int em28xx_usb_probe(struct usb_i
retval = -ENOMEM;
goto err;
}
+ INIT_LIST_HEAD(&dev->devlist);
/* compute alternate max packet sizes */
dev->alt_max_pkt_size_isoc = kcalloc(intf->num_altsetting,
@@ -4156,6 +4158,8 @@ static int em28xx_usb_probe(struct usb_i
return 0;
err_free:
+ if (!list_empty(&dev->devlist))
+ em28xx_close_extension(dev);
kfree(dev->alt_max_pkt_size_isoc);
kfree(dev);
@@ -4201,6 +4205,8 @@ static void em28xx_usb_disconnect(struct
em28xx_release_resources(dev);
if (dev->dev_next) {
+ if (!list_empty(&dev->dev_next->devlist))
+ em28xx_close_extension(dev->dev_next);
kref_put(&dev->dev_next->ref, em28xx_free_device);
dev->dev_next = NULL;
}
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [syzbot] [media?] KASAN: use-after-free Read in em28xx_close_extension (2)
2024-09-20 23:00 ` Hillf Danton
@ 2024-09-20 23:19 ` syzbot
0 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2024-09-20 23:19 UTC (permalink / raw)
To: hdanton, linux-kernel, syzkaller-bugs
Hello,
syzbot has tested the proposed patch and the reproducer did not trigger any issue:
Reported-by: syzbot+a11c46f37ee083a73deb@syzkaller.appspotmail.com
Tested-by: syzbot+a11c46f37ee083a73deb@syzkaller.appspotmail.com
Tested on:
commit: 68d42091 sub: cdns3: Use predefined PCI vendor ID cons..
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
console output: https://syzkaller.appspot.com/x/log.txt?x=13fdcca9980000
kernel config: https://syzkaller.appspot.com/x/.config?x=cb61872d4d8c5df9
dashboard link: https://syzkaller.appspot.com/bug?extid=a11c46f37ee083a73deb
compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=17219607980000
Note: testing is done by a robot and is best-effort only.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [syzbot] [media?] KASAN: use-after-free Read in em28xx_close_extension (2)
2024-09-19 15:00 [syzbot] [media?] KASAN: use-after-free Read in em28xx_close_extension (2) syzbot
2024-09-20 11:28 ` Hillf Danton
2024-09-20 23:00 ` Hillf Danton
@ 2025-11-10 9:59 ` Fedor Pchelkin
2025-11-10 10:19 ` [syzbot] [usb?] " syzbot
2 siblings, 1 reply; 7+ messages in thread
From: Fedor Pchelkin @ 2025-11-10 9:59 UTC (permalink / raw)
To: syzbot+a11c46f37ee083a73deb; +Cc: linux-kernel, syzkaller-bugs
#syz test
--- a/drivers/media/usb/em28xx/em28xx-cards.c
+++ b/drivers/media/usb/em28xx/em28xx-cards.c
@@ -3445,17 +3445,16 @@ static void request_module_async(struct work_struct *work)
/*
* Devices with an audio-only intf also have a V4L/DVB/RC
- * intf. Don't register extensions twice on those devices.
+ * intf.
*/
if (dev->is_audio_only) {
#if defined(CONFIG_MODULES) && defined(MODULE)
request_module("em28xx-alsa");
#endif
+ em28xx_init_extension(dev);
return;
}
- em28xx_init_extension(dev);
-
#if defined(CONFIG_MODULES) && defined(MODULE)
if (dev->has_video)
request_module("em28xx-v4l");
@@ -3469,6 +3468,8 @@ static void request_module_async(struct work_struct *work)
((dev->board.ir_codes || dev->board.has_ir_i2c) && !disable_ir))
request_module("em28xx-rc");
#endif /* CONFIG_MODULES */
+
+ em28xx_init_extension(dev);
}
static void request_modules(struct em28xx *dev)
@@ -3676,8 +3677,6 @@ static int em28xx_init_dev(struct em28xx *dev, struct usb_device *udev,
retval = -ENODEV;
goto err_deinit_media;
}
- em28xx_init_extension(dev);
-
return 0;
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [syzbot] [usb?] [media?] KASAN: use-after-free Read in em28xx_close_extension (2)
2025-11-10 9:59 ` Fedor Pchelkin
@ 2025-11-10 10:19 ` syzbot
0 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2025-11-10 10:19 UTC (permalink / raw)
To: linux-kernel, pchelkin, syzkaller-bugs
Hello,
syzbot has tested the proposed patch and the reproducer did not trigger any issue:
Reported-by: syzbot+a11c46f37ee083a73deb@syzkaller.appspotmail.com
Tested-by: syzbot+a11c46f37ee083a73deb@syzkaller.appspotmail.com
Tested on:
commit: e9a6fb0b Linux 6.18-rc5
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1600b412580000
kernel config: https://syzkaller.appspot.com/x/.config?x=cec18221b2e23baa
dashboard link: https://syzkaller.appspot.com/bug?extid=a11c46f37ee083a73deb
compiler: gcc (Debian 12.2.0-14+deb12u1) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=17cc1a92580000
Note: testing is done by a robot and is best-effort only.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-11-10 10:19 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-19 15:00 [syzbot] [media?] KASAN: use-after-free Read in em28xx_close_extension (2) syzbot
2024-09-20 11:28 ` Hillf Danton
2024-09-20 12:00 ` syzbot
2024-09-20 23:00 ` Hillf Danton
2024-09-20 23:19 ` syzbot
2025-11-10 9:59 ` Fedor Pchelkin
2025-11-10 10:19 ` [syzbot] [usb?] " syzbot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox