public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [syzbot] [bpf?] KMSAN: uninit-value in htab_lru_percpu_map_lookup_percpu_elem
@ 2024-04-16 19:07 syzbot
  0 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2024-04-16 19:07 UTC (permalink / raw)
  To: andrii, ast, bpf, daniel, eddyz87, haoluo, john.fastabend, jolsa,
	kpsingh, linux-kernel, martin.lau, sdf, song, syzkaller-bugs,
	yonghong.song

Hello,

syzbot found the following issue on:

HEAD commit:    7efd0a74039f Merge tag 'ata-6.9-rc4' of git://git.kernel.o..
git tree:       upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=1492cb93180000
kernel config:  https://syzkaller.appspot.com/x/.config?x=b5bc506ebba90cbf
dashboard link: https://syzkaller.appspot.com/bug?extid=1971e47e5210c718db3c
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=11ce7393180000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=155451eb180000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/9fd81e15f087/disk-7efd0a74.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/2e4915d51565/vmlinux-7efd0a74.xz
kernel image: https://storage.googleapis.com/syzbot-assets/110eeae33f94/bzImage-7efd0a74.xz

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

=====================================================
BUG: KMSAN: uninit-value in __htab_map_lookup_elem kernel/bpf/hashtab.c:691 [inline]
BUG: KMSAN: uninit-value in htab_lru_percpu_map_lookup_percpu_elem+0x3f8/0x630 kernel/bpf/hashtab.c:2343
 __htab_map_lookup_elem kernel/bpf/hashtab.c:691 [inline]
 htab_lru_percpu_map_lookup_percpu_elem+0x3f8/0x630 kernel/bpf/hashtab.c:2343
 ____bpf_map_lookup_percpu_elem kernel/bpf/helpers.c:133 [inline]
 bpf_map_lookup_percpu_elem+0x67/0x90 kernel/bpf/helpers.c:130
 ___bpf_prog_run+0x13fe/0xe0f0 kernel/bpf/core.c:1997
 __bpf_prog_run32+0xb2/0xe0 kernel/bpf/core.c:2236
 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_run2+0x116/0x300 kernel/trace/bpf_trace.c:2420
 __bpf_trace_kfree+0x29/0x40 include/trace/events/kmem.h:94
 trace_kfree include/trace/events/kmem.h:94 [inline]
 kfree+0x6a5/0xa30 mm/slub.c:4377
 security_task_free+0x115/0x150 security/security.c:3032
 __put_task_struct+0x17f/0x730 kernel/fork.c:976
 put_task_struct include/linux/sched/task.h:138 [inline]
 delayed_put_task_struct+0x8a/0x280 kernel/exit.c:229
 rcu_do_batch kernel/rcu/tree.c:2196 [inline]
 rcu_core+0xa59/0x1e70 kernel/rcu/tree.c:2471
 rcu_core_si+0x12/0x20 kernel/rcu/tree.c:2488
 __do_softirq+0x1c0/0x7d7 kernel/softirq.c:554
 invoke_softirq kernel/softirq.c:428 [inline]
 __irq_exit_rcu kernel/softirq.c:633 [inline]
 irq_exit_rcu+0x6a/0x130 kernel/softirq.c:645
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
 sysvec_apic_timer_interrupt+0x83/0x90 arch/x86/kernel/apic/apic.c:1043
 asm_sysvec_apic_timer_interrupt+0x1f/0x30 arch/x86/include/asm/idtentry.h:702
 __msan_metadata_ptr_for_load_8+0x31/0x40 mm/kmsan/instrumentation.c:92
 filter_irq_stacks+0x60/0x1a0 kernel/stacktrace.c:397
 stack_depot_save_flags+0x2c/0x6e0 lib/stackdepot.c:609
 stack_depot_save+0x12/0x20 lib/stackdepot.c:685
 __msan_poison_alloca+0x106/0x1b0 mm/kmsan/instrumentation.c:285
 arch_local_save_flags arch/x86/include/asm/irqflags.h:67 [inline]
 arch_local_irq_save arch/x86/include/asm/irqflags.h:103 [inline]
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline]
 _raw_spin_lock_irqsave+0x35/0xc0 kernel/locking/spinlock.c:162
 remove_wait_queue+0x36/0x270 kernel/sched/wait.c:54
 do_wait+0x34a/0x530 kernel/exit.c:1640
 kernel_wait4+0x2ab/0x480 kernel/exit.c:1790
 __do_sys_wait4 kernel/exit.c:1818 [inline]
 __se_sys_wait4 kernel/exit.c:1814 [inline]
 __x64_sys_wait4+0x14e/0x310 kernel/exit.c:1814
 x64_sys_call+0x6e6/0x3b50 arch/x86/include/generated/asm/syscalls_64.h:62
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Local variable stack created at:
 __bpf_prog_run32+0x43/0xe0 kernel/bpf/core.c:2236
 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_run2+0x116/0x300 kernel/trace/bpf_trace.c:2420

CPU: 0 PID: 5018 Comm: strace-static-x Not tainted 6.9.0-rc3-syzkaller-00355-g7efd0a74039f #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/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] 7+ messages in thread

* Re: [syzbot] [bpf?] KMSAN: uninit-value in htab_lru_percpu_map_lookup_percpu_elem
       [not found] <PN2PR01MB48916CB3DD64BB8C5C73ECD4FCC72@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
@ 2024-06-11 12:20 ` syzbot
  0 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2024-06-11 12:20 UTC (permalink / raw)
  To: linux-kernel, syzkaller-bugs, wojciech.gladysz

Hello,

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

Reported-and-tested-by: syzbot+1971e47e5210c718db3c@syzkaller.appspotmail.com

Tested on:

commit:         f2d3b30c kernel/bpf: KMSAN: uninit-value in htab_lru_p..
git tree:       https://linux.googlesource.com/linux/kernel/git/torvalds/linux
console output: https://syzkaller.appspot.com/x/log.txt?x=149221ca980000
kernel config:  https://syzkaller.appspot.com/x/.config?x=b5bc506ebba90cbf
dashboard link: https://syzkaller.appspot.com/bug?extid=1971e47e5210c718db3c
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] 7+ messages in thread

* Re: [syzbot] [bpf?] KMSAN: uninit-value in htab_lru_percpu_map_lookup_percpu_elem
       [not found] <PN2PR01MB4891E10D8A477396E9E2EF5AFCC72@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
@ 2024-06-11 12:31 ` syzbot
  0 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2024-06-11 12:31 UTC (permalink / raw)
  To: linux-kernel, syzkaller-bugs, wojciech.gladysz

Hello,

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

tack depth: 8144 bytes left
[   55.419101][ T4450] EXT4-fs (sda1): re-mounted 5941fea2-f5fa-4b4e-b5ef-9af118b27b95 r/w. Quota mode: none.
mount: mounting smackfs on /sys/fs/smackfs failed: No such file or directory
mount: mounting selinuxfs on /sys/fs/selinux failed: No such file or directory
[   55.779289][ T4453] mount (4453) used greatest stack depth: 5568 bytes left
Starting syslogd: OK
Starting acpid: OK
Starting klogd: OK
Running sysctl: OK
Populating /dev using udev: [   59.585501][ T4483] udevd[4483]: starting version 3.2.11
[   63.130230][ T4484] udevd[4484]: starting eudev-3.2.11
[   63.142629][ T4483] udevd (4483) used greatest stack depth: 5376 bytes left
[   96.265218][ T1224] net_ratelimit: 2 callbacks suppressed
[   96.265294][ T1224] aoe: packet could not be sent on lo.  consider increasing tx_queue_len
[   96.280260][ T1224] aoe: packet could not be sent on bond0.  consider increasing tx_queue_len
[   96.289350][ T1224] aoe: packet could not be sent on dummy0.  consider increasing tx_queue_len
[   96.298544][ T1224] aoe: packet could not be sent on eql.  consider increasing tx_queue_len
[   96.307476][ T1224] aoe: packet could not be sent on ifb0.  consider increasing tx_queue_len
[   96.316489][ T1224] aoe: packet could not be sent on ifb1.  consider increasing tx_queue_len
[   96.325548][ T1224] aoe: packet could not be sent on eth0.  consider increasing tx_queue_len
[   96.334622][ T1224] aoe: packet could not be sent on wlan0.  consider increasing tx_queue_len
[   96.343626][ T1224] aoe: packet could not be sent on wlan1.  consider increasing tx_queue_len
[   96.352793][ T1224] aoe: packet could not be sent on hwsim0.  consider increasing tx_queue_len
done
Starting system message bus: done
Starting iptables: OK
Starting network: OK
Starting dhcpcd...
dhcpcd-9.4.1 starting
dev: loaded udev
DUID 00:04:98:24:4c:28:99:7c:d9:70:fe:51:ca:fe:56:33:2c:7d
forked to background, child pid 4696
[  111.030473][ T4697] 8021q: adding VLAN 0 to HW filter on device bond0
[  111.100696][ T4697] eql: remember to turn off Van-Jacobson compression on your slave devices
[  111.616746][   T10] cfg80211: failed to load regulatory.db
Starting sshd: [  113.281387][ T4783] sshd (4783) used greatest stack depth: 4392 bytes left
OK


syzkaller

