syzbot


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

Status: auto-obsoleted due to no activity on 2024/10/04 16:22
Bug presence: origin:upstream
Labels: missing-backport
[Documentation on labels]
Reported-by: syzbot+fe3822f23612dee891a2@syzkaller.appspotmail.com
First crash: 488d, last: 398d
Bug presence (3)
Date Name Commit Repro Result
2023/09/15 linux-5.15.y (ToT) aff03380bda4 C [report] KASAN: slab-out-of-bounds Read in read_descriptors
2023/06/17 upstream (ToT) 1639fae5132b C [report] KASAN: slab-out-of-bounds Read in read_descriptors
2023/09/15 upstream (ToT) 9fdfb15a3dbf C Didn't crash
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 KASAN: slab-out-of-bounds Read in read_descriptors origin:upstream C error 1 444d 488d 0/3 auto-obsoleted due to no activity on 2023/11/08 10:43
upstream KASAN: slab-out-of-bounds Read in read_descriptors (2) usb 1 1519d 1514d 15/28 fixed on 2020/10/10 01:52
upstream KASAN: slab-out-of-bounds Read in read_descriptors usb 1 1824d 1822d 0/28 auto-closed as invalid on 2020/02/18 03:02
upstream KASAN: slab-out-of-bounds Read in read_descriptors (3) usb C error 7 459d 486d 23/28 fixed on 2023/10/12 12:48
upstream KMSAN: uninit-value in read_descriptors (2) usb 1 585d 585d 0/28 auto-obsoleted due to no activity on 2023/06/10 07:49
upstream KMSAN: uninit-value in read_descriptors usb 1 954d 954d 0/28 auto-closed as invalid on 2022/06/06 09:45
Last patch testing requests (2)
Created Duration User Patch Repo Result
2024/10/04 14:43 1h14m retest repro linux-5.15.y OK log
2024/10/04 14:43 23m retest repro linux-5.15.y OK log
Fix bisection attempts (6)
Created Duration User Patch Repo Result
2024/07/05 14:07 1m fix candidate upstream error job log
2024/03/22 16:41 0m fix candidate upstream error job log
2024/02/09 13:19 1m fix candidate upstream error job log
2024/01/07 02:01 0m fix candidate upstream error job log
2023/11/30 10:20 0m fix candidate upstream error job log
2023/10/06 18:42 0m fix candidate upstream error job log

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in read_descriptors+0x2b4/0x320 drivers/usb/core/sysfs.c:883
Read of size 2 at addr ffff888013feaaaa by task udevd/3503

CPU: 1 PID: 3503 Comm: udevd Not tainted 5.15.120-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 print_address_description+0x63/0x3b0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:434 [inline]
 kasan_report+0x16b/0x1c0 mm/kasan/report.c:451
 read_descriptors+0x2b4/0x320 drivers/usb/core/sysfs.c:883
 kernfs_file_read_iter fs/kernfs/file.c:213 [inline]
 kernfs_fop_read_iter+0x37a/0x570 fs/kernfs/file.c:242
 call_read_iter include/linux/fs.h:2097 [inline]
 new_sync_read fs/read_write.c:404 [inline]
 vfs_read+0xa9f/0xe10 fs/read_write.c:485
 ksys_read+0x1a2/0x2c0 fs/read_write.c:623
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7fee6d93bb6a
Code: 00 3d 00 00 41 00 75 0d 50 48 8d 3d 2d 08 0a 00 e8 ea 7d 01 00 31 c0 e9 07 ff ff ff 64 8b 04 25 18 00 00 00 85 c0 75 1b 0f 05 <48> 3d 00 f0 ff ff 76 6c 48 8b 15 8f a2 0d 00 f7 d8 64 89 02 48 83
RSP: 002b:00007ffc8c3ccb08 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fee6d93bb6a
RDX: 0000000000010011 RSI: 00007ffc8c3ccb37 RDI: 0000000000000008
RBP: 0000000000000008 R08: 0000000000000003 R09: 58d6d0a0572cd16d
R10: 0000000000000000 R11: 0000000000000246 R12: 000055562e0a7810
R13: 00007ffc8c3dd218 R14: 00007ffc8c3dd868 R15: 00007ffc8c3ccb37
 </TASK>

Allocated by task 2922:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track mm/kasan/common.c:46 [inline]
 set_alloc_info mm/kasan/common.c:434 [inline]
 ____kasan_kmalloc+0xba/0xf0 mm/kasan/common.c:513
 kasan_kmalloc include/linux/kasan.h:264 [inline]
 __kmalloc+0x168/0x300 mm/slub.c:4407
 kmalloc include/linux/slab.h:596 [inline]
 kzalloc include/linux/slab.h:721 [inline]
 usb_get_configuration+0x105/0x4d60 drivers/usb/core/config.c:882
 usb_enumerate_device drivers/usb/core/hub.c:2400 [inline]
 usb_new_device+0x146/0x18d0 drivers/usb/core/hub.c:2538
 hub_port_connect drivers/usb/core/hub.c:5358 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5502 [inline]
 port_event drivers/usb/core/hub.c:5648 [inline]
 hub_event+0x2dd8/0x56d0 drivers/usb/core/hub.c:5730
 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2307
 worker_thread+0xaca/0x1280 kernel/workqueue.c:2454
 kthread+0x3f6/0x4f0 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298

