syzbot


KASAN: slab-out-of-bounds Write in __run_timers

Status: closed as invalid on 2017/10/22 12:45
First crash: 2426d, last: 2410d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-54 KASAN: use-after-free Write in __run_timers syz 385 1d02h 1382d 0/2 upstream: reported syz repro on 2020/07/11 21:22
android-54 KASAN: slab-out-of-bounds Write in __run_timers 4 1031d 1221d 0/2 auto-closed as invalid on 2021/10/26 12:53

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in __collect_expired_timers include/linux/list.h:729 [inline]
BUG: KASAN: slab-out-of-bounds in collect_expired_timers kernel/time/timer.c:1569 [inline]
BUG: KASAN: slab-out-of-bounds in __run_timers+0xa2e/0xb90 kernel/time/timer.c:1616
Write of size 8 at addr ffff88004c9eba48 by task syz-executor3/23234

CPU: 3 PID: 23234 Comm: syz-executor3 Not tainted 4.14.0-rc1-next-20170918+ #6
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:16 [inline]
 dump_stack+0x194/0x257 lib/dump_stack.c:52
 print_address_description+0x73/0x250 mm/kasan/report.c:252
 kasan_report_error mm/kasan/report.c:351 [inline]
 kasan_report+0x24e/0x340 mm/kasan/report.c:409
 __asan_report_store8_noabort+0x17/0x20 mm/kasan/report.c:435
 __collect_expired_timers include/linux/list.h:729 [inline]
 collect_expired_timers kernel/time/timer.c:1569 [inline]
 __run_timers+0xa2e/0xb90 kernel/time/timer.c:1616
 run_timer_softirq+0x4c/0xb0 kernel/time/timer.c:1646
 __do_softirq+0x2bb/0xbd0 kernel/softirq.c:284
 do_softirq_own_stack+0x2a/0x40 arch/x86/entry/entry_64.S:957
 </IRQ>
 do_softirq.part.20+0x14d/0x190 kernel/softirq.c:328
 do_softirq kernel/softirq.c:176 [inline]
 __local_bh_enable_ip+0x135/0x160 kernel/softirq.c:181
 local_bh_enable include/linux/bottom_half.h:31 [inline]
 tun_rx_batched.isra.43+0x603/0x860 drivers/net/tun.c:1219
 tun_get_user+0x11dd/0x2150 drivers/net/tun.c:1553
 tun_chr_write_iter+0xde/0x190 drivers/net/tun.c:1579
 call_write_iter include/linux/fs.h:1770 [inline]
 new_sync_write fs/read_write.c:468 [inline]
 __vfs_write+0x68a/0x970 fs/read_write.c:481
 vfs_write+0x18f/0x510 fs/read_write.c:543
 SYSC_write fs/read_write.c:588 [inline]
 SyS_write+0xef/0x220 fs/read_write.c:580
 entry_SYSCALL_64_fastpath+0x1f/0xbe
RIP: 0033:0x40c691
RSP: 002b:00007f1e4f648c00 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 000000000000004a RCX: 000000000040c691
RDX: 000000000000004a RSI: 0000000020e88000 RDI: 0000000000000015
RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000293 R12: 00000000ffffffff
R13: 0000000000000450 R14: 00000000006e3510 R15: 00000000209f4000

Allocated by task 22980:
 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59
 save_stack+0x43/0xd0 mm/kasan/kasan.c:447
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:551
 __do_kmalloc mm/slab.c:3725 [inline]
 __kmalloc+0x162/0x760 mm/slab.c:3734
 kmalloc_array include/linux/slab.h:612 [inline]
 kcalloc include/linux/slab.h:623 [inline]
 __rds_conn_create+0x4cc/0x1870 net/rds/connection.c:176
 rds_conn_create_outgoing+0x3f/0x50 net/rds/connection.c:303
 rds_sendmsg+0xd6c/0x1f90 net/rds/send.c:1112
 sock_sendmsg_nosec net/socket.c:633 [inline]
 sock_sendmsg+0xca/0x110 net/socket.c:643
 SYSC_sendto+0x358/0x5a0 net/socket.c:1750
 SyS_sendto+0x40/0x50 net/socket.c:1718
 entry_SYSCALL_64_fastpath+0x1f/0xbe