syzkaller login: [  114.141307][    C0] =====================================================
[  114.148674][    C0] BUG: KMSAN: uninit-value in receive_buf+0x25e3/0x5fd0
[  114.155836][    C0]  receive_buf+0x25e3/0x5fd0
[  114.160622][    C0]  virtnet_poll+0xd1c/0x23c0
[  114.165429][    C0]  __napi_poll+0xe7/0x980
[  114.170059][    C0]  net_rx_action+0x82a/0x1850
[  114.174955][    C0]  handle_softirqs+0x1ce/0x800
[  114.179889][    C0]  __irq_exit_rcu+0x68/0x120
[  114.184692][    C0]  irq_exit_rcu+0x12/0x20
[  114.189250][    C0]  common_interrupt+0x94/0xa0
[  114.194165][    C0]  asm_common_interrupt+0x2b/0x40
[  114.199461][    C0]  virt_to_page_or_null+0xf0/0x150
[  114.204769][    C0]  kmsan_get_metadata+0x146/0x1d0
[  114.209965][    C0]  kmsan_get_shadow_origin_ptr+0x38/0xb0
[  114.215799][    C0]  __msan_metadata_ptr_for_load_8+0x24/0x40
[  114.221887][    C0]  is_last_task_frame+0x62/0x420
[  114.227000][    C0]  unwind_next_frame+0x9d/0x470
[  114.231997][    C0]  arch_stack_walk+0x1ec/0x2d0
[  114.237029][    C0]  stack_trace_save+0xaa/0xe0
[  114.241881][    C0]  kmsan_internal_chain_origin+0x57/0xd0
[  114.247698][    C0]  kmsan_internal_memmove_metadata+0x17b/0x230
[  114.254063][    C0]  __msan_memcpy+0x108/0x1c0
[  114.258744][    C0]  sock_write_iter+0x38e/0x3d0
[  114.263898][    C0]  vfs_write+0xb38/0x1550
[  114.268406][    C0]  ksys_write+0x20f/0x4c0
[  114.272940][    C0]  __x64_sys_write+0x93/0xe0
[  114.277742][    C0]  x64_sys_call+0x3093/0x3b90
[  114.283323][    C0]  do_syscall_64+0xcd/0x1e0
[  114.288178][    C0]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[  114.294332][    C0] 
[  114.296980][    C0] Uninit was created at:
[  114.301397][    C0]  __alloc_pages_noprof+0x9d6/0xe70
[  114.306908][    C0]  alloc_pages_mpol_noprof+0x299/0x990
[  114.312874][    C0]  alloc_pages_noprof+0x1bf/0x1e0
[  114.318109][    C0]  skb_page_frag_refill+0x2bf/0x7c0
[  114.323487][    C0]  virtnet_rq_alloc+0x43/0xbb0
[  114.328434][    C0]  try_fill_recv+0x3f0/0x2f50
[  114.333556][    C0]  virtnet_open+0x1cc/0xb00
[  114.338238][    C0]  __dev_open+0x546/0x6f0
[  114.342858][    C0]  __dev_change_flags+0x309/0x9a0
[  114.348074][    C0]  dev_change_flags+0x8e/0x1d0
[  114.353097][    C0]  devinet_ioctl+0x13ec/0x22c0
[  114.358127][    C0]  inet_ioctl+0x4bd/0x6d0
[  114.362784][    C0]  sock_do_ioctl+0xb7/0x540
[  114.367599][    C0]  sock_ioctl+0x727/0xd70
[  114.372193][    C0]  __se_sys_ioctl+0x261/0x450
[  114.377188][    C0]  __x64_sys_ioctl+0x96/0xe0
[  114.382012][    C0]  x64_sys_call+0x18c0/0x3b90
[  114.387389][    C0]  do_syscall_64+0xcd/0x1e0
[  114.392122][    C0]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[  114.398360][    C0] 
[  114.400882][    C0] CPU: 0 PID: 4697 Comm: dhcpcd Not tainted 6.10.0-rc3-syzkaller-00001-g956a9878a570 #0
[  114.410797][    C0] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
[  114.421038][    C0] =====================================================
[  114.428277][    C0] Disabling lock debugging due to kernel taint
[  114.434617][    C0] Kernel panic - not syncing: kmsan.panic set ...
[  114.441168][    C0] CPU: 0 PID: 4697 Comm: dhcpcd Tainted: G    B              6.10.0-rc3-syzkaller-00001-g956a9878a570 #0
[  114.452775][    C0] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
[  114.462940][    C0] Call Trace:
[  114.466456][    C0]  <IRQ>
[  114.469372][    C0]  dump_stack_lvl+0x216/0x2d0
[  114.474259][    C0]  ? kmsan_get_shadow_origin_ptr+0x4d/0xb0
[  114.480223][    C0]  dump_stack+0x1e/0x30
[  114.484499][    C0]  panic+0x4e2/0xcd0
[  114.488493][    C0]  ? kmsan_get_metadata+0x51/0x1d0
[  114.493722][    C0]  kmsan_report+0x2d5/0x2e0
[  114.498385][    C0]  ? kmsan_get_shadow_origin_ptr+0x4d/0xb0
[  114.504323][    C0]  ? kmsan_get_metadata+0x146/0x1d0
[  114.509625][    C0]  ? __msan_warning+0x95/0x120
[  114.514761][    C0]  ? receive_buf+0x25e3/0x5fd0
[  114.519656][    C0]  ? virtnet_poll+0xd1c/0x23c0
[  114.524559][    C0]  ? __napi_poll+0xe7/0x980
[  114.529199][    C0]  ? net_rx_action+0x82a/0x1850
[  114.534316][    C0]  ? handle_softirqs+0x1ce/0x800
[  114.539583][    C0]  ? __irq_exit_rcu+0x68/0x120
[  114.544544][    C0]  ? irq_exit_rcu+0x12/0x20
[  114.549164][    C0]  ? common_interrupt+0x94/0xa0
[  114.554156][    C0]  ? asm_common_interrupt+0x2b/0x40
[  114.559485][    C0]  ? virt_to_page_or_null+0xf0/0x150
[  114.564878][    C0]  ? kmsan_get_metadata+0x146/0x1d0
[  114.570183][    C0]  ? kmsan_get_shadow_origin_ptr+0x38/0xb0
[  114.576101][    C0]  ? __msan_metadata_ptr_for_load_8+0x24/0x40
[  114.582270][    C0]  ? is_last_task_frame+0x62/0x420
[  114.587529][    C0]  ? unwind_next_frame+0x9d/0x470
[  114.592633][    C0]  ? arch_stack_walk+0x1ec/0x2d0
[  114.597935][    C0]  ? stack_trace_save+0xaa/0xe0
[  114.602932][    C0]  ? kmsan_internal_chain_origin+0x57/0xd0
[  114.609058][    C0]  ? kmsan_internal_memmove_metadata+0x17b/0x230
[  114.615513][    C0]  ? __msan_memcpy+0x108/0x1c0
[  114.620375][    C0]  ? sock_write_iter+0x38e/0x3d0
[  114.625423][    C0]  ? vfs_write+0xb38/0x1550
[  114.630144][    C0]  ? ksys_write+0x20f/0x4c0
[  114.634752][    C0]  ? __x64_sys_write+0x93/0xe0
[  114.639611][    C0]  ? x64_sys_call+0x3093/0x3b90
[  114.644574][    C0]  ? do_syscall_64+0xcd/0x1e0
[  114.649357][    C0]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[  114.655580][    C0]  ? kmsan_get_metadata+0x146/0x1d0
[  114.661089][    C0]  ? kmsan_get_metadata+0x146/0x1d0
[  114.666460][    C0]  ? page_to_skb+0xdae/0x1620
[  114.671465][    C0]  ? kmsan_get_metadata+0x146/0x1d0
[  114.676893][    C0]  __msan_warning+0x95/0x120
[  114.681587][    C0]  receive_buf+0x25e3/0x5fd0
[  114.686629][    C0]  ? kmsan_get_metadata+0x146/0x1d0
[  114.692034][    C0]  ? kmsan_get_shadow_origin_ptr+0x4d/0xb0
[  114.697966][    C0]  virtnet_poll+0xd1c/0x23c0
[  114.702687][    C0]  ? __pfx_virtnet_poll+0x10/0x10
[  114.707811][    C0]  __napi_poll+0xe7/0x980
[  114.712253][    C0]  ? kmsan_get_metadata+0x146/0x1d0
[  114.717564][    C0]  net_rx_action+0x82a/0x1850
[  114.722441][    C0]  ? sched_clock_cpu+0x55/0x870
[  114.727421][    C0]  ? __pfx_net_rx_action+0x10/0x10
[  114.732628][    C0]  handle_softirqs+0x1ce/0x800
[  114.737611][    C0]  __irq_exit_rcu+0x68/0x120
[  114.742301][    C0]  irq_exit_rcu+0x12/0x20
[  114.746720][    C0]  common_interrupt+0x94/0xa0
[  114.751524][    C0]  </IRQ>
[  114.754533][    C0]  <TASK>
[  114.757619][    C0]  asm_common_interrupt+0x2b/0x40
[  114.762781][    C0] RIP: 0010:virt_to_page_or_null+0xf0/0x150
[  114.768821][    C0] Code: f6 c0 08 75 15 48 c1 ea 15 48 8b 76 08 83 e2 3f 31 c9 48 0f a3 56 10 0f 92 c1 65 ff 0d 11 43 c5 7d 74 4d 65 ff 0d 08 43 c5 7d <85> c9 0f 84 3b ff ff ff 48 81 ff 00 00 00 80 72 09 48 8b 0d 78 74
[  114.788641][    C0] RSP: 0018:ffff8881160076b0 EFLAGS: 00000286
[  114.794817][    C0] RAX: ffff888194a30020 RBX: ffff888114a30020 RCX: 0000000000000001
[  114.802961][    C0] RDX: 0000000114a30020 RSI: ffff88813fff9220 RDI: ffff888114a30020
[  114.811014][    C0] RBP: ffff8881160076b0 R08: ffffea000000000f R09: ffff888116004000
[  114.819084][    C0] R10: ffff888116007818 R11: ffffffff81935550 R12: 0000000000000000
[  114.827135][    C0] R13: 0000000000000000 R14: 0000000000000000 R15: ffff888114a30020
[  114.835190][    C0]  ? __pfx_stack_trace_consume_entry+0x10/0x10
[  114.841475][    C0]  kmsan_get_metadata+0x146/0x1d0
[  114.846629][    C0]  kmsan_get_shadow_origin_ptr+0x38/0xb0
[  114.852370][    C0]  __msan_metadata_ptr_for_load_8+0x24/0x40
[  114.858386][    C0]  is_last_task_frame+0x62/0x420
[  114.863429][    C0]  ? kmsan_get_shadow_origin_ptr+0x4d/0xb0
[  114.869401][    C0]  unwind_next_frame+0x9d/0x470
[  114.874444][    C0]  arch_stack_walk+0x1ec/0x2d0
[  114.879348][    C0]  ? do_syscall_64+0xcd/0x1e0
[  114.884168][    C0]  ? __pfx_stack_trace_consume_entry+0x10/0x10
[  114.890569][    C0]  stack_trace_save+0xaa/0xe0
[  114.895448][    C0]  kmsan_internal_chain_origin+0x57/0xd0
[  114.901315][    C0]  ? kmsan_internal_chain_origin+0x57/0xd0
[  114.907242][    C0]  ? kmsan_internal_memmove_metadata+0x17b/0x230
[  114.913797][    C0]  ? __msan_memcpy+0x108/0x1c0
[  114.918732][    C0]  ? sock_write_iter+0x38e/0x3d0
[  114.923798][    C0]  ? vfs_write+0xb38/0x1550
[  114.928458][    C0]  ? ksys_write+0x20f/0x4c0
[  114.933071][    C0]  ? __x64_sys_write+0x93/0xe0
[  114.937962][    C0]  ? x64_sys_call+0x3093/0x3b90
[  114.943128][    C0]  ? do_syscall_64+0xcd/0x1e0
[  114.947923][    C0]  ? kmsan_get_metadata+0x146/0x1d0
[  114.953292][    C0]  ? kmsan_internal_set_shadow_origin+0x69/0x100
[  114.959771][    C0]  ? kmsan_get_metadata+0x146/0x1d0
[  114.965109][    C0]  ? kmsan_get_metadata+0x146/0x1d0
[  114.970431][    C0]  ? kmsan_get_shadow_origin_ptr+0x4d/0xb0
[  114.976472][    C0]  ? unix_dgram_sendmsg+0xd93/0x2ce0
[  114.981868][    C0]  ? aa_sk_perm+0x881/0xd90
[  114.986487][    C0]  ? kmsan_get_metadata+0x146/0x1d0
[  114.991792][    C0]  ? kmsan_get_shadow_origin_ptr+0x4d/0xb0
[  114.997731][    C0]  ? kmsan_get_metadata+0x146/0x1d0
[  115.003121][    C0]  kmsan_internal_memmove_metadata+0x17b/0x230
[  115.009411][    C0]  __msan_memcpy+0x108/0x1c0
[  115.014216][    C0]  sock_write_iter+0x38e/0x3d0
[  115.019109][    C0]  vfs_write+0xb38/0x1550
[  115.023542][    C0]  ? __pfx_sock_write_iter+0x10/0x10
[  115.029014][    C0]  ksys_write+0x20f/0x4c0
[  115.033533][    C0]  __x64_sys_write+0x93/0xe0
[  115.038236][    C0]  x64_sys_call+0x3093/0x3b90
[  115.043164][    C0]  do_syscall_64+0xcd/0x1e0
[  115.047796][    C0]  ? clear_bhb_loop+0x25/0x80
[  115.052625][    C0]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[  115.058663][    C0] RIP: 0033:0x7f96e0e10bf2
[  115.063173][    C0] Code: 89 c7 48 89 44 24 08 e8 7b 34 fa ff 48 8b 44 24 08 48 83 c4 28 c3 c3 64 8b 04 25 18 00 00 00 85 c0 75 20 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 76 6f 48 8b 15 07 a2 0d 00 f7 d8 64 89 02 48 83
[  115.082994][    C0] RSP: 002b:00007fffc25d6c88 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[  115.091610][    C0] RAX: ffffffffffffffda RBX: 00007f96e0eec4c0 RCX: 00007f96e0e10bf2
[  115.099666][    C0] RDX: 0000000000000020 RSI: 00005598f18db020 RDI: 0000000000000002
[  115.108056][    C0] RBP: 0000000000000020 R08: 0000000000000000 R09: 0000000000000000
[  115.116367][    C0] R10: 00007fffc25d7a50 R11: 0000000000000246 R12: 0000000000000020
[  115.124456][    C0] R13: 00005598f18db020 R14: 0000000000000000 R15: 0000000000000000
[  115.132580][    C0]  </TASK>
[  115.136102][    C0] Kernel Offset: disabled
[  115.140501][    C0] Rebooting in 86400 seconds..


