syzbot


KASAN: null-ptr-deref Write in simple_write_to_buffer

Status: fixed on 2018/07/09 18:05
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+ae590932da6e45d6564d@syzkaller.appspotmail.com
Fix commit: fc14eebfc208 PM / hibernate: Fix oops at snapshot_write()
First crash: 2393d, last: 2368d
Discussions (7)
Title Replies (including bot) Last reply
[PATCH 4.4 00/43] 4.4.141-stable review 53 (53) 2018/08/22 21:43
[PATCH 3.18 00/29] 3.18.116-stable review 32 (32) 2018/07/22 11:42
[PATCH 4.17 00/67] 4.17.7-stable review 74 (74) 2018/07/17 09:41
[PATCH 4.9 00/32] 4.9.113-stable review 53 (53) 2018/07/17 08:14
[PATCH 4.14 00/54] 4.14.56-stable review 57 (57) 2018/07/17 08:04
[PATCH] PM / hibernate: Fix oops at snapshot_write(). 2 (2) 2018/05/29 08:48
KASAN: null-ptr-deref Write in simple_write_to_buffer 1 (2) 2018/05/07 10:15

Sample crash report:
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
Restarting kernel threads ... done.
Restarting kernel threads ... done.
==================================================================
BUG: KASAN: null-ptr-deref in _copy_from_user+0x100/0x150 lib/usercopy.c:12
Write of size 1144 at addr 0000000000000478 by task syz-executor800/4494

CPU: 0 PID: 4494 Comm: syz-executor800 Not tainted 4.17.0-rc7+ #74
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+0x1b9/0x294 lib/dump_stack.c:113
 kasan_report_error mm/kasan/report.c:352 [inline]
 kasan_report.cold.7+0x6d/0x2fe mm/kasan/report.c:412
 check_memory_region_inline mm/kasan/kasan.c:260 [inline]
 check_memory_region+0x13e/0x1b0 mm/kasan/kasan.c:267
 kasan_check_write+0x14/0x20 mm/kasan/kasan.c:278
 _copy_from_user+0x100/0x150 lib/usercopy.c:12
 copy_from_user include/linux/uaccess.h:147 [inline]
 simple_write_to_buffer+0xaf/0x130 fs/libfs.c:669
 snapshot_write+0x16d/0x270 kernel/power/user.c:189
 __vfs_write+0x10b/0x960 fs/read_write.c:485
 vfs_write+0x1f8/0x560 fs/read_write.c:549
 ksys_write+0xf9/0x250 fs/read_write.c:598
 __do_sys_write fs/read_write.c:610 [inline]
 __se_sys_write fs/read_write.c:607 [inline]
 __x64_sys_write+0x73/0xb0 fs/read_write.c:607
 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x445d49
RSP: 002b:00007f320d3bada8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00000000006dac54 RCX: 0000000000445d49
RDX: 0000000000000478 RSI: 0000000020000200 RDI: 0000000000000003
RBP: 0000000000000000 R08: 00007f320d3bb700 R09: 0000000000000000
R10: 00007f320d3bb700 R11: 0000000000000246 R12: 00000000006dac50
R13: 616e732f7665642f R14: 00007f320d3bb9c0 R15: 0000000000000005
==================================================================

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/05/30 11:57 upstream 0044cdeb7313 2f93b54f .config console log report syz C ci-upstream-kasan-gce-root
2018/05/05 13:23 upstream c1c07416cdd4 6a0382b5 .config console log report syz C ci-upstream-kasan-gce-root
2018/05/07 00:46 upstream 701e39d05119 a211da1a .config console log report ci-upstream-kasan-gce-root
2018/05/06 15:39 upstream ee946c36be21 6c18ddb0 .config console log report ci-upstream-kasan-gce-root
2018/05/05 13:12 upstream c1c07416cdd4 6a0382b5 .config console log report ci-upstream-kasan-gce-root
* Struck through repros no longer work on HEAD.