================================================================== BUG: KASAN: stack-out-of-bounds in locks_remove_flock+0x33c/0x350 fs/locks.c:2567 Read of size 8 at addr ffff8801ba947a08 by task udevd/5630 CPU: 1 PID: 5630 Comm: udevd Not tainted 4.20.0-rc1-next-20181107+ #107 kernel tried to execute NX-protected page - exploit attempt? (uid: 0) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 BUG: unable to handle kernel paging request at ffff88018c807a38 Call Trace: PGD be01067 P4D be01067 PUD 1bff5e063 PMD 800000018c8001e3 __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x244/0x39d lib/dump_stack.c:113 Oops: 0011 [#1] PREEMPT SMP KASAN CPU: 0 PID: 1960 Comm: syz-executor4 Not tainted 4.20.0-rc1-next-20181107+ #107 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:0xffff88018c807a38 print_address_description.cold.7+0x9/0x1ff mm/kasan/report.c:256 Code: ff ff 48 53 65 8a ff ff ff ff 28 7a 80 8c 01 88 ff ff b6 9e 7f 81 ff ff ff ff 90 7b 80 8c 01 88 ff ff 00 bf db 95 f2 99 a0 58 80 01 c3 01 88 ff ff 00 75 42 cc 01 88 ff ff a8 7a 80 8c 01 88 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.8+0x242/0x309 mm/kasan/report.c:412 RSP: 0018:ffff88018c807878 EFLAGS: 00010293 RAX: ffff8801b936c540 RBX: ffff88018c807a38 RCX: ffffffff81ed5dac __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 RDX: 0000000000000000 RSI: ffffffff81ed5c9e RDI: ffff88018c8078f8 locks_remove_flock+0x33c/0x350 fs/locks.c:2567 RBP: ffff88018c807a60 R08: ffff8801b936c540 R09: ffffed003b5c5b67 R10: ffffed003b5c5b67 R11: ffff8801dae2db3b R12: ffff8801cc427500 R13: ffff88018c8078f8 R14: 1ffff10031900f13 R15: dffffc0000000000 FS: 000000000197b940(0000) GS:ffff8801dae00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff88018c807a38 CR3: 00000001d58e6000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: locks_remove_file+0x148/0x5c0 fs/locks.c:2607 __fput+0x2f0/0xa70 fs/file_table.c:271 locks_remove_file+0x148/0x5c0 fs/locks.c:2607 ____fput+0x15/0x20 fs/file_table.c:312 task_work_run+0x1e8/0x2a0 kernel/task_work.c:113 __fput+0x2f0/0xa70 fs/file_table.c:271 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x318/0x380 arch/x86/entry/common.c:166 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath arch/x86/entry/common.c:268 [inline] do_syscall_64+0x6be/0x820 arch/x86/entry/common.c:293 ____fput+0x15/0x20 fs/file_table.c:312 task_work_run+0x1e8/0x2a0 kernel/task_work.c:113 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f25c0df12b0 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x318/0x380 arch/x86/entry/common.c:166 Code: 40 75 0b 31 c0 48 83 c4 08 e9 0c ff ff ff 48 8d 3d c5 32 08 00 e8 c0 07 02 00 83 3d 45 a3 2b 00 00 75 10 b8 03 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 ce 8a 01 00 48 89 04 24 RSP: 002b:00007ffc96763068 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000737250 RCX: 00007f25c0df12b0 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath arch/x86/entry/common.c:268 [inline] do_syscall_64+0x6be/0x820 arch/x86/entry/common.c:293 RDX: 00007ffc967662c0 RSI: 0000000000000002 RDI: 0000000000000007 RBP: 0000000000625500 R08: 00007ffc967d70b0 R09: 00007ffc967d7080 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffc96763140 R13: 0000000000000001 R14: 00007ffc967630d4 R15: 0000000000737250 The buggy address belongs to the page: page:ffffea0006ea51c0 count:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x2fffc0000000000() entry_SYSCALL_64_after_hwframe+0x49/0xbe raw: 02fffc0000000000 0000000000000000 ffffffff06ea0101 0000000000000000 RIP: 0033:0x411021 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 Code: 75 14 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 34 19 00 00 c3 48 83 ec 08 e8 0a fc ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 53 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01 page dumped because: kasan: bad access detected RSP: 002b:00007fff1b24d3a0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000004 RCX: 0000000000411021 Memory state around the buggy address: RDX: 0000000000000000 RSI: 0000000000730c20 RDI: 0000000000000003 ffff8801ba947900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 ffff8801ba947980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R10: 00007fff1b24d2c0 R11: 0000000000000293 R12: 0000000000000000 >ffff8801ba947a00: f2 f2 f2 00 00 00 00 00 00 00 00 00 00 00 00 00 R13: 0000000000000001 R14: 00000000000003a1 R15: 0000000000000004 ^ Modules linked in: ffff8801ba947a80: 00 f1 f1 f1 f1 00 00 f2 f2 f2 f2 f2 f2 f8 f2 f2 CR2: ffff88018c807a38 ffff8801ba947b00: f2 f2 f2 f2 f2 00 f2 f2 f2 00 00 00 00 00 00 00 ---[ end trace 0f4204cb2d5c0c3b ]--- ================================================================== RIP: 0010:0xffff88018c807a38 kobject: 'loop1' (0000000035c71721): kobject_uevent_env Code: ff ff 48 53 65 8a ff ff ff ff 28 7a 80 8c 01 88 ff ff b6 9e 7f 81 ff ff ff ff 90 7b 80 8c 01 88 ff ff 00 bf db 95 f2 99 a0 58 80 01 c3 01 88 ff ff 00 75 42 cc 01 88 ff ff a8 7a 80 8c 01 88 kobject: 'loop1' (0000000035c71721): fill_kobj_path: path = '/devices/virtual/block/loop1' RSP: 0018:ffff88018c807878 EFLAGS: 00010293 RAX: ffff8801b936c540 RBX: ffff88018c807a38 RCX: ffffffff81ed5dac RDX: 0000000000000000 RSI: ffffffff81ed5c9e RDI: ffff88018c8078f8 RBP: ffff88018c807a60 R08: ffff8801b936c540 R09: ffffed003b5c5b67 R10: ffffed003b5c5b67 R11: ffff8801dae2db3b R12: ffff8801cc427500 R13: ffff88018c8078f8 R14: 1ffff10031900f13 R15: dffffc0000000000 FS: 000000000197b940(0000) GS:ffff8801dae00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff88018c807a38 CR3: 00000001d58e6000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400