syzkaller build log:
go env (err=<nil>)
GO111MODULE='auto'
GOARCH='amd64'
GOBIN=''
GOCACHE='/syzkaller/.cache/go-build'
GOENV='/syzkaller/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/syzkaller/jobs-2/linux/gopath/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/syzkaller/jobs-2/linux/gopath'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.4'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/syzkaller/jobs-2/linux/gopath/src/github.com/google/syzkaller/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build3221393454=/tmp/go-build -gno-record-gcc-switches'

git status (err=<nil>)
HEAD detached at c8349e4853
nothing to commit, working tree clean


tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
Makefile:31: run command via tools/syz-env for best compatibility, see:
Makefile:32: https://github.com/google/syzkaller/blob/master/docs/contributing.md#using-syz-env
go list -f '{{.Stale}}' ./sys/syz-sysgen | grep -q false || go install ./sys/syz-sysgen
make .descriptions
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
Makefile:31: run command via tools/syz-env for best compatibility, see:
Makefile:32: https://github.com/google/syzkaller/blob/master/docs/contributing.md#using-syz-env
bin/syz-sysgen
touch .descriptions
GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=c8349e48534ea6d8f01515335d95de8ebf5da8df -X 'github.com/google/syzkaller/prog.gitRevisionDate=20240412-102842'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-fuzzer github.com/google/syzkaller/syz-fuzzer
GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=c8349e48534ea6d8f01515335d95de8ebf5da8df -X 'github.com/google/syzkaller/prog.gitRevisionDate=20240412-102842'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-execprog github.com/google/syzkaller/tools/syz-execprog
GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=c8349e48534ea6d8f01515335d95de8ebf5da8df -X 'github.com/google/syzkaller/prog.gitRevisionDate=20240412-102842'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-stress github.com/google/syzkaller/tools/syz-stress
mkdir -p ./bin/linux_amd64
gcc -o ./bin/linux_amd64/syz-executor executor/executor.cc \
	-m64 -O2 -pthread -Wall -Werror -Wparentheses -Wunused-const-variable -Wframe-larger-than=16384 -Wno-stringop-overflow -Wno-array-bounds -Wno-format-overflow -Wno-unused-but-set-variable -Wno-unused-command-line-argument -static-pie -fpermissive -w -DGOOS_linux=1 -DGOARCH_amd64=1 \
	-DHOSTGOOS_linux=1 -DGIT_REVISION=\"c8349e48534ea6d8f01515335d95de8ebf5da8df\"


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


