[syzbot] [fs?] [mm?] WARNING in path_noexec (2)

1 view
Skip to first unread message

syzbot

unread,
Sep 30, 2025, 4:17:36 PM (yesterday) Sep 30
to bra...@kernel.org, ja...@suse.cz, ke...@kernel.org, linux-...@vger.kernel.org, linux-...@vger.kernel.org, linu...@kvack.org, syzkall...@googlegroups.com, vi...@zeniv.linux.org.uk
Hello,

syzbot found the following issue on:

HEAD commit: 30d4efb2f5a5 Merge tag 'for-linus-6.18-rc1-tag' of git://g..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=14f085cd980000
kernel config: https://syzkaller.appspot.com/x/.config?x=f17deb9fdc33e902
dashboard link: https://syzkaller.appspot.com/bug?extid=a9391462075ffb9f77c6
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=175496e2580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13e5fd6f980000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/d3e36b0a1279/disk-30d4efb2.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/c964999afe48/vmlinux-30d4efb2.xz
kernel image: https://storage.googleapis.com/syzbot-assets/b49e62d3fb02/bzImage-30d4efb2.xz

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

------------[ cut here ]------------
WARNING: CPU: 1 PID: 6000 at fs/exec.c:119 path_noexec+0x1af/0x200 fs/exec.c:118
Modules linked in:
CPU: 1 UID: 0 PID: 6000 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
RIP: 0010:path_noexec+0x1af/0x200 fs/exec.c:118
Code: 02 31 ff 48 89 de e8 c0 e2 89 ff d1 eb eb 07 e8 d7 dd 89 ff b3 01 89 d8 5b 41 5e 41 5f 5d e9 98 51 04 09 cc e8 c2 dd 89 ff 90 <0f> 0b 90 e9 48 ff ff ff 44 89 f1 80 e1 07 80 c1 03 38 c1 0f 8c a6
RSP: 0018:ffffc9000384fbd8 EFLAGS: 00010293
RAX: ffffffff823437ce RBX: ffff888077b40780 RCX: ffff88802eebbc00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000080000 R08: ffff88802eebbc00 R09: 0000000000000003
R10: 0000000000000003 R11: 0000000000000000 R12: 0000000000000011
R13: 1ffff92000709f90 R14: 0000000000000000 R15: dffffc0000000000
FS: 000055558a5c5500(0000) GS:ffff88812647e000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b30b63fff CR3: 00000000213d4000 CR4: 00000000003526f0
Call Trace:
<TASK>
do_mmap+0xa43/0x10d0 mm/mmap.c:469
vm_mmap_pgoff+0x2a6/0x4d0 mm/util.c:580
ksys_mmap_pgoff+0x51f/0x760 mm/mmap.c:604
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fea4258eec9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc0d346898 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 00007fea427e5fa0 RCX: 00007fea4258eec9
RDX: 0000000003000007 RSI: 0000000000003000 RDI: 0000200000000000
RBP: 00007fea42611f91 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000011 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fea427e5fa0 R14: 00007fea427e5fa0 R15: 0000000000000006
</TASK>


---
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 syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

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

Kees Cook

unread,
Sep 30, 2025, 6:04:25 PM (yesterday) Sep 30
to syzbot, bra...@kernel.org, ja...@suse.cz, linux-...@vger.kernel.org, linux-...@vger.kernel.org, linu...@kvack.org, syzkall...@googlegroups.com, vi...@zeniv.linux.org.uk
On Tue, Sep 30, 2025 at 01:17:34PM -0700, syzbot wrote:
> Reported-by: syzbot+a93914...@syzkaller.appspotmail.com
>
> ------------[ cut here ]------------
> WARNING: CPU: 1 PID: 6000 at fs/exec.c:119 path_noexec+0x1af/0x200 fs/exec.c:118

Christian, this is:

bool path_noexec(const struct path *path)
{
/* If it's an anonymous inode make sure that we catch any shenanigans. */
VFS_WARN_ON_ONCE(IS_ANON_FILE(d_inode(path->dentry)) &&
!(path->mnt->mnt_sb->s_iflags & SB_I_NOEXEC));
return (path->mnt->mnt_flags & MNT_NOEXEC) ||
(path->mnt->mnt_sb->s_iflags & SB_I_NOEXEC);
}

> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13e5fd6f980000

I think is from the created fd_dma_buf. I expect this would fix it:


diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index 2bcf9ceca997..6e2ab1a4560d 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -189,6 +189,8 @@ static int dma_buf_fs_init_context(struct fs_context *fc)
{
struct pseudo_fs_context *ctx;

+ fc->s_iflags |= SB_I_NOEXEC;
+ fc->s_iflags |= SB_I_NODEV;
ctx = init_pseudo(fc, DMA_BUF_MAGIC);
if (!ctx)
return -ENOMEM;


Which reminds me, this still isn't landed either for secretmem:
https://lore.kernel.org/all/20250707171735.GE1880847@ZenIV/

--
Kees Cook
Reply all
Reply to author
Forward
0 new messages