Linux Security Modules development
 help / color / mirror / Atom feed
* [syzbot] [tomoyo?] KMSAN: uninit-value in tomoyo_path_chown (3)
@ 2026-06-17  8:41 syzbot
  2026-06-27  5:43 ` Tetsuo Handa
  0 siblings, 1 reply; 3+ messages in thread
From: syzbot @ 2026-06-17  8:41 UTC (permalink / raw)
  To: jmorris, linux-kernel, linux-security-module, paul,
	penguin-kernel, serge, syzkaller-bugs, takedakn, tomoyo-users_en

Hello,

syzbot found the following issue on:

HEAD commit:    2b414a95b8f7 Merge tag 's390-7.1-5' of git://git.kernel.or..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12cff156580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=a0ca3b8cb3875012
dashboard link: https://syzkaller.appspot.com/bug?extid=eaae8fa60ce81f1e4eeb
compiler:       Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/d7dcdf890eed/disk-2b414a95.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/214784598f3b/vmlinux-2b414a95.xz
kernel image: https://storage.googleapis.com/syzbot-assets/403c25c5a3db/bzImage-2b414a95.xz

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

=====================================================
BUG: KMSAN: uninit-value in tomoyo_path_chown+0x128/0x270 security/tomoyo/tomoyo.c:380
 tomoyo_path_chown+0x128/0x270 security/tomoyo/tomoyo.c:380
 security_path_chown+0x1c0/0x710 security/security.c:1598
 chown_common+0x69f/0xcb0 fs/open.c:771
 do_fchownat+0x20f/0x490 fs/open.c:804
 __do_sys_chown fs/open.c:824 [inline]
 __se_sys_chown fs/open.c:822 [inline]
 __x64_sys_chown+0x9d/0x110 fs/open.c:822
 x64_sys_call+0x30cc/0x3ea0 arch/x86/include/generated/asm/syscalls_64.h:93
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x15d/0x3c0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Local variable newattrs created at:
 chown_common+0xbc/0xcb0 fs/open.c:746
 do_fchownat+0x20f/0x490 fs/open.c:804

CPU: 1 UID: 0 PID: 4943 Comm: udevd Not tainted syzkaller #0 PREEMPT(lazy) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
=====================================================


---
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 syzkaller@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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [syzbot] [tomoyo?] KMSAN: uninit-value in tomoyo_path_chown (3)
  2026-06-17  8:41 [syzbot] [tomoyo?] KMSAN: uninit-value in tomoyo_path_chown (3) syzbot
@ 2026-06-27  5:43 ` Tetsuo Handa
  2026-06-27  5:44   ` syzbot
  0 siblings, 1 reply; 3+ messages in thread
From: Tetsuo Handa @ 2026-06-27  5:43 UTC (permalink / raw)
  To: syzbot, syzkaller-bugs
  Cc: jmorris, linux-kernel, linux-security-module, paul, serge,
	takedakn, linux-fsdevel

On 2026/06/17 17:41, syzbot wrote:
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    2b414a95b8f7 Merge tag 's390-7.1-5' of git://git.kernel.or..
> git tree:       upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=12cff156580000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=a0ca3b8cb3875012
> dashboard link: https://syzkaller.appspot.com/bug?extid=eaae8fa60ce81f1e4eeb
> compiler:       Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
> 
> Unfortunately, I don't have any reproducer for this issue yet.
> 

The AI's analysis

  In this case, `chown_common()` skips setting `newattrs.ia_vfsuid` and `newattrs.ia_vfsgid`.

at https://syzkaller.appspot.com/ai_job?id=abea5dd9-2a6e-4669-a927-d87ef7833666 is wrong.
We always set newattrs.ia_vfsuid and newattrs.ia_vfsgid before checking for -1.

  retry_deleg:
  	newattrs.ia_vfsuid = INVALID_VFSUID;
  	newattrs.ia_vfsgid = INVALID_VFSGID;
  	newattrs.ia_valid =  ATTR_CTIME;
  	if ((user != (uid_t)-1) && !setattr_vfsuid(&newattrs, uid))
  		return -EINVAL;
  	if ((group != (gid_t)-1) && !setattr_vfsgid(&newattrs, gid))
  		return -EINVAL;

Therefore, unless VFS people find something that can cause this problem,
this would be a random memory corruption which confused KMSAN.

#syz set subsystems: unclassified

#syz set no-reminders


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [syzbot] [tomoyo?] KMSAN: uninit-value in tomoyo_path_chown (3)
  2026-06-27  5:43 ` Tetsuo Handa
@ 2026-06-27  5:44   ` syzbot
  0 siblings, 0 replies; 3+ messages in thread
From: syzbot @ 2026-06-27  5:44 UTC (permalink / raw)
  To: penguin-kernel
  Cc: jmorris, linux-fsdevel, linux-kernel, linux-security-module, paul,
	penguin-kernel, serge, syzkaller-bugs, takedakn

> On 2026/06/17 17:41, syzbot wrote:
>> Hello,
>> 
>> syzbot found the following issue on:
>> 
>> HEAD commit:    2b414a95b8f7 Merge tag 's390-7.1-5' of git://git.kernel.or..
>> git tree:       upstream
>> console output: https://syzkaller.appspot.com/x/log.txt?x=12cff156580000
>> kernel config:  https://syzkaller.appspot.com/x/.config?x=a0ca3b8cb3875012
>> dashboard link: https://syzkaller.appspot.com/bug?extid=eaae8fa60ce81f1e4eeb
>> compiler:       Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
>> 
>> Unfortunately, I don't have any reproducer for this issue yet.
>> 
>
> The AI's analysis
>
>   In this case, `chown_common()` skips setting `newattrs.ia_vfsuid` and `newattrs.ia_vfsgid`.
>
> at https://syzkaller.appspot.com/ai_job?id=abea5dd9-2a6e-4669-a927-d87ef7833666 is wrong.
> We always set newattrs.ia_vfsuid and newattrs.ia_vfsgid before checking for -1.
>
>   retry_deleg:
>   	newattrs.ia_vfsuid = INVALID_VFSUID;
>   	newattrs.ia_vfsgid = INVALID_VFSGID;
>   	newattrs.ia_valid =  ATTR_CTIME;
>   	if ((user != (uid_t)-1) && !setattr_vfsuid(&newattrs, uid))
>   		return -EINVAL;
>   	if ((group != (gid_t)-1) && !setattr_vfsgid(&newattrs, gid))
>   		return -EINVAL;
>
> Therefore, unless VFS people find something that can cause this problem,
> this would be a random memory corruption which confused KMSAN.
>
> #syz set subsystems: unclassified
>
> #syz set no-reminders
>

Command #1:
The specified label value is incorrect.
"unclassified" is not among the allowed values.
Please use one of the supported label values.

The following labels are suported:
actionable, missing-backport, no-reminders, prio: {low, normal, high}, subsystems: {..
see below ..}
The list of subsystems: https://syzkaller.appspot.com/upstream/subsystems?all=true


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-06-27  5:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-17  8:41 [syzbot] [tomoyo?] KMSAN: uninit-value in tomoyo_path_chown (3) syzbot
2026-06-27  5:43 ` Tetsuo Handa
2026-06-27  5:44   ` syzbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox