WARNING in get_mode_access
From: Ubisectech Sirius
Date: Mon Jul 08 2024 - 02:20:20 EST
Hello.
We are Ubisectech Sirius Team, the vulnerability lab of China ValiantSec. Recently, our team has discovered a issue in Linux kernel 6.10.0-rc6-g1dfe225e9af5. Attached to the email were a PoC file of the issue.
Stack dump:
------------[ cut here ]------------
WARNING: CPU: 1 PID: 18205 at security/landlock/fs.c:971 get_mode_access security/landlock/fs.c:971 [inline]
WARNING: CPU: 1 PID: 18205 at security/landlock/fs.c:971 get_mode_access+0xc2/0xd0 security/landlock/fs.c:951
Modules linked in:
CPU: 1 PID: 18205 Comm: syz.1.554 Not tainted 6.10.0-rc6-g1dfe225e9af5 #48
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:get_mode_access security/landlock/fs.c:971 [inline]
RIP: 0010:get_mode_access+0xc2/0xd0 security/landlock/fs.c:951
Code: fb 00 10 75 1f 41 bc 00 04 00 00 eb ac 66 81 fb 00 80 75 10 41 bc 00 01 00 00 eb 9d 41 bc 00 08 00 00 eb 95 e8 3f 71 64 fd 90 <0f> 0b 90 45 31 e4 eb 87 66 0f 1f 44 00 00 90 90 90 90 90 90 90 90
RSP: 0018:ffffc90001d8fc58 EFLAGS: 00010212
RAX: 0000000000003511 RBX: 000000000000f000 RCX: ffffc9001560d000
RDX: 0000000000040000 RSI: ffffffff84281551 RDI: 0000000000000003
RBP: ffff8880608b5300 R08: 0000000000000003 R09: 000000000000c000
R10: 000000000000f000 R11: 0000000000000000 R12: 0000000000001000
R13: ffffc90001d8fe78 R14: 0000000000000000 R15: 0000000000000000
FS: 00007ff4f67ff640(0000) GS:ffff88807ec00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f5efa82dff8 CR3: 0000000028cf2000 CR4: 0000000000750ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
PKRU: 55555554
Call Trace:
<TASK>
current_check_refer_path+0x2a6/0x7c0 security/landlock/fs.c:1132
security_path_link+0xc3/0x130 security/security.c:1894
do_linkat+0x3bc/0x5c0 fs/namei.c:4686
__do_sys_linkat fs/namei.c:4717 [inline]
__se_sys_linkat fs/namei.c:4714 [inline]
__x64_sys_linkat+0xf7/0x140 fs/namei.c:4714
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcb/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7ff4f6d958cd
Code: 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ff4f67fefa8 EFLAGS: 00000246 ORIG_RAX: 0000000000000109
RAX: ffffffffffffffda RBX: 00007ff4f6f33fa0 RCX: 00007ff4f6d958cd
RDX: 0000000000000004 RSI: 0000000020000180 RDI: 0000000000000004
RBP: 00007ff4f6e2d6e6 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000020000640 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007ff4f6f33fa0 R15: 00007ff4f67df000
</TASK>
Thank you for taking the time to read this email and we look forward to working with you further.
Attachment:
poc.c
Description: Binary data