All of lore.kernel.org
 help / color / mirror / Atom feed
* [syzbot] [bpf?] [net?] KMSAN: uninit-value in dev_map_lookup_elem
@ 2024-03-25  9:36 syzbot
  2024-03-27  0:53 ` Martin KaFai Lau
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: syzbot @ 2024-03-25  9:36 UTC (permalink / raw)
  To: andrii, ast, bpf, daniel, davem, eddyz87, haoluo, hawk,
	john.fastabend, jolsa, kpsingh, kuba, linux-kernel, martin.lau,
	netdev, sdf, song, syzkaller-bugs, yonghong.song

Hello,

syzbot found the following issue on:

HEAD commit:    5e74df2f8f15 Merge tag 'x86-urgent-2024-03-24' of git://gi..
git tree:       upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=148872a5180000
kernel config:  https://syzkaller.appspot.com/x/.config?x=e6bd769cb793b98a
dashboard link: https://syzkaller.appspot.com/bug?extid=1a3cf6f08d68868f9db3
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=15921a6e180000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=12e081f1180000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/1a82880723a7/disk-5e74df2f.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/fd3046ac43b9/vmlinux-5e74df2f.xz
kernel image: https://storage.googleapis.com/syzbot-assets/2097be59cbc1/bzImage-5e74df2f.xz

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

=====================================================
BUG: KMSAN: uninit-value in __dev_map_lookup_elem kernel/bpf/devmap.c:441 [inline]
BUG: KMSAN: uninit-value in dev_map_lookup_elem+0xf3/0x170 kernel/bpf/devmap.c:796
 __dev_map_lookup_elem kernel/bpf/devmap.c:441 [inline]
 dev_map_lookup_elem+0xf3/0x170 kernel/bpf/devmap.c:796
 ____bpf_map_lookup_elem kernel/bpf/helpers.c:42 [inline]
 bpf_map_lookup_elem+0x5c/0x80 kernel/bpf/helpers.c:38
 ___bpf_prog_run+0x13fe/0xe0f0 kernel/bpf/core.c:1997
 __bpf_prog_run256+0xb5/0xe0 kernel/bpf/core.c:2237
 bpf_dispatcher_nop_func include/linux/bpf.h:1234 [inline]
 __bpf_prog_run include/linux/filter.h:657 [inline]
 bpf_prog_run include/linux/filter.h:664 [inline]
 __bpf_trace_run kernel/trace/bpf_trace.c:2381 [inline]
 bpf_trace_run5+0x16f/0x350 kernel/trace/bpf_trace.c:2423
 __bpf_trace_ext4_remove_blocks+0x45/0x60 include/trace/events/ext4.h:1984
 __traceiter_ext4_remove_blocks+0xb5/0x170 include/trace/events/ext4.h:1984
 trace_ext4_remove_blocks include/trace/events/ext4.h:1984 [inline]
 ext4_remove_blocks fs/ext4/extents.c:2463 [inline]
 ext4_ext_rm_leaf fs/ext4/extents.c:2686 [inline]
 ext4_ext_remove_space+0x4e30/0x7e00 fs/ext4/extents.c:2934
 ext4_ext_truncate+0x1e3/0x390 fs/ext4/extents.c:4440
 ext4_truncate+0x14c6/0x1e10 fs/ext4/inode.c:4146
 ext4_evict_inode+0x1886/0x24d0 fs/ext4/inode.c:258
 evict+0x3ae/0xa60 fs/inode.c:667
 iput_final fs/inode.c:1741 [inline]
 iput+0x9ca/0xe10 fs/inode.c:1767
 d_delete_notify include/linux/fsnotify.h:307 [inline]
 vfs_rmdir+0x53c/0x790 fs/namei.c:4222
 do_rmdir+0x630/0x8b0 fs/namei.c:4268
 __do_sys_rmdir fs/namei.c:4287 [inline]
 __se_sys_rmdir fs/namei.c:4285 [inline]
 __x64_sys_rmdir+0x78/0xb0 fs/namei.c:4285
 do_syscall_64+0xd5/0x1f0
 entry_SYSCALL_64_after_hwframe+0x6d/0x75

Local variable stack created at:
 __bpf_prog_run256+0x45/0xe0 kernel/bpf/core.c:2237
 bpf_dispatcher_nop_func include/linux/bpf.h:1234 [inline]
 __bpf_prog_run include/linux/filter.h:657 [inline]
 bpf_prog_run include/linux/filter.h:664 [inline]
 __bpf_trace_run kernel/trace/bpf_trace.c:2381 [inline]
 bpf_trace_run5+0x16f/0x350 kernel/trace/bpf_trace.c:2423

CPU: 0 PID: 5017 Comm: syz-executor365 Not tainted 6.8.0-syzkaller-13236-g5e74df2f8f15 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024
=====================================================


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

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

* Re: [syzbot] [bpf?] [net?] KMSAN: uninit-value in dev_map_lookup_elem
  2024-03-25  9:36 [syzbot] [bpf?] [net?] KMSAN: uninit-value in dev_map_lookup_elem syzbot
@ 2024-03-27  0:53 ` Martin KaFai Lau
  2024-03-27  1:07   ` Alexei Starovoitov
  2024-03-27 22:18 ` [syzbot] " syzbot
  2024-03-27 23:41 ` syzbot
  2 siblings, 1 reply; 11+ messages in thread
From: Martin KaFai Lau @ 2024-03-27  0:53 UTC (permalink / raw)
  To: ast, andrii, daniel, yonghong.song
  Cc: syzbot, bpf, davem, eddyz87, haoluo, hawk, john.fastabend, jolsa,
	kpsingh, kuba, linux-kernel, netdev, sdf, song, syzkaller-bugs

On 3/25/24 2:36 AM, syzbot wrote:
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    5e74df2f8f15 Merge tag 'x86-urgent-2024-03-24' of git://gi..
> git tree:       upstream
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=148872a5180000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=e6bd769cb793b98a
> dashboard link: https://syzkaller.appspot.com/bug?extid=1a3cf6f08d68868f9db3
> compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=15921a6e180000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=12e081f1180000
> 
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/1a82880723a7/disk-5e74df2f.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/fd3046ac43b9/vmlinux-5e74df2f.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/2097be59cbc1/bzImage-5e74df2f.xz
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+1a3cf6f08d68868f9db3@syzkaller.appspotmail.com
> 
> =====================================================
> BUG: KMSAN: uninit-value in __dev_map_lookup_elem kernel/bpf/devmap.c:441 [inline]
> BUG: KMSAN: uninit-value in dev_map_lookup_elem+0xf3/0x170 kernel/bpf/devmap.c:796
>   __dev_map_lookup_elem kernel/bpf/devmap.c:441 [inline]
>   dev_map_lookup_elem+0xf3/0x170 kernel/bpf/devmap.c:796
>   ____bpf_map_lookup_elem kernel/bpf/helpers.c:42 [inline]
>   bpf_map_lookup_elem+0x5c/0x80 kernel/bpf/helpers.c:38
>   ___bpf_prog_run+0x13fe/0xe0f0 kernel/bpf/core.c:1997
>   __bpf_prog_run256+0xb5/0xe0 kernel/bpf/core.c:2237

It should be in the interpreter mode.

The C reproducer is trying to run the following bpf prog:

    0: (18) r0 = 0x0
    2: (18) r1 = map[id:49]
    4: (b7) r8 = 16777216
    5: (7b) *(u64 *)(r10 -8) = r8
    6: (bf) r2 = r10
    7: (07) r2 += -229
            ^^^^^^^^^^

    8: (b7) r3 = 8
    9: (b7) r4 = 0
   10: (85) call dev_map_lookup_elem#1543472
   11: (95) exit

I think this KMSAN report (and a few others related to lookup/delete_elem) 
should only happen in the interpreter mode.

Does it worth to suppress it by always initializing the stack in the interpreter 
mode considering the interpreter is not very speed sensitive ?


>   bpf_dispatcher_nop_func include/linux/bpf.h:1234 [inline]
>   __bpf_prog_run include/linux/filter.h:657 [inline]
>   bpf_prog_run include/linux/filter.h:664 [inline]
>   __bpf_trace_run kernel/trace/bpf_trace.c:2381 [inline]
>   bpf_trace_run5+0x16f/0x350 kernel/trace/bpf_trace.c:2423
>   __bpf_trace_ext4_remove_blocks+0x45/0x60 include/trace/events/ext4.h:1984
>   __traceiter_ext4_remove_blocks+0xb5/0x170 include/trace/events/ext4.h:1984
>   trace_ext4_remove_blocks include/trace/events/ext4.h:1984 [inline]
>   ext4_remove_blocks fs/ext4/extents.c:2463 [inline]
>   ext4_ext_rm_leaf fs/ext4/extents.c:2686 [inline]
>   ext4_ext_remove_space+0x4e30/0x7e00 fs/ext4/extents.c:2934
>   ext4_ext_truncate+0x1e3/0x390 fs/ext4/extents.c:4440
>   ext4_truncate+0x14c6/0x1e10 fs/ext4/inode.c:4146
>   ext4_evict_inode+0x1886/0x24d0 fs/ext4/inode.c:258
>   evict+0x3ae/0xa60 fs/inode.c:667
>   iput_final fs/inode.c:1741 [inline]
>   iput+0x9ca/0xe10 fs/inode.c:1767
>   d_delete_notify include/linux/fsnotify.h:307 [inline]
>   vfs_rmdir+0x53c/0x790 fs/namei.c:4222
>   do_rmdir+0x630/0x8b0 fs/namei.c:4268
>   __do_sys_rmdir fs/namei.c:4287 [inline]
>   __se_sys_rmdir fs/namei.c:4285 [inline]
>   __x64_sys_rmdir+0x78/0xb0 fs/namei.c:4285
>   do_syscall_64+0xd5/0x1f0
>   entry_SYSCALL_64_after_hwframe+0x6d/0x75
> 
> Local variable stack created at:
>   __bpf_prog_run256+0x45/0xe0 kernel/bpf/core.c:2237
>   bpf_dispatcher_nop_func include/linux/bpf.h:1234 [inline]
>   __bpf_prog_run include/linux/filter.h:657 [inline]
>   bpf_prog_run include/linux/filter.h:664 [inline]
>   __bpf_trace_run kernel/trace/bpf_trace.c:2381 [inline]
>   bpf_trace_run5+0x16f/0x350 kernel/trace/bpf_trace.c:2423
> 
> CPU: 0 PID: 5017 Comm: syz-executor365 Not tainted 6.8.0-syzkaller-13236-g5e74df2f8f15 #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024
> =====================================================

> 


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

* Re: [syzbot] [bpf?] [net?] KMSAN: uninit-value in dev_map_lookup_elem
  2024-03-27  0:53 ` Martin KaFai Lau
