syzbot
linux-next boot error: general protection fault in tomoyo_get_local_path
Status:
fixed on 2020/07/17 17:58
Subsystems:
fs
[Documentation on labels]
Reported-by: syzbot+c1af344512918c61362c@syzkaller.appspotmail.com
Fix commit:
9d78edeaec75
proc: proc_pid_ns takes super_block as an argument
First crash: 2261d, last: 2255d
Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000005: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000028-0x000000000000002f]
CPU: 0 PID: 6551 Comm: sshd Not tainted 5.7.0-rc6-next-20200519-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:tomoyo_get_local_path+0x450/0x800 security/tomoyo/realpath.c:165
Code: 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 b4 03 00 00 48 b8 00 00 00 00 00 fc ff df 4d 8b 7f 60 49 8d 7f 28 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 87 03 00 00 48 b8 00 00 00 00 00 fc ff df 4d 8b
RSP: 0018:ffffc90004c57450 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: ffff88809927a000 RCX: ffffffff836abeca
RDX: 0000000000000005 RSI: ffffffff836abed8 RDI: 0000000000000028
RBP: 1ffff9200098ae8b R08: ffff88809a234480 R09: fffffbfff1557d5a
R10: ffffffff8aabeacf R11: fffffbfff1557d59 R12: ffff8880973c0fea
R13: ffff8880973c0000 R14: 0000000000001997 R15: 0000000000000000
FS: 00007f9e6d9ea8c0(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055d8b71178f5 CR3: 000000009118a000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
tomoyo_realpath_from_path+0x393/0x620 security/tomoyo/realpath.c:282
tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
tomoyo_path_number_perm+0x1c2/0x4d0 security/tomoyo/file.c:723
tomoyo_path_mknod+0x10d/0x190 security/tomoyo/tomoyo.c:246
security_path_mknod+0x116/0x180 security/security.c:1072
may_o_create fs/namei.c:2905 [inline]
lookup_open+0x5ae/0x1320 fs/namei.c:3046
open_last_lookups fs/namei.c:3155 [inline]
path_openat+0x93c/0x2750 fs/namei.c:3343
do_filp_open+0x192/0x260 fs/namei.c:3373
do_sys_openat2+0x585/0x7d0 fs/open.c:1179
do_sys_open+0xc3/0x140 fs/open.c:1195
do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295
entry_SYSCALL_64_after_hwframe+0x49/0xb3
RIP: 0033:0x7f9e6bb536f0
Code: 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 83 3d 19 30 2c 00 00 75 10 b8 02 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 fe 9d 01 00 48 89 04 24
RSP: 002b:00007ffcb6e3d3a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000002
RAX: ffffffffffffffda RBX: 000055d8b7ef1410 RCX: 00007f9e6bb536f0
RDX: 00000000000001b6 RSI: 0000000000000241 RDI: 000055d8b71178f5
RBP: 0000000000000004 R08: 0000000000000004 R09: 0000000000000001
R10: 0000000000000240 R11: 0000000000000246 R12: 000055d8b70e851e
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace a2e646a8381be3e1 ]---
RIP: 0010:tomoyo_get_local_path+0x450/0x800 security/tomoyo/realpath.c:165
Code: 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 b4 03 00 00 48 b8 00 00 00 00 00 fc ff df 4d 8b 7f 60 49 8d 7f 28 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 87 03 00 00 48 b8 00 00 00 00 00 fc ff df 4d 8b
RSP: 0018:ffffc90004c57450 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: ffff88809927a000 RCX: ffffffff836abeca
RDX: 0000000000000005 RSI: ffffffff836abed8 RDI: 0000000000000028
RBP: 1ffff9200098ae8b R08: ffff88809a234480 R09: fffffbfff1557d5a
R10: ffffffff8aabeacf R11: fffffbfff1557d59 R12: ffff8880973c0fea
R13: ffff8880973c0000 R14: 0000000000001997 R15: 0000000000000000
FS: 00007f9e6d9ea8c0(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000563d6fbcb6c8 CR3: 000000009118a000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
* Struck through repros no longer work on HEAD.