KASAN: slab-out-of-bounds Read in ec168_i2c_xfer

Status: upstream: reported C repro on 2026/09/06 18:09
Reported-by: syzbot+b8cbfcd6c08fdfd8f9d5@syzkaller.appspotmail.com
First crash: 10d, last: 10d
Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-out-of-bounds Read in ec168_i2c_xfer prio:normal usb media 17 syz, C error 27 10d 177d 0/29 upstream: reported C repro on 2026/03/23 20:13
linux-5.15 KASAN: slab-out-of-bounds Read in ec168_i2c_xfer 17 syz, C 2 10d 10d 0/3 upstream: reported C repro on 2026/09/06 22:26

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in ec168_i2c_xfer+0x4d5/0x630 drivers/media/usb/dvb-usb-v2/ec168.c:143
Read of size 1 at addr ffff888024ea8b41 by task syz.0.17/5933

CPU: 0 PID: 5933 Comm: syz.0.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:364 [inline]
 print_report+0xa8/0x210 mm/kasan/report.c:468
 kasan_report+0x117/0x150 mm/kasan/report.c:581
 ec168_i2c_xfer+0x4d5/0x630 drivers/media/usb/dvb-usb-v2/ec168.c:143
 __i2c_transfer+0x891/0x2090 drivers/i2c/i2c-core-base.c:-1
 i2c_transfer+0x261/0x3a0 drivers/i2c/i2c-core-base.c:2355
 i2cdev_ioctl_rdwr+0x3b0/0x690 drivers/i2c/i2c-dev.c:297
 i2cdev_ioctl+0x6a0/0x840 drivers/i2c/i2c-dev.c:458
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl+0xfd/0x170 fs/ioctl.c:857
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f00b679e159
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe9f0f49b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f00b6a25fa0 RCX: 00007f00b679e159
RDX: 0000200000000200 RSI: 0000000000000707 RDI: 0000000000000004
RBP: 00007f00b6835024 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f00b6a25fac R14: 00007f00b6a25fa0 R15: 00007f00b6a25fa0
 </TASK>

Allocated by task 5933:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4e/0x70 mm/kasan/common.c:53
 ____kasan_kmalloc mm/kasan/common.c:375 [inline]
 __kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:384
 kasan_kmalloc include/linux/kasan.h:198 [inline]
 __do_kmalloc_node mm/slab_common.c:1007 [inline]
 __kmalloc_node_track_caller+0xb4/0x230 mm/slab_common.c:1027
 memdup_user+0x2b/0xc0 mm/util.c:197
 i2cdev_ioctl_rdwr+0x116/0x690 drivers/i2c/i2c-dev.c:256
 i2cdev_ioctl+0x6a0/0x840 drivers/i2c/i2c-dev.c:458
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl+0xfd/0x170 fs/ioctl.c:857
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

The buggy address belongs to the object at ffff888024ea8b40
 which belongs to the cache kmalloc-8 of size 8
The buggy address is located 0 bytes to the right of
 allocated 1-byte region [ffff888024ea8b40, ffff888024ea8b41)