@ 2024-03-27  1:07   ` Alexei Starovoitov
  2024-03-27  4:47     ` Yonghong Song
  0 siblings, 1 reply; 11+ messages in thread
From: Alexei Starovoitov @ 2024-03-27  1:07 UTC (permalink / raw)
  To: Martin KaFai Lau
  Cc: Alexei Starovoitov, Andrii Nakryiko, Daniel Borkmann,
	Yonghong Song, syzbot, bpf, David S. Miller, Eddy Z, Hao Luo,
	Jesper Dangaard Brouer, John Fastabend, Jiri Olsa, KP Singh,
	Jakub Kicinski, LKML, Network Development, Stanislav Fomichev,
	Song Liu, syzkaller-bugs

On Tue, Mar 26, 2024 at 5:54 PM Martin KaFai Lau <martin.lau@linux.dev> wrote:
>
> On 3/25/24 2:36 AM, syzbot wrote:
> > Hello,
> >
> > syzbot found the following issue on:
> >
> > HEAD commit:    5e74df2f8f15 Merge tag 'x86-urgent-2024-03-24' of git://gi..
> > git tree:       upstream
> > console+strace: https://syzkaller.appspot.com/x/log.txt?x=148872a5180000
> > kernel config:  https://syzkaller.appspot.com/x/.config?x=e6bd769cb793b98a
> > dashboard link: https://syzkaller.appspot.com/bug?extid=1a3cf6f08d68868f9db3
> > compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> > syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=15921a6e180000
> > C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=12e081f1180000
> >
> > Downloadable assets:
> > disk image: https://storage.googleapis.com/syzbot-assets/1a82880723a7/disk-5e74df2f.raw.xz
> > vmlinux: https://storage.googleapis.com/syzbot-assets/fd3046ac43b9/vmlinux-5e74df2f.xz
> > kernel image: https://storage.googleapis.com/syzbot-assets/2097be59cbc1/bzImage-5e74df2f.xz
> >
> > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > Reported-by: syzbot+1a3cf6f08d68868f9db3@syzkaller.appspotmail.com
> >
> > =====================================================
> > BUG: KMSAN: uninit-value in __dev_map_lookup_elem kernel/bpf/devmap.c:441 [inline]
> > BUG: KMSAN: uninit-value in dev_map_lookup_elem+0xf3/0x170 kernel/bpf/devmap.c:796
> >   __dev_map_lookup_elem kernel/bpf/devmap.c:441 [inline]
> >   dev_map_lookup_elem+0xf3/0x170 kernel/bpf/devmap.c:796
> >   ____bpf_map_lookup_elem kernel/bpf/helpers.c:42 [inline]
> >   bpf_map_lookup_elem+0x5c/0x80 kernel/bpf/helpers.c:38
> >   ___bpf_prog_run+0x13fe/0xe0f0 kernel/bpf/core.c:1997
> >   __bpf_prog_run256+0xb5/0xe0 kernel/bpf/core.c:2237
>
> It should be in the interpreter mode.
>
> The C reproducer is trying to run the following bpf prog:
>
>     0: (18) r0 = 0x0
>     2: (18) r1 = map[id:49]
>     4: (b7) r8 = 16777216
>     5: (7b) *(u64 *)(r10 -8) = r8
>     6: (bf) r2 = r10
>     7: (07) r2 += -229
>             ^^^^^^^^^^
>
>     8: (b7) r3 = 8
>     9: (b7) r4 = 0
>    10: (85) call dev_map_lookup_elem#1543472
>    11: (95) exit
>
> I think this KMSAN report (and a few others related to lookup/delete_elem)
> should only happen in the interpreter mode.
>
> Does it worth to suppress it by always initializing the stack in the interpreter
> mode considering the interpreter is not very speed sensitive ?

Maybe we can mark it as initialized from kmsan pov ?
There are kasan_poison/unpoison helpers that may fit ?

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

* Re: [syzbot] [bpf?] [net?] KMSAN: uninit-value in dev_map_lookup_elem
  2024-03-27  1:07   ` Alexei Starovoitov
@ 2024-03-27  4:47     ` Yonghong Song
  2024-03-27 18:46       ` Martin KaFai Lau
  0 siblings, 1 reply; 11+ messages in thread
From: Yonghong Song @ 2024-03-27  4:47 UTC (permalink / raw)
  To: Alexei Starovoitov, Martin KaFai Lau
  Cc: Alexei Starovoitov, Andrii Nakryiko, Daniel Borkmann, syzbot,
	bpf, David S. Miller, Eddy Z, Hao Luo, Jesper Dangaard Brouer,
	John Fastabend, Jiri Olsa, KP Singh, Jakub Kicinski, LKML,
	Network Development, Stanislav Fomichev, Song Liu,
	syzkaller-bugs


On 3/26/24 6:07 PM, Alexei Starovoitov wrote:
> On Tue, Mar 26, 2024 at 5:54 PM Martin KaFai Lau <martin.lau@linux.dev> wrote:
>> On 3/25/24 2:36 AM, syzbot wrote:
>>> Hello,
>>>
>>> syzbot found the following issue on:
>>>
>>> HEAD commit:    5e74df2f8f15 Merge tag 'x86-urgent-2024-03-24' of git://gi..
>>> git tree:       upstream
>>> console+strace: https://syzkaller.appspot.com/x/log.txt?x=148872a5180000
>>> kernel config:  https://syzkaller.appspot.com/x/.config?x=e6bd769cb793b98a
>>> dashboard link: https://syzkaller.appspot.com/bug?extid=1a3cf6f08d68868f9db3
>>> compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
>>> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=15921a6e180000
>>> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=12e081f1180000
>>>
>>> Downloadable assets:
>>> disk image: https://storage.googleapis.com/syzbot-assets/1a82880723a7/disk-5e74df2f.raw.xz
>>> vmlinux: https://storage.googleapis.com/syzbot-assets/fd3046ac43b9/vmlinux-5e74df2f.xz
>>> kernel image: https://storage.googleapis.com/syzbot-assets/2097be59cbc1/bzImage-5e74df2f.xz
>>>
>>> IMPORTANT: if you fix the issue, please add the following tag to the commit:
>>> Reported-by: syzbot+1a3cf6f08d68868f9db3@syzkaller.appspotmail.com
>>>
>>> =====================================================
>>> BUG: KMSAN: uninit-value in __dev_map_lookup_elem kernel/bpf/devmap.c:441 [inline]
>>> BUG: KMSAN: uninit-value in dev_map_lookup_elem+0xf3/0x170 kernel/bpf/devmap.c:796
>>>    __dev_map_lookup_elem kernel/bpf/devmap.c:441 [inline]
>>>    dev_map_lookup_elem+0xf3/0x170 kernel/bpf/devmap.c:796
>>>    ____bpf_map_lookup_elem kernel/bpf/helpers.c:42 [inline]
>>>    bpf_map_lookup_elem+0x5c/0x80 kernel/bpf/helpers.c:38
>>>    ___bpf_prog_run+0x13fe/0xe0f0 kernel/bpf/core.c:1997
>>>    __bpf_prog_run256+0xb5/0xe0 kernel/bpf/core.c:2237
>> It should be in the interpreter mode.
>>
>> The C reproducer is trying to run the following bpf prog:
>>
>>      0: (18) r0 = 0x0
>>      2: (18) r1 = map[id:49]
>>      4: (b7) r8 = 16777216
>>      5: (7b) *(u64 *)(r10 -8) = r8
>>      6: (bf) r2 = r10
>>      7: (07) r2 += -229
>>              ^^^^^^^^^^
>>
>>      8: (b7) r3 = 8
>>      9: (b7) r4 = 0
>>     10: (85) call dev_map_lookup_elem#1543472
>>     11: (95) exit
>>
>> I think this KMSAN report (and a few others related to lookup/delete_elem)
>> should only happen in the interpreter mode.
>>
>> Does it worth to suppress it by always initializing the stack in the interpreter
>> mode considering the interpreter is not very speed sensitive ?
> Maybe we can mark it as initialized from kmsan pov ?
> There are kasan_poison/unpoison helpers that may fit ?

Maybe use kmsan_unpoison_memory()?

In lib/Kconfig.kmsan, we have

config KMSAN
         bool "KMSAN: detector of uninitialized values use"
         depends on HAVE_ARCH_KMSAN && HAVE_KMSAN_COMPILER
         depends on DEBUG_KERNEL && !KASAN && !KCSAN
         depends on !PREEMPT_RT
         select STACKDEPOT
         select STACKDEPOT_ALWAYS_INIT
         help
           KernelMemorySanitizer (KMSAN) is a dynamic detector of uses of
           uninitialized values in the kernel. It is based on compiler
           instrumentation provided by Clang and thus requires Clang to build.

           An important note is that KMSAN is not intended for production use,
           because it drastically increases kernel memory footprint and slows
           the whole system down.

           See <file:Documentation/dev-tools/kmsan.rst> for more details.

So enable KMSAN, KASAN and KCSAN needs to be disabled.


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

* Re: [syzbot] [bpf?] [net?] KMSAN: uninit-value in dev_map_lookup_elem
  2024-03-27  4:47     ` Yonghong Song
@ 2024-03-27 18:46       ` Martin KaFai Lau
  2024-03-28 10:01         ` syzbot
  0 siblings, 1 reply; 11+ messages in thread
From: Martin KaFai Lau @ 2024-03-27 18:46 UTC (permalink / raw)
  To: Yonghong Song, Alexei Starovoitov, syzkaller-bugs
  Cc: Alexei Starovoitov, Andrii Nakryiko, Daniel Borkmann, syzbot,
	bpf, David S. Miller, Eddy Z, Hao Luo, Jesper Dangaard Brouer,
	John Fastabend, Jiri Olsa, KP Singh, Jakub Kicinski, LKML,
	Network Development, Stanislav Fomichev, Song Liu

On 3/26/24 9:47 PM, Yonghong Song wrote:
> 
> On 3/26/24 6:07 PM, Alexei Starovoitov wrote:
>> On Tue, Mar 26, 2024 at 5:54 PM Martin KaFai Lau <martin.lau@linux.dev> wrote:
>>> On 3/25/24 2:36 AM, syzbot wrote:
>>>> Hello,
>>>>
>>>> syzbot found the following issue on:
>>>>
>>>> HEAD commit:    5e74df2f8f15 Merge tag 'x86-urgent-2024-03-24' of git://gi..
>>>> git tree:       upstream
>>>> console+strace: https://syzkaller.appspot.com/x/log.txt?x=148872a5180000
>>>> kernel config:  https://syzkaller.appspot.com/x/.config?x=e6bd769cb793b98a
>>>> dashboard link: https://syzkaller.appspot.com/bug?extid=1a3cf6f08d68868f9db3
>>>> compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for 
>>>> Debian) 2.40
>>>> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=15921a6e180000
>>>> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=12e081f1180000
>>>>
>>>> Downloadable assets:
>>>> disk image: 
>>>> https://storage.googleapis.com/syzbot-assets/1a82880723a7/disk-5e74df2f.raw.xz
>>>> vmlinux: 
>>>> https://storage.googleapis.com/syzbot-assets/fd3046ac43b9/vmlinux-5e74df2f.xz
>>>> kernel image: 
>>>> https://storage.googleapis.com/syzbot-assets/2097be59cbc1/bzImage-5e74df2f.xz
>>>>
>>>> IMPORTANT: if you fix the issue, please add the following tag to the commit:
>>>> Reported-by: syzbot+1a3cf6f08d68868f9db3@syzkaller.appspotmail.com
>>>>
>>>> =====================================================
>>>> BUG: KMSAN: uninit-value in __dev_map_lookup_elem kernel/bpf/devmap.c:441 
>>>> [inline]
>>>> BUG: KMSAN: uninit-value in dev_map_lookup_elem+0xf3/0x170 
>>>> kernel/bpf/devmap.c:796
>>>>    __dev_map_lookup_elem kernel/bpf/devmap.c:441 [inline]
>>>>    dev_map_lookup_elem+0xf3/0x170 kernel/bpf/devmap.c:796
>>>>    ____bpf_map_lookup_elem kernel/bpf/helpers.c:42 [inline]
>>>>    bpf_map_lookup_elem+0x5c/0x80 kernel/bpf/helpers.c:38
>>>>    ___bpf_prog_run+0x13fe/0xe0f0 kernel/bpf/core.c:1997
>>>>    __bpf_prog_run256+0xb5/0xe0 kernel/bpf/core.c:2237
>>> It should be in the interpreter mode.
>>>
>>> The C reproducer is trying to run the following bpf prog:
>>>
>>>      0: (18) r0 = 0x0
>>>      2: (18) r1 = map[id:49]
>>>      4: (b7) r8 = 16777216
>>>      5: (7b) *(u64 *)(r10 -8) = r8
>>>      6: (bf) r2 = r10
>>>      7: (07) r2 += -229
>>>              ^^^^^^^^^^
>>>
>>>      8: (b7) r3 = 8
>>>      9: (b7) r4 = 0
>>>     10: (85) call dev_map_lookup_elem#1543472
>>>     11: (95) exit
>>>
>>> I think this KMSAN report (and a few others related to lookup/delete_elem)
>>> should only happen in the interpreter mode.
>>>
>>> Does it worth to suppress it by always initializing the stack in the interpreter
>>> mode considering the interpreter is not very speed sensitive ?
>> Maybe we can mark it as initialized from kmsan pov ?
>> There are kasan_poison/unpoison helpers that may fit ?
> 
> Maybe use kmsan_unpoison_memory()?

Good idea. It should do. My qemu cannot boot with CONFIG_KMSAN somehow.
I will ask syzbot to test.

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/martin.lau/bpf-next.git interpreter.kmsan

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

* Re: [syzbot] Re: [syzbot] [bpf?] [net?] KMSAN: uninit-value in dev_map_lookup_elem
  2024-03-25  9:36 [syzbot] [bpf?] [net?] KMSAN: uninit-value in dev_map_lookup_elem syzbot
  2024-03-27  0:53 ` Martin KaFai Lau
@ 2024-03-27 22:18 ` syzbot
  2024-03-27 23:41 ` syzbot
  2 siblings, 0 replies; 11+ messages in thread
From: syzbot @ 2024-03-27 22:18 UTC (permalink / raw)
  To: linux-kernel

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

Subject: Re: [syzbot] [bpf?] [net?] KMSAN: uninit-value in dev_map_lookup_elem
Author: martin.lau@linux.dev

On 3/25/24 2:36 AM, syzbot wrote:
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    5e74df2f8f15 Merge tag 'x86-urgent-2024-03-24' of git://gi..
> git tree:       upstream
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=148872a5180000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=e6bd769cb793b98a
> dashboard link: https://syzkaller.appspot.com/bug?extid=1a3cf6f08d68868f9db3
> compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=15921a6e180000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=12e081f1180000
> 
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/1a82880723a7/disk-5e74df2f.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/fd3046ac43b9/vmlinux-5e74df2f.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/2097be59cbc1/bzImage-5e74df2f.xz
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+1a3cf6f08d68868f9db3@syzkaller.appspotmail.com
> 
> =====================================================
> BUG: KMSAN: uninit-value in __dev_map_lookup_elem kernel/bpf/devmap.c:441 [inline]
> BUG: KMSAN: uninit-value in dev_map_lookup_elem+0xf3/0x170 kernel/bpf/devmap.c:796
>   __dev_map_lookup_elem kernel/bpf/devmap.c:441 [inline]
>   dev_map_lookup_elem+0xf3/0x170 kernel/bpf/devmap.c:796
>   ____bpf_map_lookup_elem kernel/bpf/helpers.c:42 [inline]
>   bpf_map_lookup_elem+0x5c/0x80 kernel/bpf/helpers.c:38
>   ___bpf_prog_run+0x13fe/0xe0f0 kernel/bpf/core.c:1997
>   __bpf_prog_run256+0xb5/0xe0 kernel/bpf/core.c:2237
>   bpf_dispatcher_nop_func include/linux/bpf.h:1234 [inline]
>   __bpf_prog_run include/linux/filter.h:657 [inline]
>   bpf_prog_run include/linux/filter.h:664 [inline]
>   __bpf_trace_run kernel/trace/bpf_trace.c:2381 [inline]
>   bpf_trace_run5+0x16f/0x350 kernel/trace/bpf_trace.c:2423
>   __bpf_trace_ext4_remove_blocks+0x45/0x60 include/trace/events/ext4.h:1984
>   __traceiter_ext4_remove_blocks+0xb5/0x170 include/trace/events/ext4.h:1984
>   trace_ext4_remove_blocks include/trace/events/ext4.h:1984 [inline]
>   ext4_remove_blocks fs/ext4/extents.c:2463 [inline]
>   ext4_ext_rm_leaf fs/ext4/extents.c:2686 [inline]
>   ext4_ext_remove_space+0x4e30/0x7e00 fs/ext4/extents.c:2934
>   ext4_ext_truncate+0x1e3/0x390 fs/ext4/extents.c:4440
>   ext4_truncate+0x14c6/0x1e10 fs/ext4/inode.c:4146
>   ext4_evict_inode+0x1886/0x24d0 fs/ext4/inode.c:258
>   evict+0x3ae/0xa60 fs/inode.c:667
>   iput_final fs/inode.c:1741 [inline]
>   iput+0x9ca/0xe10 fs/inode.c:1767
>   d_delete_notify include/linux/fsnotify.h:307 [inline]
>   vfs_rmdir+0x53c/0x790 fs/namei.c:4222
>   do_rmdir+0x630/0x8b0 fs/namei.c:4268
>   __do_sys_rmdir fs/namei.c:4287 [inline]
>   __se_sys_rmdir fs/namei.c:4285 [inline]
>   __x64_sys_rmdir+0x78/0xb0 fs/namei.c:4285
>   do_syscall_64+0xd5/0x1f0
>   entry_SYSCALL_64_after_hwframe+0x6d/0x75
> 
> Local variable stack created at:
>   __bpf_prog_run256+0x45/0xe0 kernel/bpf/core.c:2237
>   bpf_dispatcher_nop_func include/linux/bpf.h:1234 [inline]
>   __bpf_prog_run include/linux/filter.h:657 [inline]
>   bpf_prog_run include/linux/filter.h:664 [inline]
>   __bpf_trace_run kernel/trace/bpf_trace.c:2381 [inline]
>   bpf_trace_run5+0x16f/0x350 kernel/trace/bpf_trace.c:2423
> 
> CPU: 0 PID: 5017 Comm: syz-executor365 Not tainted 6.8.0-syzkaller-13236-g5e74df2f8f15 #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024
> =====================================================
> 
> 
> ---
> 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 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
> 

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/martin.lau/bpf-next.git interpreter.kmsan

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

* Re: [syzbot] Re: [syzbot] [bpf?] [net?] KMSAN: uninit-value in dev_map_lookup_elem
  2024-03-25  9:36 [syzbot] [bpf?] [net?] KMSAN: uninit-value in dev_map_lookup_elem syzbot
  2024-03-27  0:53 ` Martin KaFai Lau
  2024-03-27 22:18 ` [syzbot] " syzbot
@ 2024-03-27 23:41 ` syzbot
  2 siblings, 0 replies; 11+ messages in thread
From: syzbot @ 2024-03-27 23:41 UTC (permalink / raw)
  To: linux-kernel

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

Subject: Re: [syzbot] [bpf?] [net?] KMSAN: uninit-value in dev_map_lookup_elem
Author: martin.lau@linux.dev