Tested on:

commit:         956a9878 kernel/bpf: KMSAN: uninit-value in htab_lru_p..
git tree:       https://linux.googlesource.com/linux/kernel/git/torvalds/linux
kernel config:  https://syzkaller.appspot.com/x/.config?x=3486f1660f47f855
dashboard link: https://syzkaller.appspot.com/bug?extid=1971e47e5210c718db3c
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] 7+ messages in thread

* Re: [syzbot] [bpf?] KMSAN: uninit-value in htab_lru_percpu_map_lookup_percpu_elem
       [not found] <PN2PR01MB48912834FC1742DCE6033E1FFCC12@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
@ 2024-06-13 14:38 ` syzbot
  0 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2024-06-13 14:38 UTC (permalink / raw)
  To: linux-kernel, syzkaller-bugs, wojciech.gladysz

Hello,

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

61ee5452e1b2df'
[   49.565928][    T1] ima: Allocated hash algorithm: sha256
[   49.572049][    T1] ima: No architecture policies found
[   49.578974][    T1] evm: Initialising EVM extended attributes:
[   49.585220][    T1] evm: security.selinux (disabled)
[   49.590764][    T1] evm: security.SMACK64 (disabled)
[   49.595968][    T1] evm: security.SMACK64EXEC (disabled)
[   49.601835][    T1] evm: security.SMACK64TRANSMUTE (disabled)
[   49.608506][    T1] evm: security.SMACK64MMAP (disabled)
[   49.614038][    T1] evm: security.apparmor
[   49.618451][    T1] evm: security.ima
[   49.622436][    T1] evm: security.capability
[   49.627502][    T1] evm: HMAC attrs: 0x1
[   49.636597][    T1] PM:   Magic number: 12:387:485
[   49.642665][    T1] usb usb18-port6: hash matches
[   49.648999][    T1] usb usb17-port7: hash matches
[   49.655774][    T1] printk: legacy console [netcon0] enabled
[   49.662095][    T1] netconsole: network logging started
[   49.669345][    T1] gtp: GTP module loaded (pdp ctx size 128 bytes)
[   49.678657][    T1] rdma_rxe: loaded
[   49.684488][    T1] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[   49.706425][    T1] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[   49.724152][    T1] Loaded X.509 cert 'wens: 61c038651aabdcf94bd0ac7ff06c7248db18c600'
[   49.733298][    T1] clk: Disabling unused clocks
[   49.739237][    T1] ALSA device list:
[   49.743250][    T1]   #0: Dummy 1
[   49.747040][    T1]   #1: Loopback 1
[   49.750957][    T1]   #2: Virtual MIDI Card 1
[   49.761414][   T43] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[   49.771525][   T43] platform regulatory.0: Falling back to sysfs fallback for: regulatory.db
[   49.781327][    T1] md: Waiting for all devices to be available before autodetect
[   49.789841][    T1] md: If you don't use raid, use raid=noautodetect
[   49.796709][    T1] md: Autodetecting RAID arrays.
[   49.801753][    T1] md: autorun ...
[   49.805475][    T1] md: ... autorun DONE.
[   49.898217][    T1] EXT4-fs (sda1): mounted filesystem 5941fea2-f5fa-4b4e-b5ef-9af118b27b95 ro with ordered data mode. Quota mode: none.
[   49.911801][    T1] VFS: Mounted root (ext4 filesystem) readonly on device 8:1.
[   49.935132][    T1] devtmpfs: mounted
[   50.190758][    T1] Freeing unused kernel image (initmem) memory: 37036K
[   50.202710][    T1] Write protecting the kernel read-only data: 262144k
[   50.249033][    T1] Freeing unused kernel image (rodata/data gap) memory: 1808K
[   51.885170][    T1] x86/mm: Checked W+X mappings: passed, no W+X pages found.
[   51.895531][    T1] x86/mm: Checking user space page tables
[   53.391911][    T1] x86/mm: Checked W+X mappings: passed, no W+X pages found.
[   53.401141][    T1] Failed to set sysctl parameter 'kernel.hung_task_all_cpu_backtrace=1': parameter not found
[   53.422983][    T1] Failed to set sysctl parameter 'max_rcu_stall_to_panic=1': parameter not found
[   53.434940][    T1] Run /sbin/init as init process
[   54.937583][ T4446] mount (4446) used greatest stack depth: 8144 bytes left
[   55.037752][ T4447] EXT4-fs (sda1): re-mounted 5941fea2-f5fa-4b4e-b5ef-9af118b27b95 r/w. Quota mode: none.
mount: mounting smackfs on /sys/fs/smackfs failed: No such file or directory
mount: mounting selinuxfs on /sys/fs/selinux failed: No such file or directory
[   55.371085][ T4450] mount (4450) used greatest stack depth: 5568 bytes left
Starting syslogd: OK
Starting acpid: OK
Starting klogd: OK
Running sysctl: OK
Populating /dev using udev: [   59.193733][ T4480] udevd[4480]: starting version 3.2.11
[   62.697884][ T4481] udevd[4481]: starting eudev-3.2.11
[   62.710663][ T4480] udevd (4480) used greatest stack depth: 5264 bytes left
done
Starting system message bus: done
Starting iptables: OK
Starting network: OK
Starting dhcpcd...
dhcpcd-9.4.1 starting
dev: loaded udev
DUID 00:04:98:24:4c:28:99:7c:d9:70:fe:51:ca:fe:56:33:2c:7d
forked to background, child pid 4693
no interfaces have a carrier
[  110.077072][ T4694] 8021q: adding VLAN 0 to HW filter on device bond0
[  110.114606][ T4694] eql: remember to turn off Van-Jacobson compression on your slave devices
Starting sshd: [  111.638151][   T43] cfg80211: failed to load regulatory.db
OK


syzkaller

syzkaller login: [  115.668614][    C0] =====================================================
[  115.675770][    C0] BUG: KMSAN: uninit-value in receive_buf+0x25e3/0x5fd0
[  115.682913][    C0]  receive_buf+0x25e3/0x5fd0
[  115.687725][    C0]  virtnet_poll+0xd1c/0x23c0
[  115.692508][    C0]  __napi_poll+0xe7/0x980
[  115.697035][    C0]  net_rx_action+0x82a/0x1850
[  115.701947][    C0]  handle_softirqs+0x1ce/0x800
[  115.706920][    C0]  __irq_exit_rcu+0x68/0x120
[  115.711977][    C0]  irq_exit_rcu+0x12/0x20
[  115.716495][    C0]  common_interrupt+0x94/0xa0
[  115.721393][    C0]  asm_common_interrupt+0x2b/0x40
[  115.726789][    C0]  kmsan_metadata_is_contiguous+0x11/0x1e0
[  115.732777][    C0]  kmsan_get_shadow_origin_ptr+0x2a/0xb0
[  115.738611][    C0]  __msan_metadata_ptr_for_load_8+0x24/0x40
[  115.744707][    C0]  kmem_cache_alloc_noprof+0x1b0/0xb20
[  115.750434][    C0]  anon_vma_fork+0x2c8/0xad0
[  115.755224][    C0]  copy_mm+0x1b57/0x3ca0
[  115.759770][    C0]  copy_process+0x26f7/0x5b90
[  115.764746][    C0]  kernel_clone+0x401/0x1040
[  115.769622][    C0]  __x64_sys_clone+0x25c/0x360
[  115.774688][    C0]  x64_sys_call+0x2a45/0x3b90
[  115.779774][    C0]  do_syscall_64+0xcd/0x1e0
[  115.784469][    C0]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[  115.790699][    C0] 
[  115.793105][    C0] Uninit was created at:
[  115.797720][    C0]  __alloc_pages_noprof+0x9d6/0xe70
[  115.803195][    C0]  alloc_pages_mpol_noprof+0x299/0x990
[  115.808997][    C0]  alloc_pages_noprof+0x1bf/0x1e0
[  115.814258][    C0]  skb_page_frag_refill+0x2bf/0x7c0
[  115.819691][    C0]  virtnet_rq_alloc+0x43/0xbb0
[  115.824701][    C0]  try_fill_recv+0x3f0/0x2f50
[  115.829565][    C0]  virtnet_open+0x1cc/0xb00
[  115.834627][    C0]  __dev_open+0x546/0x6f0
[  115.839151][    C0]  __dev_change_flags+0x309/0x9a0
[  115.844358][    C0]  dev_change_flags+0x8e/0x1d0
[  115.849310][    C0]  devinet_ioctl+0x13ec/0x22c0
[  115.854298][    C0]  inet_ioctl+0x4bd/0x6d0
[  115.858825][    C0]  sock_do_ioctl+0xb7/0x540
[  115.863572][    C0]  sock_ioctl+0x727/0xd70
[  115.868115][    C0]  __se_sys_ioctl+0x261/0x450
[  115.872978][    C0]  __x64_sys_ioctl+0x96/0xe0
[  115.877780][    C0]  x64_sys_call+0x18c0/0x3b90
[  115.882898][    C0]  do_syscall_64+0xcd/0x1e0
[  115.887598][    C0]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[  115.894138][    C0] 
[  115.896697][    C0] CPU: 0 PID: 4833 Comm: dhcpcd-run-hook Not tainted 6.10.0-rc3-syzkaller-00022-g78161c936167 #0
[  115.907699][    C0] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
[  115.918263][    C0] =====================================================
[  115.925284][    C0] Disabling lock debugging due to kernel taint
[  115.931598][    C0] Kernel panic - not syncing: kmsan.panic set ...
[  115.938121][    C0] CPU: 0 PID: 4833 Comm: dhcpcd-run-hook Tainted: G    B              6.10.0-rc3-syzkaller-00022-g78161c936167 #0
[  115.951147][    C0] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
[  115.961392][    C0] Call Trace:
[  115.964735][    C0]  <IRQ>
[  115.967631][    C0]  dump_stack_lvl+0x216/0x2d0
[  115.972463][    C0]  ? kmsan_get_shadow_origin_ptr+0x4d/0xb0
[  115.978480][    C0]  dump_stack+0x1e/0x30
[  115.982741][    C0]  panic+0x4e2/0xcd0
[  115.986784][    C0]  ? kmsan_get_metadata+0x81/0x1d0
[  115.992099][    C0]  kmsan_report+0x2d5/0x2e0
[  115.996714][    C0]  ? kmsan_get_metadata+0x146/0x1d0
[  116.002010][    C0]  ? __msan_warning+0x95/0x120
[  116.007035][    C0]  ? receive_buf+0x25e3/0x5fd0
[  116.011916][    C0]  ? virtnet_poll+0xd1c/0x23c0
[  116.016876][    C0]  ? __napi_poll+0xe7/0x980
[  116.021526][    C0]  ? net_rx_action+0x82a/0x1850
[  116.026608][    C0]  ? handle_softirqs+0x1ce/0x800
[  116.031670][    C0]  ? __irq_exit_rcu+0x68/0x120
[  116.036542][    C0]  ? irq_exit_rcu+0x12/0x20
[  116.041163][    C0]  ? common_interrupt+0x94/0xa0
[  116.046211][    C0]  ? asm_common_interrupt+0x2b/0x40
[  116.051608][    C0]  ? kmsan_metadata_is_contiguous+0x11/0x1e0
[  116.057724][    C0]  ? kmsan_get_shadow_origin_ptr+0x2a/0xb0
[  116.063734][    C0]  ? __msan_metadata_ptr_for_load_8+0x24/0x40
[  116.069923][    C0]  ? kmem_cache_alloc_noprof+0x1b0/0xb20
[  116.075660][    C0]  ? anon_vma_fork+0x2c8/0xad0
[  116.080547][    C0]  ? copy_mm+0x1b57/0x3ca0
[  116.085158][    C0]  ? copy_process+0x26f7/0x5b90
[  116.090122][    C0]  ? kernel_clone+0x401/0x1040
[  116.095009][    C0]  ? __x64_sys_clone+0x25c/0x360
[  116.100114][    C0]  ? x64_sys_call+0x2a45/0x3b90
[  116.105088][    C0]  ? do_syscall_64+0xcd/0x1e0
[  116.109969][    C0]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[  116.116530][    C0]  ? kmsan_internal_memmove_metadata+0x17b/0x230
[  116.123065][    C0]  ? kmsan_get_metadata+0x146/0x1d0
[  116.128453][    C0]  ? kmsan_get_metadata+0x146/0x1d0
[  116.133856][    C0]  ? page_to_skb+0xdae/0x1620
[  116.138636][    C0]  ? kmsan_get_metadata+0x146/0x1d0
[  116.143993][    C0]  __msan_warning+0x95/0x120
[  116.148713][    C0]  receive_buf+0x25e3/0x5fd0
[  116.153414][    C0]  ? kmsan_get_metadata+0x146/0x1d0
[  116.158922][    C0]  ? kmsan_get_shadow_origin_ptr+0x4d/0xb0
[  116.164985][    C0]  virtnet_poll+0xd1c/0x23c0
[  116.169720][    C0]  ? __pfx_virtnet_poll+0x10/0x10
[  116.174942][    C0]  __napi_poll+0xe7/0x980
[  116.179431][    C0]  ? kmsan_get_metadata+0x146/0x1d0
[  116.184754][    C0]  net_rx_action+0x82a/0x1850
[  116.189579][    C0]  ? sched_clock_cpu+0x55/0x870
[  116.194593][    C0]  ? __pfx_net_rx_action+0x10/0x10
[  116.199846][    C0]  handle_softirqs+0x1ce/0x800
[  116.204734][    C0]  __irq_exit_rcu+0x68/0x120
[  116.209452][    C0]  irq_exit_rcu+0x12/0x20
[  116.213891][    C0]  common_interrupt+0x94/0xa0
[  116.218689][    C0]  </IRQ>
[  116.221668][    C0]  <TASK>
[  116.224666][    C0]  asm_common_interrupt+0x2b/0x40
[  116.229996][    C0] RIP: 0010:kmsan_metadata_is_contiguous+0x11/0x1e0
[  116.236882][    C0] Code: 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 66 0f 1f 00 55 48 89 e5 41 57 41 56 41 55 41 54 53 <48> 83 ec 28 41 b7 01 48 85 f6 0f 84 fa 00 00 00 49 89 f6 49 89 fd
[  116.256797][    C0] RSP: 0018:ffff88811798b800 EFLAGS: 00000202
[  116.263179][    C0] RAX: 0000000000000000 RBX: 0000000000000286 RCX: 000000023fd2eed8
[  116.271335][    C0] RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff88813fcaaed0
[  116.279678][    C0] RBP: ffff88811798b828 R08: ffffea000000000f R09: 0000000000000000
[  116.287830][    C0] R10: ffff88811718b8e0 R11: 0000000000000004 R12: 0000000000000000
[  116.296069][    C0] R13: 00000000000aaed0 R14: 0000000000000000 R15: ffff88813fcaaed0
[  116.304176][    C0]  kmsan_get_shadow_origin_ptr+0x2a/0xb0
[  116.309957][    C0]  __msan_metadata_ptr_for_load_8+0x24/0x40
[  116.315975][    C0]  kmem_cache_alloc_noprof+0x1b0/0xb20
[  116.321559][    C0]  ? anon_vma_fork+0x2c8/0xad0
[  116.326458][    C0]  anon_vma_fork+0x2c8/0xad0
[  116.331167][    C0]  ? kmsan_get_shadow_origin_ptr+0x4d/0xb0
[  116.337093][    C0]  ? kmsan_get_metadata+0x146/0x1d0
[  116.342519][    C0]  copy_mm+0x1b57/0x3ca0
[  116.346908][    C0]  copy_process+0x26f7/0x5b90
[  116.351896][    C0]  kernel_clone+0x401/0x1040
[  116.356596][    C0]  ? kmsan_get_metadata+0x146/0x1d0
[  116.361896][    C0]  ? kmsan_get_metadata+0x146/0x1d0
[  116.367640][    C0]  ? __msan_memset+0xf5/0x1b0
[  116.372457][    C0]  __x64_sys_clone+0x25c/0x360
[  116.377377][    C0]  x64_sys_call+0x2a45/0x3b90
[  116.382201][    C0]  do_syscall_64+0xcd/0x1e0
[  116.386840][    C0]  ? clear_bhb_loop+0x25/0x80
[  116.391663][    C0]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[  116.397791][    C0] RIP: 0033:0x7f5286b82a12
[  116.402300][    C0] Code: 41 5d 41 5e 41 5f c3 64 48 8b 04 25 10 00 00 00 45 31 c0 31 d2 31 f6 bf 11 00 20 01 4c 8d 90 d0 02 00 00 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 76 10 48 8b 15 e7 43 0f 00 f7 d8 64 89 02 48 83
[  116.422246][    C0] RSP: 002b:00007ffc58a2d428 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
[  116.430864][    C0] RAX: ffffffffffffffda RBX: 000055b776464901 RCX: 00007f5286b82a12
[  116.438942][    C0] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
[  116.447162][    C0] RBP: 000055b776465ba0 R08: 0000000000000000 R09: 3c00000000001001
[  116.455213][    C0] R10: 00007f5286a48650 R11: 0000000000000246 R12: 000055b776468368
[  116.463463][    C0] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[  116.471794][    C0]  </TASK>
[  116.475163][    C0] Kernel Offset: disabled
[  116.479655][    C0] Rebooting in 86400 seconds..


syzkaller build log:
go env (err=<nil>)
GO111MODULE='auto'
GOARCH='amd64'
GOBIN=''
GOCACHE='/syzkaller/.cache/go-build'
GOENV='/syzkaller/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/syzkaller/jobs-2/linux/gopath/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/syzkaller/jobs-2/linux/gopath'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.4'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/syzkaller/jobs-2/linux/gopath/src/github.com/google/syzkaller/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build572936856=/tmp/go-build -gno-record-gcc-switches'

git status (err=<nil>)
HEAD detached at c8349e4853
nothing to commit, working tree clean


tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
Makefile:31: run command via tools/syz-env for best compatibility, see:
Makefile:32: https://github.com/google/syzkaller/blob/master/docs/contributing.md#using-syz-env
go list -f '{{.Stale}}' ./sys/syz-sysgen | grep -q false || go install ./sys/syz-sysgen
make .descriptions
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
Makefile:31: run command via tools/syz-env for best compatibility, see:
Makefile:32: https://github.com/google/syzkaller/blob/master/docs/contributing.md#using-syz-env
bin/syz-sysgen
touch .descriptions
GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=c8349e48534ea6d8f01515335d95de8ebf5da8df -X 'github.com/google/syzkaller/prog.gitRevisionDate=20240412-102842'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-fuzzer github.com/google/syzkaller/syz-fuzzer
GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=c8349e48534ea6d8f01515335d95de8ebf5da8df -X 'github.com/google/syzkaller/prog.gitRevisionDate=20240412-102842'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-execprog github.com/google/syzkaller/tools/syz-execprog
GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=c8349e48534ea6d8f01515335d95de8ebf5da8df -X 'github.com/google/syzkaller/prog.gitRevisionDate=20240412-102842'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-stress github.com/google/syzkaller/tools/syz-stress
mkdir -p ./bin/linux_amd64
gcc -o ./bin/linux_amd64/syz-executor executor/executor.cc \
	-m64 -O2 -pthread -Wall -Werror -Wparentheses -Wunused-const-variable -Wframe-larger-than=16384 -Wno-stringop-overflow -Wno-array-bounds -Wno-format-overflow -Wno-unused-but-set-variable -Wno-unused-command-line-argument -static-pie -fpermissive -w -DGOOS_linux=1 -DGOARCH_amd64=1 \
	-DHOSTGOOS_linux=1 -DGIT_REVISION=\"c8349e48534ea6d8f01515335d95de8ebf5da8df\"


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


Tested on:

commit:         78161c93 kernel/bpf: KMSAN: uninit-value in htab_lru_p..
git tree:       https://linux.googlesource.com/linux/kernel/git/torvalds/linux
kernel config:  https://syzkaller.appspot.com/x/.config?x=3486f1660f47f855
dashboard link: https://syzkaller.appspot.com/bug?extid=1971e47e5210c718db3c
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] 7+ messages in thread

* Re: [syzbot] [bpf?] KMSAN: uninit-value in htab_lru_percpu_map_lookup_percpu_elem
       [not found] <PN2PR01MB4891B609F58042DF0651A21DFCC12@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
@ 2024-06-13 20:19 ` syzbot
  0 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2024-06-13 20:19 UTC (permalink / raw)
  To: linux-kernel, syzkaller-bugs, wojciech.gladysz

