Re: BUG: unable to handle kernel paging request in do_mount

From: Sabin Rapan
Date: Mon Sep 24 2018 - 12:09:42 EST


This is fixed by patch vfs: namespace: error pointer dereference in do_remount()

#syz fix: vfs: namespace: error pointer dereference in do_remount()

On 21.09.2018 09:44, syzbot wrote:
> Hello,
>
> syzbot found the following crash on:
>
> HEAD commit:ÂÂÂ a0cb0cabe4bb Add linux-next specific files for 20180920
> git tree:ÂÂÂÂÂÂ linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=164d6511400000
> kernel config:Â https://syzkaller.appspot.com/x/.config?x=786006c5dafbadf6
> dashboard link: https://syzkaller.appspot.com/bug?extid=73c7fe4f77776505299b
> compiler:ÂÂÂÂÂÂ gcc (GCC) 8.0.1 20180413 (experimental)
> syz repro:ÂÂÂÂÂ https://syzkaller.appspot.com/x/repro.syz?x=13650fae400000
> C reproducer:ÂÂ https://syzkaller.appspot.com/x/repro.c?x=118cbf21400000
>
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+73c7fe4f77776505299b@xxxxxxxxxxxxxxxxxxxxxxxxx
>
> RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000440329
> RDX: 0000000020000380 RSI: 00000000200002c0 RDI: 0000000000000000
> RBP: 00000000006cb018 R08: 0000000000000000 R09: 0000000000000034
> R10: 00000000001800a0 R11: 0000000000000246 R12: 0000000000000003
> R13: ffffffffffffffff R14: 0000000000000000 R15: 0000000000000000
> BUG: unable to handle kernel paging request at fffffffffffffff4
> PGD 966d067 P4D 966d067 PUD 966f067 PMD 0
> Oops: 0000 [#1] PREEMPT SMP KASAN
> CPU: 1 PID: 5551 Comm: syz-executor016 Not tainted 4.19.0-rc4-next-20180920+ #76
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
> RIP: 0010:parse_monolithic_mount_data fs/namespace.c:2354 [inline]
> RIP: 0010:do_remount fs/namespace.c:2387 [inline]
> RIP: 0010:do_mount+0xb3b/0x1db0 fs/namespace.c:2950
> Code: 06 00 48 89 c2 48 89 c3 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 24 11 00 00 48 b8 00 00 00 00 00 fc ff df <4c> 8b 33 49 8d 7e 18 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 f8 10
> RSP: 0018:ffff8801bb99fc28 EFLAGS: 00010246
> RAX: dffffc0000000000 RBX: fffffffffffffff4 RCX: 0000000000000000
> RDX: 1ffffffffffffffe RSI: ffffffff81ddffac RDI: 0000000000000282
> RBP: ffff8801bb99fdb0 R08: ffff8801d8b0e600 R09: ffffed003b5a5b57
> R10: ffffed003b5a5b57 R11: ffff8801dad2dabb R12: ffff8801d3666830
> R13: ffff8801c942cb80 R14: ffff8801c942cb80 R15: 0000000000000000
> FS:Â 00000000010de880(0000) GS:ffff8801dad00000(0000) knlGS:0000000000000000
> CS:Â 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: fffffffffffffff4 CR3: 00000001d84b5000 CR4: 00000000001406e0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> Call Trace:
> Âksys_mount+0x12d/0x140 fs/namespace.c:3175
> Â__do_sys_mount fs/namespace.c:3189 [inline]
> Â__se_sys_mount fs/namespace.c:3186 [inline]
> Â__x64_sys_mount+0xbe/0x150 fs/namespace.c:3186
> Âdo_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
> Âentry_SYSCALL_64_after_hwframe+0x49/0xbe
> RIP: 0033:0x440329
> Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 5b 14 fc ff c3 66 2e 0f 1f 84 00 00 00 00
> RSP: 002b:00007ffc6e4c9ec8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
> RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000440329
> RDX: 0000000020000380 RSI: 00000000200002c0 RDI: 0000000000000000
> RBP: 00000000006cb018 R08: 0000000000000000 R09: 0000000000000034
> R10: 00000000001800a0 R11: 0000000000000246 R12: 0000000000000003
> R13: ffffffffffffffff R14: 0000000000000000 R15: 0000000000000000
> Modules linked in:
> CR2: fffffffffffffff4
> ---[ end trace 8aa3e592ff591401 ]---
> RIP: 0010:parse_monolithic_mount_data fs/namespace.c:2354 [inline]
> RIP: 0010:do_remount fs/namespace.c:2387 [inline]
> RIP: 0010:do_mount+0xb3b/0x1db0 fs/namespace.c:2950
> Code: 06 00 48 89 c2 48 89 c3 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 24 11 00 00 48 b8 00 00 00 00 00 fc ff df <4c> 8b 33 49 8d 7e 18 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 f8 10
> RSP: 0018:ffff8801bb99fc28 EFLAGS: 00010246
> RAX: dffffc0000000000 RBX: fffffffffffffff4 RCX: 0000000000000000
> RDX: 1ffffffffffffffe RSI: ffffffff81ddffac RDI: 0000000000000282
> RBP: ffff8801bb99fdb0 R08: ffff8801d8b0e600 R09: ffffed003b5a5b57
> R10: ffffed003b5a5b57 R11: ffff8801dad2dabb R12: ffff8801d3666830
> R13: ffff8801c942cb80 R14: ffff8801c942cb80 R15: 0000000000000000
> FS:Â 00000000010de880(0000) GS:ffff8801dad00000(0000) knlGS:0000000000000000
> CS:Â 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: fffffffffffffff4 CR3: 00000001d84b5000 CR4: 00000000001406e0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
>
>
> ---
> This bug is generated by a bot. It may contain errors.
> See https://goo.gl/tpsmEJ for more information about syzbot.
> syzbot engineers can be reached at syzkaller@xxxxxxxxxxxxxxxxx
>
> syzbot will keep track of this bug report. See:
> https://goo.gl/tpsmEJ#bug-status-tracking for how to communicate with syzbot.
> syzbot can test patches for this bug, for details see:
> https://goo.gl/tpsmEJ#testing-patches
>