syzbot


KMSAN: uninit-value in bpf_bprintf_prepare

Status: closed as dup on 2024/04/09 05:35
Subsystems: bpf
[Documentation on labels]
Reported-by: syzbot+c2dc95f7d0825a145992@syzkaller.appspotmail.com
First crash: 277d, last: 237d
Duplicate of
Title Repro Cause bisect Fix bisect Count Last Reported
KMSAN: uninit-value in dev_map_lookup_elem bpf net C 3 234d 241d
Discussions (3)
Title Replies (including bot) Last reply
[syzbot] [bpf?] KMSAN: uninit-value in bpf_bprintf_prepare 1 (3) 2024/04/09 05:35
Re: [syzbot] [bpf?] KMSAN: uninit-value in bpf_bprintf_prepare 1 (1) 2024/02/23 15:48
Re: [syzbot] [bpf?] KMSAN: uninit-value in bstr_printf 1 (1) 2024/02/23 15:44
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-15 UBSAN: array-index-out-of-bounds in bpf_bprintf_prepare C done 12 189d 277d 0/2 auto-obsoleted due to no activity on 2024/08/24 09:50
android-6-1 UBSAN: array-index-out-of-bounds in bpf_bprintf_prepare C done 14 173d 272d 0/2 auto-obsoleted due to no activity on 2024/09/09 11:57
Last patch testing requests (1)
Created Duration User Patch Repo Result
2024/03/17 07:13 25m retest repro upstream report log

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in bpf_bprintf_prepare+0x1ec4/0x23b0 kernel/bpf/helpers.c:934
 bpf_bprintf_prepare+0x1ec4/0x23b0 kernel/bpf/helpers.c:934
 ____bpf_snprintf kernel/bpf/helpers.c:1060 [inline]
 bpf_snprintf+0x141/0x360 kernel/bpf/helpers.c:1044
 ___bpf_prog_run+0x2180/0xdb80 kernel/bpf/core.c:1986
 __bpf_prog_run288+0xb5/0xe0 kernel/bpf/core.c:2226
 bpf_dispatcher_nop_func include/linux/bpf.h:1231 [inline]
 __bpf_prog_run include/linux/filter.h:651 [inline]
 bpf_prog_run include/linux/filter.h:658 [inline]
 bpf_prog_run_pin_on_cpu include/linux/filter.h:675 [inline]
 bpf_flow_dissect+0x127/0x470 net/core/flow_dissector.c:991
 bpf_prog_test_run_flow_dissector+0x6f4/0xa20 net/bpf/test_run.c:1359
 bpf_prog_test_run+0x6af/0xac0 kernel/bpf/syscall.c:4107
 __sys_bpf+0x649/0xd60 kernel/bpf/syscall.c:5475
 __do_sys_bpf kernel/bpf/syscall.c:5561 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5559 [inline]
 __x64_sys_bpf+0xa0/0xe0 kernel/bpf/syscall.c:5559
 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+0x63/0x6b

Local variable stack created at:
 __bpf_prog_run288+0x45/0xe0 kernel/bpf/core.c:2226
 bpf_dispatcher_nop_func include/linux/bpf.h:1231 [inline]
 __bpf_prog_run include/linux/filter.h:651 [inline]
 bpf_prog_run include/linux/filter.h:658 [inline]
 bpf_prog_run_pin_on_cpu include/linux/filter.h:675 [inline]
 bpf_flow_dissect+0x127/0x470 net/core/flow_dissector.c:991

CPU: 0 PID: 5018 Comm: syz-executor377 Not tainted 6.8.0-rc6-syzkaller-00250-g04b8076df253 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
=====================================================

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/03/03 06:47 upstream 04b8076df253 25905f5d .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in bpf_bprintf_prepare
2024/03/29 05:07 upstream 8d025e2092e2 120789fd .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in bpf_bprintf_prepare
2024/02/17 20:51 upstream c1ca10ceffbb 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in bpf_bprintf_prepare
2024/02/17 20:51 upstream c1ca10ceffbb 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in bpf_bprintf_prepare
* Struck through repros no longer work on HEAD.