Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1621202rdb; Thu, 7 Dec 2023 04:38:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IFHpsdPueDqiiCor0XaxKE0jpNf5ubaYREN7e2ZJO+2YldS5r1nwSkrWfP1RdRTYBIdIEho X-Received: by 2002:a62:8453:0:b0:6cd:e320:b0d5 with SMTP id k80-20020a628453000000b006cde320b0d5mr2010713pfd.12.1701952734192; Thu, 07 Dec 2023 04:38:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701952734; cv=none; d=google.com; s=arc-20160816; b=WtxATbzSwcJaJ24qNjtjkOJKyJSNz6HsdAqreKu5Oj3jSU1q50VTen7w3PatYlKF8R 3SXINl/mDrFoLR5aGFs6501C/OF7qwNo7QVdlas/PMip9U+JaavtzVC7V82UBik5YXXs q1vzlXgacbaxTVH4PYvk00MzhPbl81uf/u/N143h+skEUBaRzYOf8Dq3gv34yJ4zTSGP FPGOubMHx26xFq/1Mpuz2CRDcl7/cKRjx0+2PeOQjx85qUJ09pY6vat4yvSTvqB39ikp QpxttZoAIFSoFmOFD4luIO1f+/OVM3+NfqCvRVRHNbtoqO3Zk3556h9M2YpDgDNJX3+D pzMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=WVBZCf3TgeI02nQQV5CCOYKQC9SbHiL7ittHkRbpBQE=; fh=KaRRC1FmX53+i/cpiuHRKFjsInf1t249Cuo55Rqmxgo=; b=VqntXqxnII0oMKyvagAQlwmKYLAAD2vhzZL1V4yd1EYmCshwbj/I28HApPFyGIjHzk VnOPbIgXqu37oz3UFHSfrHb/Di5hBVjA+oKInQnVJvoQqdfZUcMc9pDo1Aek8QL3TNze Y8hXSRAu7BI9u3wKCqzdNYSnRPwm+nVSehyoBqTzUuiPZjLntte62wXUmFhn1oAYDn9r 6eTIBRh2uu4OL7ANyymB+rwYQPha58YI6dHun1dlQsYEn+rgrWuIWDBM0EAW2i0Tanyc dW1hmYF7zm7WlwuE/ESYJFoMp/UNAAUK1QKyGQzMlDZYCzNycgVB6SKKxjBHe69EqcCK l8Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="UGT3K/P1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id a13-20020a631a0d000000b005c6617b52e3si1112276pga.0.2023.12.07.04.38.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 04:38:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="UGT3K/P1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id DA54F80A5F8E; Thu, 7 Dec 2023 04:38:52 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232358AbjLGMin (ORCPT + 99 others); Thu, 7 Dec 2023 07:38:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232557AbjLGMil (ORCPT ); Thu, 7 Dec 2023 07:38:41 -0500 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC26B10EC for ; Thu, 7 Dec 2023 04:38:38 -0800 (PST) Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-54c77d011acso7971a12.1 for ; Thu, 07 Dec 2023 04:38:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1701952717; x=1702557517; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=WVBZCf3TgeI02nQQV5CCOYKQC9SbHiL7ittHkRbpBQE=; b=UGT3K/P1NseVpJxzpShnooTKmUUr37XaqD4hUw2p4L06Xh+pOvChsxAkGOAj6g6voV A05LVHwYykM4jQ+r23gZHManXr/zsPOe5xoVB7DzejApvCjqIqoRPTqrgIliATyS8A7m ugTZkdU8a5c7uzTBwlc6LqxLQjvcp39DZop7fdP0IlKzvUHV+vR/QZXYomAzj1wJRic9 Zd6vODMcofQWZBNMAHqxM1wonQFRyAi6N1E4MQG5rDB22y305NyHGu/yhTG1DxU/5agd 8uDYOl69hFW/OZvA5pPBhcn4jn3cPoxeOte29Lr9/vsPEdMSzP8Jd/oXFD+yShq3Sbxs gMJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701952717; x=1702557517; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WVBZCf3TgeI02nQQV5CCOYKQC9SbHiL7ittHkRbpBQE=; b=iL5qGjui5oAhTJ80wM2tUS0Y+tGd3F3755GfOgH5Lc2EQFfb7E20EXsy6FhK+j9g9g nuAkiLWonn3Akj+qJPkCkphfoQiytaWPDJNSKBoSMXm3bw6t/5/fQN2lpQHkH62z8eES rKzJVUD0GNwFxnvZXsLw2638W4eiNMCzBQW266JLjhYc/FQOLzv0hFHT+GfFJJGGXXjT 5lbBwgBo+3qlpe7l3rK453vW+hVW+jDcUbW/NphKy9nc6IF3gf+L/9+qBusiaf0TrV0w 013+bXRi0/LeBDsedndWpP51dZbzc/53dupWGibq15BRxTQZhUZEf8rxsRCLt+wp/JGQ fxHA== X-Gm-Message-State: AOJu0YwUq9+QDgIT2zO0tvKsTpZhYdrqwrikuxpSKJ7/NXewAc6qwqWA HTynRhx6bnpt6xky6s3c2jJJ2RNfoZK3F7TpffdZSQ== X-Received: by 2002:a50:c35d:0:b0:54c:79ed:a018 with SMTP id q29-20020a50c35d000000b0054c79eda018mr240271edb.2.1701952716962; Thu, 07 Dec 2023 04:38:36 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Eric Dumazet Date: Thu, 7 Dec 2023 13:38:23 +0100 Message-ID: Subject: Re: [syzbot] [net?] KMSAN: uninit-value in ipgre_xmit To: xingwei lee Cc: davem@davemloft.net, dsahern@kernel.org, kuba@kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, pabeni@redhat.com, syoshida@redhat.com, syzbot+2cb7b1bd08dc77ae7f89@syzkaller.appspotmail.com, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 07 Dec 2023 04:38:53 -0800 (PST) On Thu, Dec 7, 2023 at 6:03=E2=80=AFAM xingwei lee = wrote: > > Hello Eric. > I reproduced this bug with repro.c and repro.txt > HEAD commit: 815fb87b753055df2d9e50f6cd80eb10235fe3e9 > kernel config: https://syzkaller.appspot.com/text?tag=3DKernelConfig&x=3D= f711bc2a7eb1db25 > as the same in https://syzkaller.appspot.com/bug?extid=3D2cb7b1bd08dc77ae= 7f89 > I think the patch has been merged in net tree, thanks. commit 80d875cfc9d3711a029f234ef7d680db79e8fa4b Author: Shigeru Yoshida AuthorDate: Sun Dec 3 01:14:41 2023 +0900 Commit: Paolo Abeni CommitDate: Wed Dec 6 10:08:05 2023 +0100 ipv4: ip_gre: Avoid skb_pull() failure in ipgre_xmit() In ipgre_xmit(), skb_pull() may fail even if pskb_inet_may_pull() retur= ns true. For example, applications can use PF_PACKET to create a malformed packet with no IP header. This type of packet causes a problem such as uninit-value access. This patch ensures that skb_pull() can pull the required size by checki= ng the skb with pskb_network_may_pull() before skb_pull(). Fixes: c54419321455 ("GRE: Refactor GRE tunneling code.") Signed-off-by: Shigeru Yoshida Reviewed-by: Eric Dumazet Reviewed-by: Suman Ghosh Link: https://lore.kernel.org/r/20231202161441.221135-1-syoshida@redhat= .com Signed-off-by: Paolo Abeni