On 3/25/24 2:36 AM, syzbot wrote:
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    5e74df2f8f15 Merge tag 'x86-urgent-2024-03-24' of git://gi..
> git tree:       upstream
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=148872a5180000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=e6bd769cb793b98a
> dashboard link: https://syzkaller.appspot.com/bug?extid=1a3cf6f08d68868f9db3
> compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=15921a6e180000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=12e081f1180000
> 
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/1a82880723a7/disk-5e74df2f.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/fd3046ac43b9/vmlinux-5e74df2f.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/2097be59cbc1/bzImage-5e74df2f.xz
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+1a3cf6f08d68868f9db3@syzkaller.appspotmail.com
> 
> =====================================================
> BUG: KMSAN: uninit-value in __dev_map_lookup_elem kernel/bpf/devmap.c:441 [inline]
> BUG: KMSAN: uninit-value in dev_map_lookup_elem+0xf3/0x170 kernel/bpf/devmap.c:796
>   __dev_map_lookup_elem kernel/bpf/devmap.c:441 [inline]
>   dev_map_lookup_elem+0xf3/0x170 kernel/bpf/devmap.c:796
>   ____bpf_map_lookup_elem kernel/bpf/helpers.c:42 [inline]
>   bpf_map_lookup_elem+0x5c/0x80 kernel/bpf/helpers.c:38
>   ___bpf_prog_run+0x13fe/0xe0f0 kernel/bpf/core.c:1997
>   __bpf_prog_run256+0xb5/0xe0 kernel/bpf/core.c:2237
>   bpf_dispatcher_nop_func include/linux/bpf.h:1234 [inline]
>   __bpf_prog_run include/linux/filter.h:657 [inline]
>   bpf_prog_run include/linux/filter.h:664 [inline]
>   __bpf_trace_run kernel/trace/bpf_trace.c:2381 [inline]
>   bpf_trace_run5+0x16f/0x350 kernel/trace/bpf_trace.c:2423
>   __bpf_trace_ext4_remove_blocks+0x45/0x60 include/trace/events/ext4.h:1984
>   __traceiter_ext4_remove_blocks+0xb5/0x170 include/trace/events/ext4.h:1984
>   trace_ext4_remove_blocks include/trace/events/ext4.h:1984 [inline]
>   ext4_remove_blocks fs/ext4/extents.c:2463 [inline]
>   ext4_ext_rm_leaf fs/ext4/extents.c:2686 [inline]
>   ext4_ext_remove_space+0x4e30/0x7e00 fs/ext4/extents.c:2934
>   ext4_ext_truncate+0x1e3/0x390 fs/ext4/extents.c:4440
>   ext4_truncate+0x14c6/0x1e10 fs/ext4/inode.c:4146
>   ext4_evict_inode+0x1886/0x24d0 fs/ext4/inode.c:258
>   evict+0x3ae/0xa60 fs/inode.c:667
>   iput_final fs/inode.c:1741 [inline]
>   iput+0x9ca/0xe10 fs/inode.c:1767
>   d_delete_notify include/linux/fsnotify.h:307 [inline]
>   vfs_rmdir+0x53c/0x790 fs/namei.c:4222
>   do_rmdir+0x630/0x8b0 fs/namei.c:4268
>   __do_sys_rmdir fs/namei.c:4287 [inline]
>   __se_sys_rmdir fs/namei.c:4285 [inline]
>   __x64_sys_rmdir+0x78/0xb0 fs/namei.c:4285
>   do_syscall_64+0xd5/0x1f0
>   entry_SYSCALL_64_after_hwframe+0x6d/0x75
> 
> Local variable stack created at:
>   __bpf_prog_run256+0x45/0xe0 kernel/bpf/core.c:2237
>   bpf_dispatcher_nop_func include/linux/bpf.h:1234 [inline]
>   __bpf_prog_run include/linux/filter.h:657 [inline]
>   bpf_prog_run include/linux/filter.h:664 [inline]
>   __bpf_trace_run kernel/trace/bpf_trace.c:2381 [inline]
>   bpf_trace_run5+0x16f/0x350 kernel/trace/bpf_trace.c:2423
> 
> CPU: 0 PID: 5017 Comm: syz-executor365 Not tainted 6.8.0-syzkaller-13236-g5e74df2f8f15 #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024
> =====================================================
> 
> 
> ---
> 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 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
> 

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/martin.lau/bpf-next.git d8889e866be3


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

