Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4926328rwi; Mon, 17 Oct 2022 12:47:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5n15Mtfm4UeW3OFf2VrGuRFgeZx0okla7LqjRZRQt5592buAdU8u2uxZ0JQsHO2eY6XQjH X-Received: by 2002:a63:1765:0:b0:457:8091:1b6c with SMTP id 37-20020a631765000000b0045780911b6cmr11870662pgx.208.1666036050709; Mon, 17 Oct 2022 12:47:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666036050; cv=none; d=google.com; s=arc-20160816; b=yEXUc/eP2ZEsG1HOu+F3Os5V4LOjipUnvvXf6UZDuJ+GCEDGntO5tGp+JElztQlfXg LxqgezhgqpLdj3zFKJn4hy4mVvIh7S7hH0vGcdCI8L1BMtGhfczkN4LIkNoQ5zieMR2x 1eJa79g8kuyKFvI4u94uPAHv3MKxqzp8mU62GQby+wvBfZSsC6I57UXrrYDJ9ZGM/+8v bOdnDn44EhFoUJvHoe4RrzKP4HLieLPP5xYG+dEXkjbcRG5ZO4SmQXtBbaTFLp0y/m9Y u+SMV8ME+xLNZuveyoMmVJ1YbZ5biuIMG844b2UPLsn6MlWZ2aytxQfnsCt2zWmXFu0s Izjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=xvevj/NdIg6YMapooctmQ9rHKO3QEX0wM9KkmEb83KQ=; b=K7wYEHn55eEPqF7mH3kZ12x0CNNpODB7KX6bgIs0meflcyX/tEz4xUhEsfkeEh6y9+ 4ZZrjKRbgSD8e4gmWA65mOQRqn/OjzVumZMYFstqryrcqg9e6PY2/l180wymPNPbOKzP pFRWXlWXJdNWgcG5Pg0b8P1Q7yDjOJIAoUSMv70jOZMQuUA6EY3qkhWd41umrhv5t6tB hCRGr1yRHhEbg+7LhNsePcbJkVxsS+Q6MOJHbmU9O92mibZ54XqqiojwfMGB0Kg/JBRM 668GyXAM+Cjpy2vGsgFIjgkkz5CEei6Ur5cVAA3YcllBbYrl9QPRjLkfZSTyjVRX+LWb mnyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UPlfsDe5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j14-20020a637a4e000000b0044cedfa9dd5si12338394pgn.756.2022.10.17.12.47.18; Mon, 17 Oct 2022 12:47:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UPlfsDe5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230266AbiJQTNx (ORCPT + 99 others); Mon, 17 Oct 2022 15:13:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230228AbiJQTNu (ORCPT ); Mon, 17 Oct 2022 15:13:50 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 498047644B; Mon, 17 Oct 2022 12:13:48 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B8655B818FD; Mon, 17 Oct 2022 19:13:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1BDBEC433D6; Mon, 17 Oct 2022 19:13:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666034025; bh=EcnCKu7ktjEeqc78rbCzwyn7s5ZWeiAoC38ZtHSoJ7M=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=UPlfsDe5pblGvt91DrLH5G2O3Ltc9kP6VBFDcjIipGh5Lpe/JWFd7yzQbpiBJ207z ckQQ4VtO3XuPtncgb3UmKw71kw0Gx8ZqLlBjW8tUb+UwyOxYS5anc3e6lO2nq2vcea SHnFhnYdP3xZsAlDzN1ClFhTjeNusI1gHuI4mbPvIXavE83btahlQqIh3zfU8b/WoX DCM0uiq0Dm9wfxHhzoUKXt6d7r5BrGzwMlYmeqnnryL33tM+uM+IRLP8UhAoPvIThL 1tBXJ7+vYUFXcloFuB4WShZp5DKhlWdoNEU5rpb5iQ5bn0Pzb9N9Yf7soJBzzy1w0b p7XRsa7zKMjhw== Date: Mon, 17 Oct 2022 12:13:44 -0700 From: Jakub Kicinski To: syzbot Cc: davem@davemloft.net, dsahern@kernel.org, edumazet@google.com, glider@google.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, pabeni@redhat.com, syzkaller-bugs@googlegroups.com, yoshfuji@linux-ipv6.org, bpf@vger.kernel.org Subject: Re: [syzbot] KMSAN: uninit-value in erspan_build_header Message-ID: <20221017121344.1258c0f1@kernel.org> In-Reply-To: <0000000000004438f605ead95255@google.com> References: <0000000000004438f605ead95255@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org CC: bpf, looks like we have a packet with uninitialized payload generated by BPF_PROG_TEST_RUN? On Wed, 12 Oct 2022 09:59:52 -0700 syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit: 968c2729e576 x86: kmsan: fix comment in kmsan_shadow.c > git tree: https://github.com/google/kmsan.git master > console output: https://syzkaller.appspot.com/x/log.txt?x=100cd00c880000 > kernel config: https://syzkaller.appspot.com/x/.config?x=131312b26465c190 > dashboard link: https://syzkaller.appspot.com/bug?extid=d551178aab6a783dc249 > compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project.git 610139d2d9ce6746b3c617fb3e2f7886272d26ff), GNU ld (GNU Binutils for Debian) 2.35.2 > userspace arch: i386 > > Unfortunately, I don't have any reproducer for this issue yet. > > Downloadable assets: > disk image: https://storage.googleapis.com/syzbot-assets/c78ce21b953f/disk-968c2729.raw.xz > vmlinux: https://storage.googleapis.com/syzbot-assets/22868d826804/vmlinux-968c2729.xz > > IMPORTANT: if you fix the issue, please add the following tag to the commit: > Reported-by: syzbot+d551178aab6a783dc249@syzkaller.appspotmail.com > > ===================================================== > BUG: KMSAN: uninit-value in erspan_build_header+0x16d/0x330 include/net/erspan.h:197 > erspan_build_header+0x16d/0x330 include/net/erspan.h:197 > erspan_xmit+0x11a2/0x1f00 net/ipv4/ip_gre.c:701 > __netdev_start_xmit include/linux/netdevice.h:4819 [inline] > netdev_start_xmit include/linux/netdevice.h:4833 [inline] > xmit_one+0x14e/0x5f0 net/core/dev.c:3590 > dev_hard_start_xmit+0xe5/0x370 net/core/dev.c:3606 > sch_direct_xmit+0x3f1/0xdb0 net/sched/sch_generic.c:342 > __dev_xmit_skb+0xc22/0x1a30 net/core/dev.c:3817 > __dev_queue_xmit+0x12cb/0x31f0 net/core/dev.c:4222 > dev_queue_xmit include/linux/netdevice.h:3008 [inline] > __bpf_tx_skb net/core/filter.c:2115 [inline] > __bpf_redirect_common net/core/filter.c:2154 [inline] > __bpf_redirect+0x1293/0x13b0 net/core/filter.c:2161 > ____bpf_clone_redirect net/core/filter.c:2430 [inline] > bpf_clone_redirect+0x324/0x470 net/core/filter.c:2402 > ___bpf_prog_run+0x7ed/0xaee0 kernel/bpf/core.c:1813 > __bpf_prog_run512+0xc2/0x110 kernel/bpf/core.c:2038 > bpf_dispatcher_nop_func include/linux/bpf.h:903 [inline] > __bpf_prog_run include/linux/filter.h:594 [inline] > bpf_prog_run include/linux/filter.h:601 [inline] > bpf_test_run+0x592/0xd20 net/bpf/test_run.c:402 > bpf_prog_test_run_skb+0x1625/0x20b0 net/bpf/test_run.c:1141 > bpf_prog_test_run+0x6a0/0x730 kernel/bpf/syscall.c:3620 > __sys_bpf+0x88d/0xe70 kernel/bpf/syscall.c:4971 > __do_sys_bpf kernel/bpf/syscall.c:5057 [inline] > __se_sys_bpf kernel/bpf/syscall.c:5055 [inline] > __ia32_sys_bpf+0x9c/0xe0 kernel/bpf/syscall.c:5055 > do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] > __do_fast_syscall_32+0xa2/0x100 arch/x86/entry/common.c:178 > do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203 > do_SYSENTER_32+0x1b/0x20 arch/x86/entry/common.c:246 > entry_SYSENTER_compat_after_hwframe+0x70/0x82 > > Uninit was created at: > slab_post_alloc_hook mm/slab.h:732 [inline] > slab_alloc_node mm/slub.c:3258 [inline] > __kmalloc_node_track_caller+0x814/0x1250 mm/slub.c:4970 > kmalloc_reserve net/core/skbuff.c:362 [inline] > pskb_expand_head+0x24a/0x1a80 net/core/skbuff.c:1729 > __skb_cow include/linux/skbuff.h:3529 [inline] > skb_cow_head include/linux/skbuff.h:3563 [inline] > erspan_xmit+0xad2/0x1f00 net/ipv4/ip_gre.c:688 > __netdev_start_xmit include/linux/netdevice.h:4819 [inline] > netdev_start_xmit include/linux/netdevice.h:4833 [inline] > xmit_one+0x14e/0x5f0 net/core/dev.c:3590 > dev_hard_start_xmit+0xe5/0x370 net/core/dev.c:3606 > sch_direct_xmit+0x3f1/0xdb0 net/sched/sch_generic.c:342 > __dev_xmit_skb+0xc22/0x1a30 net/core/dev.c:3817 > __dev_queue_xmit+0x12cb/0x31f0 net/core/dev.c:4222 > dev_queue_xmit include/linux/netdevice.h:3008 [inline] > __bpf_tx_skb net/core/filter.c:2115 [inline] > __bpf_redirect_common net/core/filter.c:2154 [inline] > __bpf_redirect+0x1293/0x13b0 net/core/filter.c:2161 > ____bpf_clone_redirect net/core/filter.c:2430 [inline] > bpf_clone_redirect+0x324/0x470 net/core/filter.c:2402 > ___bpf_prog_run+0x7ed/0xaee0 kernel/bpf/core.c:1813 > __bpf_prog_run512+0xc2/0x110 kernel/bpf/core.c:2038 > bpf_dispatcher_nop_func include/linux/bpf.h:903 [inline] > __bpf_prog_run include/linux/filter.h:594 [inline] > bpf_prog_run include/linux/filter.h:601 [inline] > bpf_test_run+0x592/0xd20 net/bpf/test_run.c:402 > bpf_prog_test_run_skb+0x1625/0x20b0 net/bpf/test_run.c:1141 > bpf_prog_test_run+0x6a0/0x730 kernel/bpf/syscall.c:3620 > __sys_bpf+0x88d/0xe70 kernel/bpf/syscall.c:4971 > __do_sys_bpf kernel/bpf/syscall.c:5057 [inline] > __se_sys_bpf kernel/bpf/syscall.c:5055 [inline] > __ia32_sys_bpf+0x9c/0xe0 kernel/bpf/syscall.c:5055 > do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] > __do_fast_syscall_32+0xa2/0x100 arch/x86/entry/common.c:178 > do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203 > do_SYSENTER_32+0x1b/0x20 arch/x86/entry/common.c:246 > entry_SYSENTER_compat_after_hwframe+0x70/0x82 > > CPU: 0 PID: 12499 Comm: syz-executor.1 Not tainted 6.0.0-rc5-syzkaller-48543-g968c2729e576 #0 > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 > ===================================================== > > > --- > 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.