Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
KMSAN: uninit-value in number
=====================================================
BUG: KMSAN: uninit-value in number+0x851/0x23d0 lib/vsprintf.c:490
number+0x851/0x23d0 lib/vsprintf.c:490
vsnprintf+0x1f0d/0x3650 lib/vsprintf.c:2871
snprintf+0x24a/0x290 lib/vsprintf.c:2938
tomoyo_print_header security/tomoyo/audit.c:165 [inline]
tomoyo_init_log+0xd1f/0x3ad0 security/tomoyo/audit.c:255
tomoyo_supervisor+0x8c0/0x27a0 security/tomoyo/common.c:2097
tomoyo_audit_path_log security/tomoyo/file.c:168 [inline]
tomoyo_path_permission security/tomoyo/file.c:587 [inline]
tomoyo_path_perm+0x949/0xc40 security/tomoyo/file.c:838
tomoyo_path_symlink+0xfc/0x190 security/tomoyo/tomoyo.c:199
security_path_symlink+0x220/0x310 security/security.c:1165
do_symlinkat+0x1f6/0xad0 fs/namei.c:4272
__do_sys_symlink fs/namei.c:4299 [inline]
__se_sys_symlink fs/namei.c:4297 [inline]
__x64_sys_symlink+0x12b/0x170 fs/namei.c:4297
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x54/0xd0 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x44/0xae
Local variable digest created at:
fscrypt_match_name+0xb2/0x480 fs/crypto/fname.c:510
ext4_match+0x332/0xa90 fs/ext4/namei.c:1453
CPU: 0 PID: 4237 Comm: syz-executor.1 Not tainted 5.16.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
=====================================================
=====================================================
BUG: KMSAN: uninit-value in number+0x872/0x23d0 lib/vsprintf.c:491
number+0x872/0x23d0 lib/vsprintf.c:491
vsnprintf+0x1f0d/0x3650 lib/vsprintf.c:2871
snprintf+0x24a/0x290 lib/vsprintf.c:2938
tomoyo_print_header security/tomoyo/audit.c:165 [inline]
tomoyo_init_log+0xd1f/0x3ad0 security/tomoyo/audit.c:255
tomoyo_supervisor+0x8c0/0x27a0 security/tomoyo/common.c:2097
tomoyo_audit_path_log security/tomoyo/file.c:168 [inline]
tomoyo_path_permission security/tomoyo/file.c:587 [inline]
tomoyo_path_perm+0x949/0xc40 security/tomoyo/file.c:838
tomoyo_path_symlink+0xfc/0x190 security/tomoyo/tomoyo.c:199
security_path_symlink+0x220/0x310 security/security.c:1165
do_symlinkat+0x1f6/0xad0 fs/namei.c:4272
__do_sys_symlink fs/namei.c:4299 [inline]
__se_sys_symlink fs/namei.c:4297 [inline]
__x64_sys_symlink+0x12b/0x170 fs/namei.c:4297
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x54/0xd0 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x44/0xae
Local variable digest created at:
fscrypt_match_name+0xb2/0x480 fs/crypto/fname.c:510
ext4_match+0x332/0xa90 fs/ext4/namei.c:1453
CPU: 0 PID: 4237 Comm: syz-executor.1 Tainted: G B 5.16.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
=====================================================
=====================================================
BUG: KMSAN: uninit-value in number+0x851/0x23d0 lib/vsprintf.c:490
number+0x851/0x23d0 lib/vsprintf.c:490
vsnprintf+0x1f0d/0x3650 lib/vsprintf.c:2871
snprintf+0x24a/0x290 lib/vsprintf.c:2938
tomoyo_print_header security/tomoyo/audit.c:165 [inline]
tomoyo_init_log+0xd1f/0x3ad0 security/tomoyo/audit.c:255
tomoyo_supervisor+0x8c0/0x27a0 security/tomoyo/common.c:2097
tomoyo_audit_path_log security/tomoyo/file.c:168 [inline]
tomoyo_path_permission security/tomoyo/file.c:587 [inline]
tomoyo_path_perm+0x949/0xc40 security/tomoyo/file.c:838
tomoyo_path_symlink+0xfc/0x190 security/tomoyo/tomoyo.c:199
security_path_symlink+0x220/0x310 security/security.c:1165
do_symlinkat+0x1f6/0xad0 fs/namei.c:4272
__do_sys_symlink fs/namei.c:4299 [inline]
__se_sys_symlink fs/namei.c:4297 [inline]
__x64_sys_symlink+0x12b/0x170 fs/namei.c:4297
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x54/0xd0 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x44/0xae
Local variable digest created at:
fscrypt_match_name+0xb2/0x480 fs/crypto/fname.c:510
ext4_match+0x332/0xa90 fs/ext4/namei.c:1453
CPU: 0 PID: 4237 Comm: syz-executor.1 Tainted: G B 5.16.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
=====================================================
=====================================================
BUG: KMSAN: uninit-value in number+0x872/0x23d0 lib/vsprintf.c:491
number+0x872/0x23d0 lib/vsprintf.c:491
vsnprintf+0x1f0d/0x3650 lib/vsprintf.c:2871
snprintf+0x24a/0x290 lib/vsprintf.c:2938
tomoyo_print_header security/tomoyo/audit.c:165 [inline]
tomoyo_init_log+0xd1f/0x3ad0 security/tomoyo/audit.c:255
tomoyo_supervisor+0x8c0/0x27a0 security/tomoyo/common.c:2097
tomoyo_audit_path_log security/tomoyo/file.c:168 [inline]
tomoyo_path_permission security/tomoyo/file.c:587 [inline]
tomoyo_path_perm+0x949/0xc40 security/tomoyo/file.c:838
tomoyo_path_symlink+0xfc/0x190 security/tomoyo/tomoyo.c:199
security_path_symlink+0x220/0x310 security/security.c:1165
do_symlinkat+0x1f6/0xad0 fs/namei.c:4272
__do_sys_symlink fs/namei.c:4299 [inline]
__se_sys_symlink fs/namei.c:4297 [inline]
__x64_sys_symlink+0x12b/0x170 fs/namei.c:4297
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x54/0xd0 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x44/0xae
Local variable digest created at:
fscrypt_match_name+0xb2/0x480 fs/crypto/fname.c:510
ext4_match+0x332/0xa90 fs/ext4/namei.c:1453
CPU: 0 PID: 4237 Comm: syz-executor.1 Tainted: G B 5.16.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
=====================================================
=====================================================
BUG: KMSAN: uninit-value in number+0x851/0x23d0 lib/vsprintf.c:490
number+0x851/0x23d0 lib/vsprintf.c:490
vsnprintf+0x1f0d/0x3650 lib/vsprintf.c:2871
snprintf+0x24a/0x290 lib/vsprintf.c:2938
tomoyo_print_header security/tomoyo/audit.c:165 [inline]
tomoyo_init_log+0xd1f/0x3ad0 security/tomoyo/audit.c:255
tomoyo_supervisor+0x8c0/0x27a0 security/tomoyo/common.c:2097
tomoyo_audit_path_log security/tomoyo/file.c:168 [inline]
tomoyo_path_permission security/tomoyo/file.c:587 [inline]
tomoyo_path_perm+0x949/0xc40 security/tomoyo/file.c:838
tomoyo_path_symlink+0xfc/0x190 security/tomoyo/tomoyo.c:199
security_path_symlink+0x220/0x310 security/security.c:1165
do_symlinkat+0x1f6/0xad0 fs/namei.c:4272
__do_sys_symlink fs/namei.c:4299 [inline]
__se_sys_symlink fs/namei.c:4297 [inline]
__x64_sys_symlink+0x12b/0x170 fs/namei.c:4297
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x54/0xd0 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x44/0xae
Local variable digest created at:
fscrypt_match_name+0xb2/0x480 fs/crypto/fname.c:510
ext4_match+0x332/0xa90 fs/ext4/namei.c:1453
CPU: 0 PID: 4237 Comm: syz-executor.1 Tainted: G B 5.16.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
=====================================================
=====================================================
BUG: KMSAN: uninit-value in number+0x872/0x23d0 lib/vsprintf.c:491
number+0x872/0x23d0 lib/vsprintf.c:491
vsnprintf+0x1f0d/0x3650 lib/vsprintf.c:2871
snprintf+0x24a/0x290 lib/vsprintf.c:2938
tomoyo_print_header security/tomoyo/audit.c:165 [inline]
tomoyo_init_log+0xd1f/0x3ad0 security/tomoyo/audit.c:255
tomoyo_supervisor+0x8c0/0x27a0 security/tomoyo/common.c:2097
tomoyo_audit_path_log security/tomoyo/file.c:168 [inline]
tomoyo_path_permission security/tomoyo/file.c:587 [inline]
tomoyo_path_perm+0x949/0xc40 security/tomoyo/file.c:838
tomoyo_path_symlink+0xfc/0x190 security/tomoyo/tomoyo.c:199
security_path_symlink+0x220/0x310 security/security.c:1165
do_symlinkat+0x1f6/0xad0 fs/namei.c:4272
__do_sys_symlink fs/namei.c:4299 [inline]
__se_sys_symlink fs/namei.c:4297 [inline]
__x64_sys_symlink+0x12b/0x170 fs/namei.c:4297
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x54/0xd0 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x44/0xae
Local variable digest created at:
fscrypt_match_name+0xb2/0x480 fs/crypto/fname.c:510
ext4_match+0x332/0xa90 fs/ext4/namei.c:1453
CPU: 0 PID: 4237 Comm: syz-executor.1 Tainted: G B 5.16.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
=====================================================
=====================================================
BUG: KMSAN: uninit-value in number+0x851/0x23d0 lib/vsprintf.c:490
number+0x851/0x23d0 lib/vsprintf.c:490
vsnprintf+0x1f0d/0x3650 lib/vsprintf.c:2871
snprintf+0x24a/0x290 lib/vsprintf.c:2938
tomoyo_print_header security/tomoyo/audit.c:165 [inline]
tomoyo_init_log+0xd1f/0x3ad0 security/tomoyo/audit.c:255
tomoyo_supervisor+0x8c0/0x27a0 security/tomoyo/common.c:2097
tomoyo_audit_path_log security/tomoyo/file.c:168 [inline]
tomoyo_path_permission security/tomoyo/file.c:587 [inline]
tomoyo_path_perm+0x949/0xc40 security/tomoyo/file.c:838
tomoyo_path_symlink+0xfc/0x190 security/tomoyo/tomoyo.c:199
security_path_symlink+0x220/0x310 security/security.c:1165
do_symlinkat+0x1f6/0xad0 fs/namei.c:4272
__do_sys_symlink fs/namei.c:4299 [inline]
__se_sys_symlink fs/namei.c:4297 [inline]
__x64_sys_symlink+0x12b/0x170 fs/namei.c:4297
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x54/0xd0 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x44/0xae
Local variable digest created at:
fscrypt_match_name+0xb2/0x480 fs/crypto/fname.c:510
ext4_match+0x332/0xa90 fs/ext4/namei.c:1453
CPU: 0 PID: 4237 Comm: syz-executor.1 Tainted: G B 5.16.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
=====================================================
=====================================================
BUG: KMSAN: uninit-value in number+0x872/0x23d0 lib/vsprintf.c:491
number+0x872/0x23d0 lib/vsprintf.c:491
vsnprintf+0x1f0d/0x3650 lib/vsprintf.c:2871
snprintf+0x24a/0x290 lib/vsprintf.c:2938
tomoyo_print_header security/tomoyo/audit.c:165 [inline]
tomoyo_init_log+0xd1f/0x3ad0 security/tomoyo/audit.c:255
tomoyo_supervisor+0x8c0/0x27a0 security/tomoyo/common.c:2097
tomoyo_audit_path_log security/tomoyo/file.c:168 [inline]
tomoyo_path_permission security/tomoyo/file.c:587 [inline]
tomoyo_path_perm+0x949/0xc40 security/tomoyo/file.c:838
tomoyo_path_symlink+0xfc/0x190 security/tomoyo/tomoyo.c:199
security_path_symlink+0x220/0x310 security/security.c:1165
do_symlinkat+0x1f6/0xad0 fs/namei.c:4272
__do_sys_symlink fs/namei.c:4299 [inline]
__se_sys_symlink fs/namei.c:4297 [inline]
__x64_sys_symlink+0x12b/0x170 fs/namei.c:4297
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x54/0xd0 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x44/0xae
Local variable digest created at:
fscrypt_match_name+0xb2/0x480 fs/crypto/fname.c:510
ext4_match+0x332/0xa90 fs/ext4/namei.c:1453
CPU: 0 PID: 4237 Comm: syz-executor.1 Tainted: G B 5.16.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
=====================================================
console output:
https://syzkaller.appspot.com/x/log.txt?x=13dbb92fb00000
patch:
https://syzkaller.appspot.com/x/patch.diff?x=1002ac88700000