* Re: [syzbot] [bpf?] [net?] KMSAN: uninit-value in dev_map_lookup_elem
  2024-03-27 18:46       ` Martin KaFai Lau
@ 2024-03-28 10:01         ` syzbot
  2024-03-28 18:23           ` Martin KaFai Lau
  0 siblings, 1 reply; 11+ messages in thread
From: syzbot @ 2024-03-28 10:01 UTC (permalink / raw)
  To: alexei.starovoitov, andrii, ast, bpf, daniel, davem, eddyz87,
	haoluo, hawk, john.fastabend, jolsa, kpsingh, kuba, linux-kernel,
	martin.lau, netdev, sdf, song, syzkaller-bugs, yonghong.song

Hello,

syzbot tried to test the proposed patch but the build/boot failed:

.o
  CC      fs/aio.o
  CC      drivers/hid/hid-gt683r.o
  CC      drivers/hid/hid-gyration.o
  CC      drivers/hid/hid-holtek-kbd.o
  CC      drivers/platform/x86/p2sb.o
  CC      drivers/iio/buffer/industrialio-triggered-buffer.o
  CC      drivers/staging/rtl8712/rtl871x_ioctl_set.o
  CC      drivers/staging/rtl8712/rtl8712_led.o
  AR      drivers/mailbox/built-in.a
  CC      fs/btrfs/uuid-tree.o
  CC      fs/xfs/xfs_dquot.o
  CC      fs/dax.o
  AR      drivers/iio/accel/built-in.a
  AR      drivers/iio/cdc/built-in.a
  CC      fs/locks.o
  CC      drivers/iio/adc/viperboard_adc.o
  CC      drivers/gpu/drm/i915/display/intel_plane_initial.o
  CC      fs/binfmt_misc.o
  CC      fs/binfmt_script.o
  CC      net/netfilter/xt_length.o
  CC      drivers/hid/hid-holtek-mouse.o
  AR      drivers/iio/chemical/built-in.a
  CC      fs/xfs/xfs_dquot_item.o
  AR      drivers/iio/common/cros_ec_sensors/built-in.a
  CC      drivers/iio/common/hid-sensors/hid-sensor-attributes.o
  CC      drivers/extcon/devres.o
  CC      fs/bcachefs/opts.o
  CC      drivers/iio/common/hid-sensors/hid-sensor-trigger.o
  CC      fs/binfmt_elf.o
  AR      drivers/media/usb/pvrusb2/built-in.a
  CC      fs/xfs/xfs_trans_dquot.o
  AR      drivers/iio/common/inv_sensors/built-in.a
  CC      fs/xfs/xfs_qm_syscalls.o
  CC      fs/xfs/xfs_qm_bhv.o
  CC      drivers/staging/rtl8712/rtl871x_mlme.o
  AR      drivers/iio/dac/built-in.a
  CC      drivers/hid/hid-holtekff.o
  CC      drivers/hid/hid-icade.o
  CC      drivers/iio/buffer/kfifo_buf.o
  AR      drivers/iio/common/ms_sensors/built-in.a
  CC      net/netfilter/xt_limit.o
  CC      net/netfilter/xt_mac.o
  AR      drivers/iio/common/scmi_sensors/built-in.a
  CC      drivers/thunderbolt/nhi.o
  AR      drivers/hwtracing/intel_th/built-in.a
  AR      drivers/iio/adc/built-in.a
  CC      net/netfilter/xt_multiport.o
  AR      drivers/iio/common/ssp_sensors/built-in.a
  CC      drivers/gpu/drm/i915/display/intel_pmdemand.o
  AR      drivers/iio/dummy/built-in.a
  CC      drivers/thunderbolt/nhi_ops.o
  CC      fs/btrfs/props.o
  AR      drivers/iio/common/st_sensors/built-in.a
  CC      net/netfilter/xt_nfacct.o
  CC      fs/xfs/xfs_qm.o
  CC      net/netfilter/xt_osf.o
  AR      drivers/platform/x86/built-in.a
  CC      fs/xfs/xfs_quotaops.o
  AR      drivers/platform/built-in.a
  CC      fs/xfs/xfs_rtalloc.o
  CC      drivers/android/binderfs.o
  CC      drivers/iio/gyro/hid-sensor-gyro-3d.o
  CC      drivers/extcon/extcon-intel-cht-wc.o
  CC      fs/compat_binfmt_elf.o
  CC      fs/xfs/xfs_acl.o
  CC      drivers/thunderbolt/ctl.o
  CC      drivers/thunderbolt/tb.o
  CC      fs/btrfs/free-space-tree.o
  CC      fs/btrfs/tree-checker.o
  CC      fs/xfs/xfs_sysctl.o
  CC      drivers/hid/hid-ite.o
  CC      drivers/staging/rtl8712/ieee80211.o
  CC      drivers/staging/rtl8712/rtl871x_mp_ioctl.o
  CC      drivers/staging/rtl8712/rtl871x_mp.o
  CC      fs/btrfs/space-info.o
  CC      drivers/thunderbolt/switch.o
  CC      net/netfilter/xt_owner.o
  CC      drivers/hid/hid-kensington.o
  AR      drivers/nvmem/layouts/built-in.a
  CC      drivers/nvmem/core.o
  CC      drivers/staging/rtl8712/mlme_linux.o
  CC      fs/backing-file.o
  CC      drivers/staging/rtl8712/recv_linux.o
  CC      drivers/staging/rtl8712/xmit_linux.o
  CC      drivers/thunderbolt/cap.o
  CC      fs/bcachefs/printbuf.o
  AR      drivers/ras/built-in.a
  CC      fs/mbcache.o
  AR      drivers/iio/filter/built-in.a
  CC      drivers/counter/counter-core.o
  AR      drivers/iio/buffer/built-in.a
  CC      fs/posix_acl.o
  CC      drivers/staging/rtl8712/usb_intf.o
  CC      fs/coredump.o
  AR      drivers/iio/frequency/built-in.a
  AR      drivers/iio/health/built-in.a
  CC      drivers/most/core.o
  AR      drivers/extcon/built-in.a
  CC      drivers/counter/counter-sysfs.o
  CC      drivers/counter/counter-chrdev.o
  CC      net/netfilter/xt_cgroup.o
  AR      drivers/iio/gyro/built-in.a
  AR      drivers/iio/common/hid-sensors/built-in.a
  CC      fs/drop_caches.o
  AR      drivers/iio/common/built-in.a
  CC      drivers/iio/humidity/hid-sensor-humidity.o
  CC      fs/sysctls.o
  CC      drivers/hid/hid-keytouch.o
  CC      fs/xfs/xfs_ioctl32.o
  CC      drivers/thunderbolt/path.o
  CC      drivers/thunderbolt/tunnel.o
  AR      fs/ocfs2/built-in.a
  CC      drivers/thunderbolt/eeprom.o
  CC      net/netfilter/xt_physdev.o
  CC      fs/fhandle.o
  CC      drivers/android/binder.o
  CC      drivers/staging/rtl8712/os_intfs.o
  CC      fs/btrfs/block-rsv.o
  CC      drivers/android/binder_alloc.o
  CC      drivers/hid/hid-kye.o
  CC      drivers/most/configfs.o
  AR      drivers/iio/imu/bmi160/built-in.a
  AR      drivers/iio/imu/bmi323/built-in.a
  AR      drivers/iio/imu/bno055/built-in.a
  CC      fs/bcachefs/quota.o
  CC      drivers/iio/light/hid-sensor-als.o
  CC      drivers/iio/light/hid-sensor-prox.o
  AR      drivers/iio/imu/inv_icm42600/built-in.a
  AR      drivers/iio/imu/inv_mpu6050/built-in.a
  CC      fs/btrfs/delalloc-space.o
  AR      drivers/iio/imu/st_lsm6dsx/built-in.a
  CC      fs/btrfs/block-group.o
  AR      drivers/iio/imu/st_lsm9ds0/built-in.a
  CC      fs/btrfs/discard.o
  AR      drivers/iio/imu/built-in.a
  CC      fs/btrfs/reflink.o
  CC      drivers/staging/rtl8712/rtl871x_pwrctrl.o
  CC      fs/bcachefs/rebalance.o
  CC      drivers/iio/magnetometer/hid-sensor-magn-3d.o
  CC      fs/btrfs/subpage.o
  CC      drivers/thunderbolt/domain.o
  CC      fs/btrfs/tree-mod-log.o
  CC      net/netfilter/xt_pkttype.o
  CC      fs/btrfs/extent-io-tree.o
  AR      drivers/iio/multiplexer/built-in.a
  CC      drivers/iio/orientation/hid-sensor-incl-3d.o
  CC      drivers/gpu/drm/i915/display/intel_psr.o
  AR      drivers/media/usb/gspca/built-in.a
  AR      drivers/iio/position/built-in.a
  CC      drivers/iio/orientation/hid-sensor-rotation.o
  AR      drivers/media/usb/built-in.a
  CC      net/netfilter/xt_policy.o
  CC      net/netfilter/xt_quota.o
  AR      drivers/iio/potentiometer/built-in.a
  CC      drivers/nvmem/layouts.o
  CC      drivers/staging/rtl8712/rtl8712_recv.o
  AR      drivers/media/built-in.a
  CC      fs/bcachefs/recovery.o
  CC      fs/xfs/xfs_pnfs.o
  CC      drivers/gpu/drm/i915/display/intel_quirks.o
  CC      fs/btrfs/fs.o
  AR      drivers/iio/potentiostat/built-in.a
  CC      drivers/hid/hid-lcpower.o
  CC      drivers/hid/hid-lenovo.o
  CC      drivers/hid/hid-lg.o
  CC      drivers/hid/hid-lgff.o
  AR      drivers/iio/humidity/built-in.a
  CC      net/netfilter/xt_rateest.o
  AR      drivers/iio/resolver/built-in.a
  AR      drivers/iio/proximity/built-in.a
  CC      drivers/gpu/drm/i915/display/intel_sprite.o
  CC      drivers/iio/pressure/hid-sensor-press.o
  CC      drivers/iio/temperature/hid-sensor-temperature.o
  CC      drivers/gpu/drm/i915/display/intel_sprite_uapi.o
  CC      fs/btrfs/messages.o
  CC      drivers/gpu/drm/i915/display/intel_tc.o
  AR      drivers/counter/built-in.a
  CC      drivers/gpu/drm/i915/display/intel_vblank.o
  CC      drivers/gpu/drm/i915/display/intel_vga.o
  CC      drivers/hid/hid-lg2ff.o
  CC      drivers/thunderbolt/dma_port.o
  CC      fs/btrfs/bio.o
  AR      drivers/iio/light/built-in.a
  AR      drivers/iio/test/built-in.a
  AR      drivers/iio/trigger/built-in.a
  CC      drivers/thunderbolt/icm.o
  CC      net/netfilter/xt_realm.o
  CC      net/netfilter/xt_recent.o
  CC      net/netfilter/xt_sctp.o
  CC      drivers/thunderbolt/property.o
  AR      drivers/iio/magnetometer/built-in.a
  CC      drivers/hid/hid-lg3ff.o
  AR      drivers/most/built-in.a
  CC      drivers/thunderbolt/xdomain.o
  CC      drivers/hid/hid-lg4ff.o
  CC      net/netfilter/xt_socket.o
  CC      drivers/thunderbolt/lc.o
  CC      net/netfilter/xt_state.o
  CC      drivers/hid/hid-lg-g15.o
  CC      fs/btrfs/lru_cache.o
  CC      drivers/staging/rtl8712/rtl871x_recv.o
  CC      drivers/iio/industrialio-core.o
  CC      drivers/gpu/drm/i915/display/intel_wm.o
  AR      drivers/iio/orientation/built-in.a
  CC      net/netfilter/xt_statistic.o
  CC      drivers/iio/industrialio-event.o
  CC      drivers/iio/inkern.o
  CC      net/netfilter/xt_string.o
  CC      fs/btrfs/raid-stripe-tree.o
  CC      net/netfilter/xt_tcpmss.o
  CC      net/netfilter/xt_time.o
  CC      drivers/iio/industrialio-buffer.o
  CC      drivers/hid/hid-logitech-dj.o
  CC      drivers/gpu/drm/i915/display/skl_scaler.o
  AR      drivers/nvmem/built-in.a
  CC      drivers/iio/industrialio-trigger.o
  CC      drivers/gpu/drm/i915/display/skl_universal_plane.o
  CC      drivers/thunderbolt/tmu.o
  AR      drivers/iio/temperature/built-in.a
  CC      fs/btrfs/acl.o
  CC      drivers/hid/hid-logitech-hidpp.o
  CC      drivers/hid/hid-magicmouse.o
  AR      drivers/iio/pressure/built-in.a
  CC      drivers/thunderbolt/usb4.o
  CC      drivers/thunderbolt/usb4_port.o
  CC      drivers/staging/rtl8712/rtl871x_sta_mgt.o
  CC      drivers/gpu/drm/i915/display/skl_watermark.o
  CC      drivers/hid/hid-mf.o
  CC      net/netfilter/xt_u32.o
  CC      fs/bcachefs/reflink.o
  CC      drivers/staging/rtl8712/rtl871x_xmit.o
  CC      fs/btrfs/ref-verify.o
  CC      drivers/thunderbolt/nvm.o
  CC      net/netfilter/nf_hooks_lwtunnel.o
  CC      drivers/staging/rtl8712/rtl8712_xmit.o
  CC      fs/bcachefs/sb-clean.o
  CC      drivers/hid/hid-microsoft.o
  CC      fs/bcachefs/replicas.o
  CC      fs/btrfs/zoned.o
  CC      drivers/gpu/drm/i915/display/intel_acpi.o
  CC      fs/bcachefs/sb-counters.o
  CC      drivers/hid/hid-monterey.o
  CC      drivers/gpu/drm/i915/display/intel_opregion.o
  CC      fs/btrfs/verity.o
  CC      fs/bcachefs/sb-downgrade.o
  CC      fs/bcachefs/sb-errors.o
  CC      fs/bcachefs/sb-members.o
  CC      fs/bcachefs/siphash.o
  CC      drivers/hid/hid-multitouch.o
  CC      drivers/hid/hid-nti.o
  CC      drivers/hid/hid-ntrig.o
  CC      drivers/gpu/drm/i915/display/intel_fbdev.o
  CC      drivers/thunderbolt/retimer.o
  CC      fs/bcachefs/six.o
  CC      fs/bcachefs/snapshot.o
  CC      drivers/thunderbolt/quirks.o
  CC      drivers/thunderbolt/clx.o
  CC      drivers/thunderbolt/acpi.o
  CC      drivers/hid/hid-ortek.o
  CC      drivers/hid/hid-prodikeys.o
  CC      drivers/hid/hid-pl.o
  CC      drivers/gpu/drm/i915/display/intel_fbdev_fb.o
  CC      drivers/hid/hid-penmount.o
  CC      drivers/thunderbolt/debugfs.o
  CC      drivers/hid/hid-petalynx.o
  CC      drivers/hid/hid-picolcd_core.o
  CC      drivers/hid/hid-picolcd_fb.o
  CC      drivers/hid/hid-picolcd_backlight.o
  CC      drivers/hid/hid-picolcd_lcd.o
  CC      drivers/gpu/drm/i915/display/intel_display_debugfs.o
  CC      drivers/gpu/drm/i915/display/intel_display_debugfs_params.o
  CC      drivers/hid/hid-picolcd_leds.o
  CC      drivers/gpu/drm/i915/display/intel_pipe_crc.o
  CC      drivers/hid/hid-picolcd_cir.o
  CC      drivers/gpu/drm/i915/display/dvo_ch7017.o
  CC      drivers/gpu/drm/i915/display/dvo_ch7xxx.o
  CC      drivers/hid/hid-picolcd_debugfs.o
  CC      drivers/gpu/drm/i915/display/dvo_ivch.o
  CC      fs/bcachefs/subvolume.o
  CC      fs/bcachefs/super.o
  CC      fs/bcachefs/super-io.o
  CC      fs/bcachefs/sysfs.o
  CC      drivers/hid/hid-plantronics.o
  CC      fs/bcachefs/tests.o
  CC      fs/bcachefs/time_stats.o
  CC      fs/bcachefs/thread_with_file.o
  CC      drivers/hid/hid-primax.o
  CC      fs/bcachefs/trace.o
  CC      drivers/hid/hid-redragon.o
  CC      drivers/hid/hid-retrode.o
  CC      drivers/hid/hid-roccat.o
  CC      drivers/hid/hid-roccat-common.o
  CC      fs/bcachefs/two_state_shared_lock.o
  CC      drivers/hid/hid-roccat-arvo.o
  CC      fs/bcachefs/util.o
  CC      fs/bcachefs/varint.o
  CC      drivers/hid/hid-roccat-isku.o
  CC      drivers/gpu/drm/i915/display/dvo_ns2501.o
  CC      drivers/hid/hid-roccat-kone.o
  CC      fs/bcachefs/xattr.o
  CC      drivers/hid/hid-roccat-koneplus.o
  CC      drivers/gpu/drm/i915/display/dvo_sil164.o
  CC      drivers/hid/hid-roccat-konepure.o
  CC      drivers/hid/hid-roccat-kovaplus.o
  CC      drivers/gpu/drm/i915/display/dvo_tfp410.o
  CC      drivers/gpu/drm/i915/display/g4x_dp.o
  AR      drivers/iio/built-in.a
  AR      drivers/staging/rtl8712/built-in.a
  CC      drivers/hid/hid-roccat-lua.o
  CC      drivers/gpu/drm/i915/display/g4x_hdmi.o
  AR      drivers/staging/built-in.a
  CC      drivers/hid/hid-roccat-pyra.o
  CC      drivers/hid/hid-roccat-ryos.o
  CC      drivers/hid/hid-roccat-savu.o
  AR      net/netfilter/built-in.a
  CC      drivers/hid/hid-rmi.o
  CC      drivers/gpu/drm/i915/display/icl_dsi.o
  CC      drivers/hid/hid-saitek.o
  AR      fs/xfs/built-in.a
  CC      drivers/hid/hid-samsung.o
  AR      net/built-in.a
  CC      drivers/hid/hid-sjoy.o
  CC      drivers/hid/hid-sony.o
  CC      drivers/hid/hid-speedlink.o
  CC      drivers/hid/hid-steelseries.o
  CC      drivers/gpu/drm/i915/display/intel_backlight.o
  CC      drivers/hid/hid-sunplus.o
  CC      drivers/gpu/drm/i915/display/intel_crt.o
  CC      drivers/gpu/drm/i915/display/intel_cx0_phy.o
  CC      drivers/hid/hid-gaff.o
  CC      drivers/hid/hid-tmff.o
  CC      drivers/hid/hid-thrustmaster.o
  CC      drivers/gpu/drm/i915/display/intel_ddi.o
  CC      drivers/hid/hid-tivo.o
  CC      drivers/gpu/drm/i915/display/intel_ddi_buf_trans.o
  CC      drivers/hid/hid-topseed.o
  CC      drivers/hid/hid-twinhan.o
  CC      drivers/hid/hid-uclogic-core.o
  CC      drivers/hid/hid-uclogic-rdesc.o
  CC      drivers/hid/hid-uclogic-params.o
  AR      drivers/thunderbolt/built-in.a
  CC      drivers/hid/hid-udraw-ps3.o
  CC      drivers/hid/hid-led.o
  CC      drivers/hid/hid-xinmo.o
  CC      drivers/hid/hid-zpff.o
  CC      drivers/hid/hid-zydacron.o
  CC      drivers/hid/wacom_wac.o
  CC      drivers/hid/wacom_sys.o
  CC      drivers/hid/hid-waltop.o
  CC      drivers/hid/hid-wiimote-core.o
  CC      drivers/hid/hid-wiimote-modules.o
  CC      drivers/hid/hid-wiimote-debug.o
  CC      drivers/hid/hid-sensor-hub.o
  CC      drivers/gpu/drm/i915/display/intel_display_device.o
  CC      drivers/hid/hid-sensor-custom.o
  CC      drivers/gpu/drm/i915/display/intel_display_trace.o
  CC      drivers/gpu/drm/i915/display/intel_dkl_phy.o
  CC      drivers/gpu/drm/i915/display/intel_dp.o
  CC      drivers/gpu/drm/i915/display/intel_dp_aux.o
  CC      drivers/gpu/drm/i915/display/intel_dp_aux_backlight.o
  CC      drivers/gpu/drm/i915/display/intel_dp_hdcp.o
  CC      drivers/gpu/drm/i915/display/intel_dp_link_training.o
  CC      drivers/gpu/drm/i915/display/intel_dp_mst.o
  CC      drivers/gpu/drm/i915/display/intel_dsi.o
  CC      drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.o
  CC      drivers/gpu/drm/i915/display/intel_dsi_vbt.o
  CC      drivers/gpu/drm/i915/display/intel_gmbus.o
  CC      drivers/gpu/drm/i915/display/intel_dvo.o
  CC      drivers/gpu/drm/i915/display/intel_hdmi.o
  CC      drivers/gpu/drm/i915/display/intel_lspcon.o
  CC      drivers/gpu/drm/i915/display/intel_lvds.o
  CC      drivers/gpu/drm/i915/display/intel_panel.o
  CC      drivers/gpu/drm/i915/display/intel_pps.o
  CC      drivers/gpu/drm/i915/display/intel_qp_tables.o
  CC      drivers/gpu/drm/i915/display/intel_sdvo.o
  CC      drivers/gpu/drm/i915/display/intel_snps_phy.o
  CC      drivers/gpu/drm/i915/display/intel_tv.o
  CC      drivers/gpu/drm/i915/display/intel_vdsc.o
  CC      drivers/gpu/drm/i915/display/vlv_dsi.o
  CC      drivers/gpu/drm/i915/display/intel_vrr.o
  CC      drivers/gpu/drm/i915/display/vlv_dsi_pll.o
  CC      drivers/gpu/drm/i915/display/intel_dp_tunnel.o
  AR      fs/btrfs/built-in.a
  CC      drivers/gpu/drm/i915/i915_perf.o
  CC      drivers/gpu/drm/i915/pxp/intel_pxp.o
  CC      drivers/gpu/drm/i915/pxp/intel_pxp_huc.o
  CC      drivers/gpu/drm/i915/pxp/intel_pxp_tee.o
  CC      drivers/gpu/drm/i915/i915_gpu_error.o
  CC      drivers/gpu/drm/i915/i915_vgpu.o
  AR      drivers/android/built-in.a
  AR      fs/bcachefs/built-in.a
  AR      fs/built-in.a
  AR      drivers/hid/built-in.a
  AR      drivers/gpu/drm/i915/built-in.a
  AR      drivers/gpu/drm/built-in.a
  AR      drivers/gpu/built-in.a
  AR      drivers/built-in.a
  AR      built-in.a
  AR      vmlinux.a
  LD      vmlinux.o
Killed
make[2]: *** [scripts/Makefile.vmlinux_o:62: vmlinux.o] Error 137
make[2]: *** Deleting file 'vmlinux.o'
make[1]: *** [/syzkaller/jobs/linux/kernel/Makefile:1141: vmlinux_o] Error 2
make: *** [Makefile:240: __sub-make] Error 2


Error text is too large and was truncated, full error text is at:
https://syzkaller.appspot.com/x/error.txt?x=12986595180000


Tested on:

commit:         d8889e86 bpf: Mark bpf prog stack with kmsan_unposion_..
git tree:       git://git.kernel.org/pub/scm/linux/kernel/git/martin.lau/bpf-next.git interpreter.kmsan
kernel config:  https://syzkaller.appspot.com/x/.config?x=e6bd769cb793b98a
dashboard link: https://syzkaller.appspot.com/bug?extid=1a3cf6f08d68868f9db3
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Note: no patches were applied.

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

* Re: [syzbot] [bpf?] [net?] KMSAN: uninit-value in dev_map_lookup_elem
  2024-03-28 10:01         ` syzbot
