[v6.1] general protection fault in security_inode_getattr

0 views
Skip to first unread message

syzbot

unread,
Apr 21, 2024, 9:07:19 PM (14 days ago) Apr 21
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 6741e066ec76 Linux 6.1.87
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=12b9daf5180000
kernel config: https://syzkaller.appspot.com/x/.config?x=3fc2f61bd0ae457
dashboard link: https://syzkaller.appspot.com/bug?extid=968ba20f3b15435ad5bb
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/b606a22ddf4b/disk-6741e066.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/e31c21737449/vmlinux-6741e066.xz
kernel image: https://storage.googleapis.com/syzbot-assets/ee0cb8c049e9/bzImage-6741e066.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+968ba2...@syzkaller.appspotmail.com

general protection fault, probably for non-canonical address 0xdffffc000000000d: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000068-0x000000000000006f]
CPU: 1 PID: 5629 Comm: syz-executor.4 Not tainted 6.1.87-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
RIP: 0010:d_backing_inode include/linux/dcache.h:543 [inline]
RIP: 0010:security_inode_getattr+0x42/0x120 security/security.c:1359
Code: 9a fd 49 8d 5f 08 48 89 d8 48 c1 e8 03 42 80 3c 20 00 74 08 48 89 df e8 bc 05 f2 fd 48 8b 2b 48 83 c5 68 48 89 e8 48 c1 e8 03 <42> 80 3c 20 00 74 08 48 89 ef e8 9f 05 f2 fd 48 8b 6d 00 48 83 c5
RSP: 0018:ffffc900034ff080 EFLAGS: 00010202
RAX: 000000000000000d RBX: ffffc900034ff558 RCX: 0000000000040000
RDX: ffffc9000a699000 RSI: 00000000000008dc RDI: 00000000000008dd
RBP: 0000000000000068 R08: dffffc0000000000 R09: ffffc900034ff550
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffffc900034ff560 R14: 0000000000000000 R15: ffffc900034ff550
FS: 00007f2b5c5a66c0(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f5564f79198 CR3: 000000005537f000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
vfs_getattr+0x26/0x360 fs/stat.c:158
ovl_copy_up_one fs/overlayfs/copy_up.c:974 [inline]
ovl_copy_up_flags+0x5e6/0x3e70 fs/overlayfs/copy_up.c:1060
ovl_maybe_copy_up+0x14e/0x180 fs/overlayfs/copy_up.c:1092
ovl_open+0x108/0x2a0 fs/overlayfs/file.c:152
do_dentry_open+0x7f9/0x10f0 fs/open.c:882
do_open fs/namei.c:3628 [inline]
path_openat+0x2644/0x2e60 fs/namei.c:3785
do_filp_open+0x230/0x480 fs/namei.c:3812
do_sys_openat2+0x13b/0x500 fs/open.c:1318
do_sys_open fs/open.c:1334 [inline]
__do_sys_openat fs/open.c:1350 [inline]
__se_sys_openat fs/open.c:1345 [inline]
__x64_sys_openat+0x243/0x290 fs/open.c:1345
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f2b5b87dea9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f2b5c5a60c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f2b5b9ac050 RCX: 00007f2b5b87dea9
RDX: 0000000000000002 RSI: 0000000020000080 RDI: 000000000000000a
RBP: 00007f2b5b8ca4a4 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000006e R14: 00007f2b5b9ac050 R15: 00007ffeafed90c8
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:d_backing_inode include/linux/dcache.h:543 [inline]
RIP: 0010:security_inode_getattr+0x42/0x120 security/security.c:1359
Code: 9a fd 49 8d 5f 08 48 89 d8 48 c1 e8 03 42 80 3c 20 00 74 08 48 89 df e8 bc 05 f2 fd 48 8b 2b 48 83 c5 68 48 89 e8 48 c1 e8 03 <42> 80 3c 20 00 74 08 48 89 ef e8 9f 05 f2 fd 48 8b 6d 00 48 83 c5
RSP: 0018:ffffc900034ff080 EFLAGS: 00010202
RAX: 000000000000000d RBX: ffffc900034ff558 RCX: 0000000000040000
RDX: ffffc9000a699000 RSI: 00000000000008dc RDI: 00000000000008dd
RBP: 0000000000000068 R08: dffffc0000000000 R09: ffffc900034ff550
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffffc900034ff560 R14: 0000000000000000 R15: ffffc900034ff550
FS: 00007f2b5c5a66c0(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000201d8000 CR3: 000000005537f000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 1 bytes skipped:
0: fd std
1: 49 8d 5f 08 lea 0x8(%r15),%rbx
5: 48 89 d8 mov %rbx,%rax
8: 48 c1 e8 03 shr $0x3,%rax
c: 42 80 3c 20 00 cmpb $0x0,(%rax,%r12,1)
11: 74 08 je 0x1b
13: 48 89 df mov %rbx,%rdi
16: e8 bc 05 f2 fd call 0xfdf205d7
1b: 48 8b 2b mov (%rbx),%rbp
1e: 48 83 c5 68 add $0x68,%rbp
22: 48 89 e8 mov %rbp,%rax
25: 48 c1 e8 03 shr $0x3,%rax
* 29: 42 80 3c 20 00 cmpb $0x0,(%rax,%r12,1) <-- trapping instruction
2e: 74 08 je 0x38
30: 48 89 ef mov %rbp,%rdi
33: e8 9f 05 f2 fd call 0xfdf205d7
38: 48 8b 6d 00 mov 0x0(%rbp),%rbp
3c: 48 rex.W
3d: 83 .byte 0x83
3e: c5 .byte 0xc5


---
This report 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 syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages