syzbot


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

Status: auto-closed as invalid on 2021/01/26 06:16
Reported-by: syzbot+9e9b4b1174f911484cbe@syzkaller.appspotmail.com
First crash: 1589d, last: 1515d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-out-of-bounds Write in __internal_add_timer 4 2622d 2577d 0/28 closed as invalid on 2017/11/05 08:51
android-54 KASAN: slab-out-of-bounds Write in __internal_add_timer (2) 4 1202d 1377d 0/2 auto-closed as invalid on 2021/12/05 06:45
android-54 KASAN: use-after-free Write in __internal_add_timer C 155 660d 1601d 0/2 upstream: reported C repro on 2020/07/04 17:00

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in hlist_add_head include/linux/list.h:787 [inline]
BUG: KASAN: slab-out-of-bounds in enqueue_timer kernel/time/timer.c:541 [inline]
BUG: KASAN: slab-out-of-bounds in __internal_add_timer+0x291/0x490 kernel/time/timer.c:554
Write of size 8 at addr ffff8881cc34f1c8 by task syz-executor.0/24288

CPU: 0 PID: 24288 Comm: syz-executor.0 Not tainted 5.4.68-syzkaller-00463-g14bc969ca0c4 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1b0/0x21e lib/dump_stack.c:118
 print_address_description+0x96/0x5d0 mm/kasan/report.c:374
 __kasan_report+0x14b/0x1c0 mm/kasan/report.c:506
 kasan_report+0x27/0x50 mm/kasan/common.c:634
 hlist_add_head include/linux/list.h:787 [inline]
 enqueue_timer kernel/time/timer.c:541 [inline]
 __internal_add_timer+0x291/0x490 kernel/time/timer.c:554
 internal_add_timer kernel/time/timer.c:604 [inline]
 __mod_timer+0xc10/0x1ca0 kernel/time/timer.c:1065
 tun_flow_init drivers/net/tun.c:1368 [inline]
 tun_set_iff drivers/net/tun.c:2832 [inline]
 __tun_chr_ioctl+0x34e2/0x49c0 drivers/net/tun.c:3088
 do_vfs_ioctl+0x746/0x16f0 fs/ioctl.c:47
 ksys_ioctl fs/ioctl.c:714 [inline]
 __do_sys_ioctl fs/ioctl.c:721 [inline]
 __se_sys_ioctl fs/ioctl.c:719 [inline]
 __x64_sys_ioctl+0xd4/0x110 fs/ioctl.c:719
 do_syscall_64+0xcb/0x150 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x45e179
Code: 3d b2 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 0b b2 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fc8eeb75c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 000000000001a3c0 RCX: 000000000045e179
RDX: 0000000020000040 RSI: 00000000400454ca RDI: 0000000000000003
RBP: 000000000118cf80 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118cf4c
R13: 00007ffd409541ef R14: 00007fc8eeb769c0 R15: 000000000118cf4c

The buggy address belongs to the page:
page:ffffea000730d300 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 compound_mapcount: 0
flags: 0x8000000000010000(head)
raw: 8000000000010000 dead000000000100 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8881cc34f080: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
 ffff8881cc34f100: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
>ffff8881cc34f180: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
                                              ^
 ffff8881cc34f200: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
 ffff8881cc34f280: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
==================================================================

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/09/28 06:15 android12-5.4 14bc969ca0c4 5dd8aee8 .config console log report info ci2-android-5-4-kasan
2020/08/09 20:24 https://android.googlesource.com/kernel/common android-5.4 99256a8c206b 70301872 .config console log report ci2-android-5-4-kasan
2020/07/21 23:57 https://android.googlesource.com/kernel/common android-5.4 e6cae5574a9a e562dd8a .config console log report ci2-android-5-4-kasan
2020/07/16 01:45 https://android.googlesource.com/kernel/common android-5.4 f9b9ab8db435 ada108d0 .config console log report ci2-android-5-4-kasan
* Struck through repros no longer work on HEAD.