@ 2024-03-28 18:23           ` Martin KaFai Lau
  0 siblings, 0 replies; 11+ messages in thread
From: Martin KaFai Lau @ 2024-03-28 18:23 UTC (permalink / raw)
  To: ast, yonghong.song
  Cc: daniel, davem, eddyz87, haoluo, hawk, john.fastabend, jolsa,
	kpsingh, kuba, linux-kernel, netdev, sdf, song, syzkaller-bugs,
	andrii, alexei.starovoitov, bpf, syzbot

On 3/28/24 3:01 AM, syzbot wrote:
> Killed
> make[2]: *** [scripts/Makefile.vmlinux_o:62: vmlinux.o] Error 137
> make[2]: *** Deleting file 'vmlinux.o'
> make[1]: *** [/syzkaller/jobs/linux/kernel/Makefile:1141: vmlinux_o] Error 2
> make: *** [Makefile:240: __sub-make] Error 2

My second syzbot test attempt passed the build stage and passed the reproducer 
also. https://lore.kernel.org/all/000000000000b7bdd80614bc433f@google.com/

Not sure what caused the syzbot build error in the first attempt but should be 
unrelated to the fix. I will post the patch.


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

* Re: [syzbot] [bpf?] [net?] KMSAN: uninit-value in dev_map_lookup_elem
       [not found] <1921e7e8-3c43-4f3c-9709-874b37ea9c81@linux.dev>
@ 2024-03-28 19:12 ` syzbot
  0 siblings, 0 replies; 11+ messages in thread
From: syzbot @ 2024-03-28 19:12 UTC (permalink / raw)
  To: linux-kernel, martin.lau, syzkaller-bugs

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-and-tested-by: syzbot+1a3cf6f08d68868f9db3@syzkaller.appspotmail.com

Tested on:

commit:         d8889e86 bpf: Mark bpf prog stack with kmsan_unposion_..
git tree:       git://git.kernel.org/pub/scm/linux/kernel/git/martin.lau/bpf-next.git
console output: https://syzkaller.appspot.com/x/log.txt?x=155ac345180000
kernel config:  https://syzkaller.appspot.com/x/.config?x=e6bd769cb793b98a
dashboard link: https://syzkaller.appspot.com/bug?extid=1a3cf6f08d68868f9db3
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Note: no patches were applied.
Note: testing is done by a robot and is best-effort only.

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

* Re: [syzbot] [bpf?] [net?] KMSAN: uninit-value in dev_map_lookup_elem
       [not found] <2f61db11-f3f1-4574-b510-dce42763863f@linux.dev>
@ 2024-03-28 17:58 ` syzbot
  0 siblings, 0 replies; 11+ messages in thread
From: syzbot @ 2024-03-28 17:58 UTC (permalink / raw)
  To: linux-kernel, martin.lau, syzkaller-bugs

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-and-tested-by: syzbot+1a3cf6f08d68868f9db3@syzkaller.appspotmail.com

Tested on:

commit:         d8889e86 bpf: Mark bpf prog stack with kmsan_unposion_..
git tree:       git://git.kernel.org/pub/scm/linux/kernel/git/martin.lau/bpf-next.git interpreter.kmsan
console output: https://syzkaller.appspot.com/x/log.txt?x=10385eb1180000
kernel config:  https://syzkaller.appspot.com/x/.config?x=e6bd769cb793b98a
dashboard link: https://syzkaller.appspot.com/bug?extid=1a3cf6f08d68868f9db3
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Note: no patches were applied.
Note: testing is done by a robot and is best-effort only.

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

end of thread, other threads:[~2024-03-28 19:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-25  9:36 [syzbot] [bpf?] [net?] KMSAN: uninit-value in dev_map_lookup_elem syzbot
2024-03-27  0:53 ` Martin KaFai Lau
2024-03-27  1:07   ` Alexei Starovoitov
2024-03-27  4:47     ` Yonghong Song
2024-03-27 18:46       ` Martin KaFai Lau
2024-03-28 10:01         ` syzbot
2024-03-28 18:23           ` Martin KaFai Lau
2024-03-27 22:18 ` [syzbot] " syzbot
2024-03-27 23:41 ` syzbot
     [not found] <2f61db11-f3f1-4574-b510-dce42763863f@linux.dev>
2024-03-28 17:58 ` syzbot
     [not found] <1921e7e8-3c43-4f3c-9709-874b37ea9c81@linux.dev>
2024-03-28 19:12 ` syzbot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.