Hello,

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

failed to apply patch:
checking file kernel/bpf/helpers.c
Hunk #1 FAILED at 139.
Hunk #2 FAILED at 7146.
Hunk #3 FAILED at 7230.
Hunk #4 FAILED at 8748.
Hunk #5 FAILED at 8763.
5 out of 5 hunks FAILED



Tested on:

commit:         e478cf26 Merge branch 'bpf-fix-a-couple-of-test-failur..
git tree:       https://linux.googlesource.com/linux/kernel/git/torvalds/linux
kernel config:  https://syzkaller.appspot.com/x/.config?x=b5bc506ebba90cbf
dashboard link: https://syzkaller.appspot.com/bug?extid=1971e47e5210c718db3c
compiler:       
patch:          https://syzkaller.appspot.com/x/patch.diff?x=127983ee980000


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

* Re: [syzbot] [bpf?] KMSAN: uninit-value in htab_lru_percpu_map_lookup_percpu_elem
       [not found] <PN2PR01MB48918635B48EF9B5FEE3D248FCC12@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
@ 2024-06-13 23:12 ` syzbot
  0 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2024-06-13 23:12 UTC (permalink / raw)
  To: linux-kernel, syzkaller-bugs, wojciech.gladysz

Hello,

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

Reported-and-tested-by: syzbot+1971e47e5210c718db3c@syzkaller.appspotmail.com

Tested on:

commit:         e478cf26 Merge branch 'bpf-fix-a-couple-of-test-failur..
git tree:       https://linux.googlesource.com/linux/kernel/git/torvalds/linux
console output: https://syzkaller.appspot.com/x/log.txt?x=1403c99c980000
kernel config:  https://syzkaller.appspot.com/x/.config?x=2ad6a8768920dd4b
dashboard link: https://syzkaller.appspot.com/bug?extid=1971e47e5210c718db3c
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch:          https://syzkaller.appspot.com/x/patch.diff?x=13c6e77a980000

Note: testing is done by a robot and is best-effort only.

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

* Re: [syzbot] [bpf?] KMSAN: uninit-value in htab_lru_percpu_map_lookup_percpu_elem
       [not found] <PN2PR01MB4891074E7F291A7643F61A84FCC22@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
@ 2024-06-15  3:06 ` syzbot
  0 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2024-06-15  3:06 UTC (permalink / raw)
  To: linux-kernel, syzkaller-bugs, wojciech.gladysz

