LKML Archive on
help / color / mirror / Atom feed
* KASAN: null-ptr-deref Write in simple_write_to_buffer
@ 2018-05-05 15:47 syzbot
  2018-05-07 10:15 ` Tetsuo Handa
  0 siblings, 1 reply; 2+ messages in thread
From: syzbot @ 2018-05-05 15:47 UTC (permalink / raw)
  To: linux-fsdevel, linux-kernel, syzkaller-bugs, viro


syzbot found the following crash on:

HEAD commit:    c1c07416cdd4 Merge tag 'kbuild-fixes-v4.17' of git://git.k..
git tree:       upstream
console output:
kernel config:
dashboard link:
compiler:       gcc (GCC) 8.0.1 20180413 (experimental)
syzkaller repro:
C reproducer:

IMPORTANT: if you fix the bug, please add the following tag to the commit:

random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
Restarting kernel threads ... done.
BUG: KASAN: null-ptr-deref in _copy_from_user+0x100/0x150 lib/usercopy.c:12
Write of size 32 at addr 0000000000000020 by task syz-executor101/4498

CPU: 1 PID: 4498 Comm: syz-executor101 Not tainted 4.17.0-rc3+ #34
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
RIP: 0033:0x4455a9
RSP: 002b:00007f973a88ada8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00000000006dac24 RCX: 00000000004455a9
RDX: 0000000000000020 RSI: 0000000020000040 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dac20
R13: 616e732f7665642f R14: 00007f973a88b9c0 R15: 0000000000000003

This bug is generated by a bot. It may contain errors.
See for more information about syzbot.
syzbot engineers can be reached at

syzbot will keep track of this bug report.
If you forgot to add the Reported-by tag, once the fix for this bug is  
into any tree, please reply to this email with:
#syz fix: exact-commit-title
If you want to test a patch for this bug, please reply with:
#syz test: git://repo/address.git branch
and provide the patch inline or as an attachment.
To mark this as a duplicate of another syzbot report, please reply with:
#syz dup: exact-subject-of-another-report
If it's a one-off invalid bug report, please reply with:
#syz invalid
Note: if the crash happens again, it will cause creation of a new bug  
Note: all commands must start from beginning of the line in the email body.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-07 10:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-05 15:47 KASAN: null-ptr-deref Write in simple_write_to_buffer syzbot
2018-05-07 10:15 ` Tetsuo Handa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).