The buggy address belongs to the physical page:
page:ffffea000093aa00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x24ea8
flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000800 ffff888017c41280 dead000000000122 0000000000000000
raw: 0000000000000000 0000000080660066 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 5894, tgid 5894 (syz-executor), ts 107016510445, free_ts 107016367823
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x1c1/0x200 mm/page_alloc.c:1582
 prep_new_page mm/page_alloc.c:1589 [inline]
 get_page_from_freelist+0x2181/0x22a0 mm/page_alloc.c:3221
 __alloc_pages+0x1f0/0x460 mm/page_alloc.c:4501
 alloc_slab_page+0x5d/0x180 mm/slub.c:1881
 allocate_slab mm/slub.c:2028 [inline]
 new_slab+0x87/0x2d0 mm/slub.c:2081
 ___slab_alloc+0xc5c/0x12f0 mm/slub.c:3253
 __slab_alloc mm/slub.c:3339 [inline]
 __slab_alloc_node mm/slub.c:3392 [inline]
 slab_alloc_node mm/slub.c:3485 [inline]
 __kmem_cache_alloc_node+0x11f/0x250 mm/slub.c:3534
 __do_kmalloc_node mm/slab_common.c:1006 [inline]
 __kmalloc_node+0xa6/0x240 mm/slab_common.c:1014
 kmalloc_node include/linux/slab.h:620 [inline]
 __vmalloc_area_node mm/vmalloc.c:3175 [inline]
 __vmalloc_node_range+0x598/0x1320 mm/vmalloc.c:3370
 __vmalloc_node mm/vmalloc.c:3435 [inline]
 vzalloc+0x79/0x90 mm/vmalloc.c:3508
 alloc_counters+0xcb/0x6c0 net/ipv4/netfilter/ip_tables.c:799
 copy_entries_to_user net/ipv4/netfilter/ip_tables.c:821 [inline]
 get_entries net/ipv4/netfilter/ip_tables.c:1020 [inline]
 do_ipt_get_ctl+0xad5/0x1210 net/ipv4/netfilter/ip_tables.c:1665
 nf_getsockopt+0x262/0x280 net/netfilter/nf_sockopt.c:116
 ip_getsockopt+0x19f/0x230 net/ipv4/ip_sockglue.c:1790
 do_sock_getsockopt+0x379/0x450 net/socket.c:2384
 __sys_getsockopt net/socket.c:2413 [inline]
 __do_sys_getsockopt net/socket.c:2423 [inline]
 __se_sys_getsockopt net/socket.c:2420 [inline]
 __x64_sys_getsockopt+0x1d6/0x280 net/socket.c:2420
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1182 [inline]
 free_unref_page_prepare+0x7d7/0x8f0 mm/page_alloc.c:2366
 free_unref_page+0x32/0x2e0 mm/page_alloc.c:2459
 vfree+0x1a7/0x340 mm/vmalloc.c:2899
 copy_entries_to_user net/ipv4/netfilter/ip_tables.c:864 [inline]
 get_entries net/ipv4/netfilter/ip_tables.c:1020 [inline]
 do_ipt_get_ctl+0xeef/0x1210 net/ipv4/netfilter/ip_tables.c:1665
 nf_getsockopt+0x262/0x280 net/netfilter/nf_sockopt.c:116
 ip_getsockopt+0x19f/0x230 net/ipv4/ip_sockglue.c:1790
 do_sock_getsockopt+0x379/0x450 net/socket.c:2384
 __sys_getsockopt net/socket.c:2413 [inline]
 __do_sys_getsockopt net/socket.c:2423 [inline]
 __se_sys_getsockopt net/socket.c:2420 [inline]
 __x64_sys_getsockopt+0x1d6/0x280 net/socket.c:2420
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

Memory state around the buggy address:
 ffff888024ea8a00: 05 fc fc fc fc 06 fc fc fc fc fa fc fc fc fc 07
 ffff888024ea8a80: fc fc fc fc 07 fc fc fc fc fa fc fc fc fc fa fc
>ffff888024ea8b00: fc fc fc 00 fc fc fc fc 01 fc fc fc fc 00 fc fc
                                           ^
 ffff888024ea8b80: fc fc 00 fc fc fc fc 00 fc fc fc fc 00 fc fc fc
 ffff888024ea8c00: fc 00 fc fc fc fc 00 fc fc fc fc 00 fc fc fc fc
==================================================================

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/09/06 20:09 linux-6.6.y 8b73de7da85f 4f7b22a0 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-out-of-bounds Read in ec168_i2c_xfer
2026/09/06 19:31 linux-6.6.y 8b73de7da85f 4f7b22a0 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-out-of-bounds Read in ec168_i2c_xfer
2026/09/06 18:46 linux-6.6.y 8b73de7da85f 4f7b22a0 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-out-of-bounds Read in ec168_i2c_xfer
2026/09/06 18:09 linux-6.6.y 8b73de7da85f 4f7b22a0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-out-of-bounds Read in ec168_i2c_xfer
2026/09/06 18:09 linux-6.6.y 8b73de7da85f 4f7b22a0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-out-of-bounds Read in ec168_i2c_xfer
* Struck through repros no longer work on HEAD.