The buggy address belongs to the object at ffff888013fea800
 which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 682 bytes inside of
 1024-byte region [ffff888013fea800, ffff888013feac00)
The buggy address belongs to the page:
page:ffffea00004ffa00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13fe8
head:ffffea00004ffa00 order:3 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 0000000000000000 dead000000000122 ffff888011c41dc0
raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0x52a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 1067, ts 43260451872, free_ts 42729221637
 prep_new_page mm/page_alloc.c:2426 [inline]
 get_page_from_freelist+0x322a/0x33c0 mm/page_alloc.c:4159
 __alloc_pages+0x272/0x700 mm/page_alloc.c:5421
 alloc_slab_page mm/slub.c:1775 [inline]
 allocate_slab mm/slub.c:1912 [inline]
 new_slab+0xbb/0x4b0 mm/slub.c:1975
 ___slab_alloc+0x6f6/0xe10 mm/slub.c:3008
 __slab_alloc mm/slub.c:3095 [inline]
 slab_alloc_node mm/slub.c:3186 [inline]
 slab_alloc mm/slub.c:3228 [inline]
 __kmalloc+0x1c9/0x300 mm/slub.c:4403
 kmalloc include/linux/slab.h:596 [inline]
 kzalloc include/linux/slab.h:721 [inline]
 neigh_alloc net/core/neighbour.c:430 [inline]
 ___neigh_create+0x622/0x21d0 net/core/neighbour.c:583
 ip6_finish_output2+0x11a6/0x14f0 net/ipv6/ip6_output.c:123
 dst_output include/net/dst.h:443 [inline]
 NF_HOOK include/linux/netfilter.h:302 [inline]
 ndisc_send_skb+0xae0/0x13c0 net/ipv6/ndisc.c:508
 ndisc_send_ns+0x64d/0x830 net/ipv6/ndisc.c:650
 addrconf_dad_work+0xb35/0x1720 net/ipv6/addrconf.c:4174
 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2307
 worker_thread+0xaca/0x1280 kernel/workqueue.c:2454
 kthread+0x3f6/0x4f0 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1340 [inline]
 free_pcp_prepare mm/page_alloc.c:1391 [inline]
 free_unref_page_prepare+0xc34/0xcf0 mm/page_alloc.c:3317
 free_unref_page+0x95/0x2d0 mm/page_alloc.c:3396
 free_slab mm/slub.c:2015 [inline]
 discard_slab mm/slub.c:2021 [inline]
 __unfreeze_partials+0x1b7/0x210 mm/slub.c:2507
 put_cpu_partial+0x132/0x1a0 mm/slub.c:2587
 do_slab_free mm/slub.c:3487 [inline]
 ___cache_free+0xe3/0x100 mm/slub.c:3506
 qlist_free_all+0x36/0x90 mm/kasan/quarantine.c:176
 kasan_quarantine_reduce+0x162/0x180 mm/kasan/quarantine.c:283
 __kasan_slab_alloc+0x2f/0xc0 mm/kasan/common.c:444
 kasan_slab_alloc include/linux/kasan.h:254 [inline]
 slab_post_alloc_hook+0x53/0x380 mm/slab.h:519
 slab_alloc_node mm/slub.c:3220 [inline]
 kmem_cache_alloc_node+0x121/0x2c0 mm/slub.c:3256
 __alloc_skb+0xdd/0x590 net/core/skbuff.c:415
 alloc_skb include/linux/skbuff.h:1167 [inline]
 netlink_alloc_large_skb net/netlink/af_netlink.c:1202 [inline]
 netlink_sendmsg+0x6f8/0xd60 net/netlink/af_netlink.c:1898
 sock_sendmsg_nosec net/socket.c:704 [inline]
 sock_sendmsg net/socket.c:724 [inline]
 __sys_sendto+0x564/0x720 net/socket.c:2039
 __do_sys_sendto net/socket.c:2051 [inline]
 __se_sys_sendto net/socket.c:2047 [inline]
 __x64_sys_sendto+0xda/0xf0 net/socket.c:2047
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x61/0xcb

Memory state around the buggy address:
 ffff888013fea980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff888013feaa00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff888013feaa80: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc
                                  ^
 ffff888013feab00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888013feab80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/07/23 06:03 linux-5.15.y d54cfc420586 27cbe77f .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Read in read_descriptors
2023/06/17 08:07 linux-5.15.y 471e639e59d1 f3921d4d .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in read_descriptors
* Struck through repros no longer work on HEAD.