syzbot


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

Status: auto-closed as invalid on 2020/12/06 16:15
Reported-by: syzbot+e149342c94253985a2e8@syzkaller.appspotmail.com
First crash: 1544d, last: 1520d

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in rds_tcp_kill_sock net/rds/tcp.c:531 [inline]
BUG: KASAN: slab-out-of-bounds in rds_tcp_dev_event+0x904/0xa30 net/rds/tcp.c:573
Read of size 8 at addr ffff88801414d840 by task kworker/u4:0/5

CPU: 1 PID: 5 Comm: kworker/u4:0 Not tainted 4.14.193-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: netns cleanup_net
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x283 lib/dump_stack.c:58
 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
 kasan_report_error.cold+0x8a/0x194 mm/kasan/report.c:351
 kasan_report mm/kasan/report.c:409 [inline]
 __asan_report_load8_noabort+0x68/0x70 mm/kasan/report.c:430
 rds_tcp_kill_sock net/rds/tcp.c:531 [inline]
 rds_tcp_dev_event+0x904/0xa30 net/rds/tcp.c:573
 notifier_call_chain+0x108/0x1a0 kernel/notifier.c:93
 call_netdevice_notifiers_info net/core/dev.c:1667 [inline]
 call_netdevice_notifiers net/core/dev.c:1683 [inline]
 netdev_run_todo+0x242/0xad0 net/core/dev.c:7926
 default_device_exit_batch+0x2e2/0x380 net/core/dev.c:8746
 ops_exit_list+0xf9/0x150 net/core/net_namespace.c:145
 cleanup_net+0x3b3/0x840 net/core/net_namespace.c:484
 process_one_work+0x793/0x14a0 kernel/workqueue.c:2116
 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2250
 kthread+0x30d/0x420 kernel/kthread.c:232
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404

Allocated by task 6390:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551
 kmem_cache_alloc+0x124/0x3c0 mm/slab.c:3552
 getname_flags+0xc8/0x550 fs/namei.c:138
 user_path_at_empty+0x2a/0x50 fs/namei.c:2631
 user_path_at include/linux/namei.h:57 [inline]
 vfs_statx+0xd1/0x180 fs/stat.c:185
 vfs_lstat include/linux/fs.h:3066 [inline]
 SYSC_newlstat fs/stat.c:350 [inline]
 SyS_newlstat+0x83/0xe0 fs/stat.c:344
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb

Freed by task 6390:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524
 __cache_free mm/slab.c:3496 [inline]
 kmem_cache_free+0x7c/0x2b0 mm/slab.c:3758
 putname+0xcd/0x110 fs/namei.c:259
 filename_lookup+0x37b/0x510 fs/namei.c:2386
 user_path_at include/linux/namei.h:57 [inline]
 vfs_statx+0xd1/0x180 fs/stat.c:185
 vfs_lstat include/linux/fs.h:3066 [inline]
 SYSC_newlstat fs/stat.c:350 [inline]
 SyS_newlstat+0x83/0xe0 fs/stat.c:344
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb

The buggy address belongs to the object at ffff88801414c440
 which belongs to the cache names_cache of size 4096
The buggy address is located 1024 bytes to the right of
 4096-byte region [ffff88801414c440, ffff88801414d440)
The buggy address belongs to the page:
page:ffffea0000505300 count:1 mapcount:0 mapping:ffff88801414c440 index:0x0 compound_mapcount: 0
flags: 0xfffe0000008100(slab|head)
raw: 00fffe0000008100 ffff88801414c440 0000000000000000 0000000100000001
raw: ffffea00023c0aa0 ffffea0002578a20 ffff8880aa58bcc0 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff88801414d700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88801414d780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88801414d800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                           ^
 ffff88801414d880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88801414d900: 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
2020/08/08 16:14 linux-4.14.y 14b58326976d 01975a06 .config console log report ci2-linux-4-14
2020/07/15 06:20 linux-4.14.y b850307b279c ada108d0 .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.