Freed by task 22385:
 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59
 save_stack+0x43/0xd0 mm/kasan/kasan.c:447
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524
 __cache_free mm/slab.c:3503 [inline]
 kfree+0xca/0x250 mm/slab.c:3820
 kvfree+0x36/0x60 mm/util.c:416
 netdev_freemem net/core/dev.c:7970 [inline]
 free_netdev+0x2cf/0x360 net/core/dev.c:8132
 tun_set_iff drivers/net/tun.c:2105 [inline]
 __tun_chr_ioctl+0x2cf6/0x3d20 drivers/net/tun.c:2276
 tun_chr_ioctl+0x2a/0x40 drivers/net/tun.c:2521
 vfs_ioctl fs/ioctl.c:45 [inline]
 do_vfs_ioctl+0x1b1/0x1530 fs/ioctl.c:685
 SYSC_ioctl fs/ioctl.c:700 [inline]
 SyS_ioctl+0x8f/0xc0 fs/ioctl.c:691
 entry_SYSCALL_64_fastpath+0x1f/0xbe

The buggy address belongs to the object at ffff88004c9e8640
 which belongs to the cache kmalloc-16384 of size 16384
The buggy address is located 13320 bytes inside of
 16384-byte region [ffff88004c9e8640, ffff88004c9ec640)
The buggy address belongs to the page:
page:ffffea0001327a00 count:1 mapcount:0 mapping:ffff88004c9e8640 index:0x0 compound_mapcount: 0
flags: 0x500000000008100(slab|head)
raw: 0500000000008100 ffff88004c9e8640 0000000000000000 0000000100000001
raw: ffffea00013b6620 ffffea0001362020 ffff88003e802200 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff88004c9eb900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88004c9eb980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88004c9eba00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                              ^
 ffff88004c9eba80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88004c9ebb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (19):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2017/09/18 17:22 linux-next fc2e8b1a47c1 2bab8ad8 .config console log report skylake-linux-next-kasan-qemu
2017/09/17 08:02 linux-next 1f183459b514 da1873aa .config console log report skylake-linux-next-kasan-qemu
2017/09/16 07:15 linux-next 1f183459b514 da1873aa .config console log report skylake-linux-next-kasan-qemu
2017/09/15 19:56 linux-next 1f183459b514 da1873aa .config console log report skylake-linux-next-kasan-qemu
2017/09/14 05:41 linux-next 31fc38c47623 96b8e399 .config console log report skylake-linux-next-kasan-qemu
2017/09/13 21:32 linux-next 6f20b7a58cb9 96b8e399 .config console log report skylake-linux-next-kasan-qemu
2017/09/11 22:38 linux-next a31cc455c512 449b6f15 .config console log report ci-upstream-next-kasan-gce
2017/09/11 08:57 linux-next a31cc455c512 449b6f15 .config console log report ci-upstream-next-kasan-gce
2017/09/10 18:49 linux-next 58bcd35f859b d18bfda0 .config console log report skylake-linux-next-kasan-qemu
2017/09/10 10:20 linux-next 58bcd35f859b d18bfda0 .config console log report skylake-linux-next-kasan-qemu
2017/09/09 11:16 linux-next 58bcd35f859b d18bfda0 .config console log report skylake-linux-next-kasan-qemu
2017/09/06 22:08 linux-next e9fcbcd00963 0ed1da4a .config console log report skylake-linux-next-kasan-qemu
2017/09/06 14:20 linux-next e9fcbcd00963 0ed1da4a .config console log report skylake-linux-next-kasan-qemu
2017/09/05 08:41 linux-next 744c56def809 0ed1da4a .config console log report skylake-linux-next-kasan-qemu
2017/09/05 02:23 linux-next 9829d9f31f6c f400a0da .config console log report skylake-linux-next-kasan-qemu
2017/09/04 16:17 linux-next 9829d9f31f6c f400a0da .config console log report ci-upstream-next-kasan-gce
2017/09/04 08:43 linux-next 1d53d908b79d a54dce00 .config console log report ci-upstream-next-kasan-gce
2017/09/02 16:40 linux-next 1d53d908b79d a54dce00 .config console log report ci-upstream-next-kasan-gce
2017/09/01 21:39 linux-next 1d53d908b79d a54dce00 .config console log report ci-upstream-next-kasan-gce
* Struck through repros no longer work on HEAD.