[fs?] KMSAN: kernel-infoleak in sys_name_to_handle_at (2)

0 views
Skip to first unread message

syzbot

unread,
Mar 25, 2023, 3:57:50 AM3/25/23
to gli...@google.com, syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 90ea0df61c98 kmsan: add test_stackdepot_roundtrip
git tree: https://github.com/google/kmsan.git master
console output: https://syzkaller.appspot.com/x/log.txt?x=17f50711c80000
kernel config: https://syzkaller.appspot.com/x/.config?x=bfbc1ed9c2e8818f
dashboard link: https://syzkaller.appspot.com/bug?extid=4385dfd22703b705f655
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: i386
CC: [bra...@kernel.org linux-...@vger.kernel.org linux-...@vger.kernel.org vi...@zeniv.linux.org.uk]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/904650d5b897/disk-90ea0df6.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/421ab8e12064/vmlinux-90ea0df6.xz
kernel image: https://storage.googleapis.com/syzbot-assets/170979c11e5a/bzImage-90ea0df6.xz

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

loop3: detected capacity change from 0 to 256
=====================================================
BUG: KMSAN: kernel-infoleak in instrument_copy_to_user include/linux/instrumented.h:121 [inline]
BUG: KMSAN: kernel-infoleak in _copy_to_user+0xc0/0x100 lib/usercopy.c:40
instrument_copy_to_user include/linux/instrumented.h:121 [inline]
_copy_to_user+0xc0/0x100 lib/usercopy.c:40
copy_to_user include/linux/uaccess.h:169 [inline]
do_sys_name_to_handle fs/fhandle.c:73 [inline]
__do_sys_name_to_handle_at fs/fhandle.c:109 [inline]
__se_sys_name_to_handle_at+0x7c8/0x910 fs/fhandle.c:93
__ia32_sys_name_to_handle_at+0xe3/0x150 fs/fhandle.c:93
do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline]
__do_fast_syscall_32+0xa2/0x100 arch/x86/entry/common.c:178
do_fast_syscall_32+0x37/0x80 arch/x86/entry/common.c:203
do_SYSENTER_32+0x1f/0x30 arch/x86/entry/common.c:246
entry_SYSENTER_compat_after_hwframe+0x70/0x82

Uninit was created at:
slab_post_alloc_hook+0x12d/0xb60 mm/slab.h:774
slab_alloc_node mm/slub.c:3452 [inline]
__kmem_cache_alloc_node+0x518/0x920 mm/slub.c:3491
__do_kmalloc_node mm/slab_common.c:966 [inline]
__kmalloc+0x121/0x3c0 mm/slab_common.c:980
kmalloc include/linux/slab.h:584 [inline]
do_sys_name_to_handle fs/fhandle.c:40 [inline]
__do_sys_name_to_handle_at fs/fhandle.c:109 [inline]
__se_sys_name_to_handle_at+0x3a2/0x910 fs/fhandle.c:93
__ia32_sys_name_to_handle_at+0xe3/0x150 fs/fhandle.c:93
do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline]
__do_fast_syscall_32+0xa2/0x100 arch/x86/entry/common.c:178
do_fast_syscall_32+0x37/0x80 arch/x86/entry/common.c:203
do_SYSENTER_32+0x1f/0x30 arch/x86/entry/common.c:246
entry_SYSENTER_compat_after_hwframe+0x70/0x82

Bytes 18-19 of 20 are uninitialized
Memory access of size 20 starts at ffff88809f7ed5c0
Data copied to user address 0000000020000300

CPU: 1 PID: 6126 Comm: syz-executor.3 Not tainted 6.3.0-rc3-syzkaller-g90ea0df61c98 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
=====================================================


---
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.

Dmitry Vyukov

unread,
Apr 3, 2023, 2:23:31 AM4/3/23
to syzbot, gli...@google.com, syzkaller-upst...@googlegroups.com
#syz upstream
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-upstream-moderation" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-upstream-m...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-upstream-moderation/000000000000af586505f7b4dd91%40google.com.
Reply all
Reply to author
Forward
0 new messages