Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1772580lqe; Mon, 8 Apr 2024 22:33:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVlnvgL7lxGmUnD7NY1sXEofNp5eW7nGAgU2TMcQo73UsfNb1A0QtZKzmOhAtInl7ehLIygEVgaOVA/AI/kOXXb3rxaOtz3M+s0RPb1Mg== X-Google-Smtp-Source: AGHT+IHBDLWusk2tGgkrQLehUMnkRFa7TWUakkk8Cer/9IhsfJf2ftN4qjgjzUWEBrF+3LzRmr8U X-Received: by 2002:ac8:5808:0:b0:434:d893:f230 with SMTP id g8-20020ac85808000000b00434d893f230mr914871qtg.56.1712640824273; Mon, 08 Apr 2024 22:33:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712640824; cv=pass; d=google.com; s=arc-20160816; b=H0bVNnuG35JzsDRme0kSBvTqdqcECx6p6X0/gIKhVShH8DFltcgLT1z8WdIBz4p2Cb og7ioUCrmo+ZwY3Jocw7um7dUmOvYZsqM578gtUg/xklRjUmlmOjWDRAdHRfqgC1eK2w VPTKqIv7CTXn50NPX9eftCH85PCSUBSBW5aSCBT90SYL79yrKApDQjAGUg3y0Ceg0KDn JmxnTmVCSqImcL0jA7fFBqa1wqNtVy/vU4iAFPccol8K1XdAhYmy2rc716FerZHqENsO FSHbJzF5IzkcH1swBckB5ubzWI2bVwadQ4wn14x1s7sMlyh7GfyCRX2xnCT2FCdvYui3 2oqQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:cc:from:content-language :references:to:subject:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:date:dkim-signature:message-id; bh=vMq7VtwTD3KKNtFRuY36SYdiaFwdOHm8JX+OzJFzF+w=; fh=rr+erNYCK5/LmxzSzq5Pd93vnCsz6EKY5Jmfa7So6l8=; b=pEa244nOCvGlek05qjO/S8cEnpjb28Jdvq7c3ddn/y35k52PcSftZ8D6VYr/7Yx0s5 vO2qO+VzJgrRCSwVT3ejsVIDwtWP9HB6O2kylEE2QL4QQmHTg4d6JXmvaq3tbx6aF0aK 5k1toAyek+aqTSJ0BgbotWdPw1Uc2AA4n2v3zUJ1Y9Kuy9I64uLA+NrYDhUb32NfBX01 PlgoNpN9Ht1Mx9zeQs96SoNILIooZZjNya7bp5pAsjMaB6Q1pDXBcfczsw7kBNwN3jXZ +sLso8lwOonlXuOOQLtbkGq5C4ej02YFoecMZrE/bAcVLFVxmQro4JiY68fYwlpZDsOQ wDFQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=uq8UCer5; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-136254-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136254-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id p12-20020a05622a00cc00b004314838f893si2573468qtw.558.2024.04.08.22.33.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 22:33:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-136254-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=uq8UCer5; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-136254-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136254-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 043D61C230BA for ; Tue, 9 Apr 2024 05:33:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 68620657D4; Tue, 9 Apr 2024 05:33:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="uq8UCer5" Received: from out-182.mta0.migadu.com (out-182.mta0.migadu.com [91.218.175.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E6849138E for ; Tue, 9 Apr 2024 05:33:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712640814; cv=none; b=Mvhu+oJgNz98ZZDJu0caafBonzByyCoDrMxdFGdK1kh51/h5/GCDL1mXqre1QG5HfFlVKlnD480f7joRKBnQi0n2kaBXDmc1QEzQtOy4m2SrlTSMZrkC5sstdsrh94CrCoW0lmbdLpfcXRwZoyjFdfK+sOSBrFvbNtoioQLN82A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712640814; c=relaxed/simple; bh=AurWwLAIhEz+uZ7H2BQTUaiFp/3kJ8lDBZYFEmHaLYQ=; h=Message-ID:Date:MIME-Version:Subject:To:References:From:Cc: In-Reply-To:Content-Type; b=k8MXUGXV7LjC7wbc73G7hMIJ93MIHeONSfOHpxDeTaHkqX7JUFeLSpHesyxhcx7M+AK9jLMSMkzqN0Etinopblfn03++7QPiPrdAl1B7BXHYwICAVVHVMQq0vl0lUD7PnKWOkLOWvnt8izKLUR2SQCdHSEGBdD5DRBY/KUQRAtg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=uq8UCer5; arc=none smtp.client-ip=91.218.175.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Message-ID: <7419ea60-c310-4ee4-bae1-fd819bfd887a@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1712640811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vMq7VtwTD3KKNtFRuY36SYdiaFwdOHm8JX+OzJFzF+w=; b=uq8UCer51K+TuGa+VVJfw0OwIdJrqmmZS9dXYucOYsHGOj0rZHhgJt8OhEhPWPH9bhJyMW iRbQPt1uOOnIXxnD2ERTMtIt4zESRkvpm4uf13msIcSeeXhsSrxCuEFoL/UGZWFef9bKr6 WmqChSHyQNbfm5en+fr8XzrxAMfVeQ4= Date: Mon, 8 Apr 2024 22:33:24 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [syzbot] [bpf?] KMSAN: uninit-value in bstr_printf To: syzbot References: <000000000000a52c320611ea8b82@google.com> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Martin KaFai Lau Cc: andrii@kernel.org, ast@kernel.org, bpf@vger.kernel.org, daniel@iogearbox.net, haoluo@google.com, john.fastabend@gmail.com, jolsa@kernel.org, kpsingh@kernel.org, linux-kernel@vger.kernel.org, sdf@google.com, song@kernel.org, syzkaller-bugs@googlegroups.com, yonghong.song@linux.dev In-Reply-To: <000000000000a52c320611ea8b82@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 2/21/24 12:55 PM, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit: c1ca10ceffbb Merge tag 'scsi-fixes' of git://git.kernel.or.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=10e7f5f0180000 > kernel config: https://syzkaller.appspot.com/x/.config?x=e3dd779fba027968 > dashboard link: https://syzkaller.appspot.com/bug?extid=f0d29b273acdcd3a2562 > compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 > > Unfortunately, I don't have any reproducer for this issue yet. > > Downloadable assets: > disk image: https://storage.googleapis.com/syzbot-assets/83d019f0ac47/disk-c1ca10ce.raw.xz > vmlinux: https://storage.googleapis.com/syzbot-assets/49e05dd7a23d/vmlinux-c1ca10ce.xz > kernel image: https://storage.googleapis.com/syzbot-assets/68ec9fa2d33d/bzImage-c1ca10ce.xz > > IMPORTANT: if you fix the issue, please add the following tag to the commit: > Reported-by: syzbot+f0d29b273acdcd3a2562@syzkaller.appspotmail.com > > ===================================================== > BUG: KMSAN: uninit-value in bstr_printf+0x19df/0x1b50 lib/vsprintf.c:3334 > bstr_printf+0x19df/0x1b50 lib/vsprintf.c:3334 > ____bpf_snprintf kernel/bpf/helpers.c:1064 [inline] > bpf_snprintf+0x1c8/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 #syz dup: [syzbot] [bpf?] [net?] KMSAN: uninit-value in dev_map_lookup_elem > 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 > > Uninit was stored to memory at: > bpf_bprintf_prepare+0x138d/0x23b0 kernel/bpf/helpers.c:1027 > ____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: 1 PID: 8904 Comm: syz-executor.2 Not tainted 6.8.0-rc4-syzkaller-00331-gc1ca10ceffbb #0 > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 > =====================================================