syzbot
KASAN: null-ptr-deref Read in xattr_getsecurity
Status:
fixed on 2018/05/08 18:30
Subsystems:
fs
[Documentation on labels]
Reported-by: syzbot+9369930ca44f29e60e2d@syzkaller.appspotmail.com
Fix commit:
1f5781725dcb
commoncap: Handle memory allocation failure.
First crash: 3058d, last: 3014d
Sample crash report:
RDX: 00000000200000c0 RSI: 0000000020000000 RDI: 0000000000000013
RBP: 000000000072bea0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000092 R11: 0000000000000246 R12: 0000000000000014
R13: 0000000000000098 R14: 00000000006f3ee0 R15: 0000000000000002
==================================================================
BUG: KASAN: null-ptr-deref in memcpy include/linux/string.h:345 [inline]
BUG: KASAN: null-ptr-deref in xattr_getsecurity+0x18a/0x1f0 fs/xattr.c:251
Read of size 20 at addr 0000000000000000 by task syz-executor2/6395
xt_nfacct: accounting object `syz1' does not exists
CPU: 0 PID: 6395 Comm: syz-executor2 Not tainted 4.17.0-rc1+ #11
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
memcpy+0x23/0x50 mm/kasan/kasan.c:302
memcpy include/linux/string.h:345 [inline]
xattr_getsecurity+0x18a/0x1f0 fs/xattr.c:251
vfs_getxattr+0xf2/0x160 fs/xattr.c:333
getxattr+0x139/0x2c0 fs/xattr.c:540
__do_sys_fgetxattr fs/xattr.c:598 [inline]
__se_sys_fgetxattr fs/xattr.c:589 [inline]
__x64_sys_fgetxattr+0x188/0x230 fs/xattr.c:589
do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x455389
RSP: 002b:00007f4acd9bec68 EFLAGS: 00000246 ORIG_RAX: 00000000000000c1
RAX: ffffffffffffffda RBX: 00007f4acd9bf6d4 RCX: 0000000000455389
RDX: 00000000200000c0 RSI: 0000000020000000 RDI: 0000000000000013
RBP: 000000000072bea0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000092 R11: 0000000000000246 R12: 0000000000000014
R13: 0000000000000098 R14: 00000000006f3ee0 R15: 0000000000000002
==================================================================
* Struck through repros no longer work on HEAD.