syzbot


BUG: bad usercopy in old_dev_ioctl

Status: closed as dup on 2017/12/31 08:10
Subsystems: hardening mm
[Documentation on labels]
Reported-by: syzbot+5e56fb40e0f2bc3f20402f782f0b3913cb959acc@syzkaller.appspotmail.com
First crash: 2495d, last: 2472d
Duplicate of
Title Repro Cause bisect Fix bisect Count Last Reported
KASAN: use-after-free Read in __list_del_entry_valid (2) crypto C 11 2489d 2491d

Sample crash report:
usercopy: kernel memory exposure attempt detected from 00000000be1d9136 (kmalloc-1024) (1024 bytes)
------------[ cut here ]------------
kernel BUG at mm/usercopy.c:72!
invalid opcode: 0000 [#1] SMP KASAN
Dumping ftrace buffer:
   (ftrace buffer empty)
Modules linked in:
CPU: 0 PID: 12505 Comm: syz-executor1 Not tainted 4.15.0-rc5+ #176
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:report_usercopy mm/usercopy.c:64 [inline]
RIP: 0010:__check_object_size+0x3a2/0x4f0 mm/usercopy.c:264
RSP: 0018:ffff8801d0117858 EFLAGS: 00010286
RAX: 0000000000000063 RBX: ffffffff8592bbe0 RCX: 0000000000000000
RDX: 0000000000000063 RSI: ffffc90002500000 RDI: ffffed003a022eff
RBP: ffff8801d0117948 R08: 1ffff1003a022e8d R09: 0000000000000000
R10: 00000000bf01ee3b R11: 0000000000000000 R12: ffffffff8592bba0
R13: ffff8801d565d710 R14: 0000000000000400 R15: ffffea0007559700
FS:  00007fee238d8700(0000) GS:ffff8801db200000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020f89f68 CR3: 00000001cff7a002 CR4: 00000000001606f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 check_object_size include/linux/thread_info.h:112 [inline]
 check_copy_size include/linux/thread_info.h:143 [inline]
 copy_to_user include/linux/uaccess.h:154 [inline]
 old_dev_ioctl.isra.1+0x105b/0x1fa0 net/bridge/br_ioctl.c:178
 br_dev_ioctl+0x44/0xc0 net/bridge/br_ioctl.c:392
 dev_ifsioc+0x333/0x9b0 net/core/dev_ioctl.c:354
 dev_ioctl+0xa73/0xfb0 net/core/dev_ioctl.c:589
 sock_ioctl+0x1da/0x440 net/socket.c:990
 vfs_ioctl fs/ioctl.c:46 [inline]
 do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686
 SYSC_ioctl fs/ioctl.c:701 [inline]
 SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
 entry_SYSCALL_64_fastpath+0x23/0x9a
RIP: 0033:0x452ac9
RSP: 002b:00007fee238d7c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000452ac9
RDX: 0000000020971000 RSI: 00000000000089f0 RDI: 0000000000000013
RBP: 0000000000000567 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f6248
R13: 00000000ffffffff R14: 00007fee238d86d4 R15: 0000000000000000
Code: 48 0f 44 da e8 70 5b c0 ff 48 8b 85 28 ff ff ff 4d 89 f1 4c 89 e9 4c 89 e2 48 89 de 48 c7 c7 20 bc 92 85 49 89 c0 e8 e6 10 aa ff <0f> 0b 48 c7 c0 e0 b9 92 85 eb 96 48 c7 c0 20 ba 92 85 eb 8d 48 
RIP: report_usercopy mm/usercopy.c:64 [inline] RSP: ffff8801d0117858
RIP: __check_object_size+0x3a2/0x4f0 mm/usercopy.c:264 RSP: ffff8801d0117858
---[ end trace c31af8d2bf176e1e ]---
Kernel panic - not syncing: Fatal exception
Dumping ftrace buffer:
   (ftrace buffer empty)
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (13):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/01/05 16:20 net-next-old 72deacce011b 00193447 .config console log report ci-upstream-net-kasan-gce
2018/01/02 08:40 net-next-old 6bb8824732f6 00193447 .config console log report ci-upstream-net-kasan-gce
2018/01/01 21:28 net-next-old 6bb8824732f6 00193447 .config console log report ci-upstream-net-kasan-gce
2017/12/31 09:31 net-next-old 6bb8824732f6 bb6384b8 .config console log report ci-upstream-net-kasan-gce
2017/12/31 03:25 net-next-old 6bb8824732f6 bb6384b8 .config console log report ci-upstream-net-kasan-gce
2017/12/30 20:18 net-next-old 6bb8824732f6 bb6384b8 .config console log report ci-upstream-net-kasan-gce
2017/12/30 17:07 net-next-old 6bb8824732f6 bb6384b8 .config console log report ci-upstream-net-kasan-gce
2017/12/22 08:14 net-next-old 90bbec0f912a 81fe66b4 .config console log report ci-upstream-net-kasan-gce
2017/12/18 11:21 net-next-old c30abd5e40dd d5beb42a .config console log report ci-upstream-net-kasan-gce
2017/12/17 20:09 net-next-old c30abd5e40dd d5beb42a .config console log report ci-upstream-net-kasan-gce
2017/12/17 12:02 net-next-old c30abd5e40dd d5beb42a .config console log report ci-upstream-net-kasan-gce
2017/12/13 06:31 net-next-old 48d79b49e168 ce7f2399 .config console log report ci-upstream-net-kasan-gce
2017/12/15 18:51 linux-next 6084b576dca2 ac20b98c .config console log report ci-upstream-next-kasan-gce
* Struck through repros no longer work on HEAD.