Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp322731rdb; Thu, 22 Feb 2024 05:06:46 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVuoEefFxYXqaCjunJHpyJyFVpY8g/MFWF4tkcXl+VGVh3gF9ntfnBkwjbF1u+jLV+gVEbSYKUeVO3Q0xbagHfLkijVZs9FSs1rgoj/RA== X-Google-Smtp-Source: AGHT+IExFyUYLnemb7S8iTP9IRzMUUvEO/PuiKkxW/plstVIeEae0n3eQlt4Yb//YsbdqKgDLZ1O X-Received: by 2002:a17:90b:397:b0:299:14e4:6579 with SMTP id ga23-20020a17090b039700b0029914e46579mr17054680pjb.22.1708607205769; Thu, 22 Feb 2024 05:06:45 -0800 (PST) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id y3-20020a17090a154300b00299945e4e76si3486217pja.43.2024.02.22.05.06.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 05:06:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76551-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-76551-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76551-linux.lists.archive=gmail.com@vger.kernel.org" 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 8D3ADB26105 for ; Thu, 22 Feb 2024 12:57:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9741812EBD4; Thu, 22 Feb 2024 12:57:45 +0000 (UTC) Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [91.216.245.30]) (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 4F15D60B90; Thu, 22 Feb 2024 12:57:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.216.245.30 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708606665; cv=none; b=tUXwoTmlbADQdD2GfD+mIehuDoyE174+2M58hEoxbRBrn56mOY4FvkRAVrPKi72Cg2CH38mGOmsAS31wrxFKdRtcqXyJK5ouzjTBrt76f9N4pG92U92+Bl4SQnNZ6/dgfO/oNTw5qv7qU3ZZbCVHFhS0vJ2GP0V7n85lG5rIETc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708606665; c=relaxed/simple; bh=+qvvPZXpgTl7G1RN1KLsQKEcGIO6JxzMVv5IwwoubU0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZTPpFAZxzlje+z0rpMFZZTiK+WdTOP7VEc45DPsgVsjIAsqOdh236oJgTH6uRYDFPR1HczLHAC/Y3dxjxOCBoZKpCRnHpEWNFIdDUOHFyC1CIg6Nnt/e5bl+njp8SsQWGXCeTCTJB9EKtkRcmjsr37qts5rgOD1DQGVwwOPh+og= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de; spf=pass smtp.mailfrom=strlen.de; arc=none smtp.client-ip=91.216.245.30 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=strlen.de Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1rd8du-0004wI-17; Thu, 22 Feb 2024 13:57:38 +0100 Date: Thu, 22 Feb 2024 13:57:38 +0100 From: Florian Westphal To: Eric Dumazet Cc: Florian Westphal , syzbot , davem@davemloft.net, dsahern@kernel.org, horms@kernel.org, kuba@kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, pabeni@redhat.com, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [net?] WARNING in mpls_gso_segment Message-ID: <20240222125738.GC28098@breakpoint.cc> References: <00000000000043b1310611e388aa@google.com> <20240221131546.GE15988@breakpoint.cc> <20240222122324.GB28098@breakpoint.cc> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Eric Dumazet wrote: > I was thinking about adding a debug check in skb_inner_network_header(skb) > if inner_network_header is zero (that would mean it is not 'set' yet), > but this would trigger even after your patch. What about adding: static inline bool skb_inner_network_header_was_set(const struct sk_buff *skb) { return skb->inner_network_header > 0; } .. and using that instead of checking for negative header length post-subtraction?