Hello,

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

Reported-and-tested-by: syzbot+1971e47e5210c718db3c@syzkaller.appspotmail.com

Tested on:

commit:         e478cf26 Merge branch 'bpf-fix-a-couple-of-test-failur..
git tree:       https://linux.googlesource.com/linux/kernel/git/torvalds/linux
console output: https://syzkaller.appspot.com/x/log.txt?x=1345c141980000
kernel config:  https://syzkaller.appspot.com/x/.config?x=2ad6a8768920dd4b
dashboard link: https://syzkaller.appspot.com/bug?extid=1971e47e5210c718db3c
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch:          https://syzkaller.appspot.com/x/patch.diff?x=126193e2980000

Note: testing is done by a robot and is best-effort only.

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

end of thread, other threads:[~2024-06-15  3:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <PN2PR01MB4891074E7F291A7643F61A84FCC22@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-15  3:06 ` [syzbot] [bpf?] KMSAN: uninit-value in htab_lru_percpu_map_lookup_percpu_elem syzbot
     [not found] <PN2PR01MB48918635B48EF9B5FEE3D248FCC12@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-13 23:12 ` syzbot
     [not found] <PN2PR01MB4891B609F58042DF0651A21DFCC12@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-13 20:19 ` syzbot
     [not found] <PN2PR01MB48912834FC1742DCE6033E1FFCC12@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-13 14:38 ` syzbot
     [not found] <PN2PR01MB4891E10D8A477396E9E2EF5AFCC72@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-11 12:31 ` syzbot
     [not found] <PN2PR01MB48916CB3DD64BB8C5C73ECD4FCC72@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-11 12:20 ` syzbot
2024-04-16 19:07 syzbot

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