🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #24563

Re: [PATCH net 1/1] net: erspan: avoid out-of-bounds reads on short non-IP frames

#24563
From: kernel test robot
Date: Mon, 30 Nov 2026 10:55
74 lines
12022 bytes
Hi Ren,

kernel test robot noticed the following build errors:

[auto build test ERROR on net/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Ren-Wei/net-erspan-avoid-out-of-bounds-reads-on-short-non-IP-frames/20261130-132241
base:   net/main
patch link:    https://lore.kernel.org/r/c06f54ca06d68861e2b56ffcd25b2cedac04476a.1795833342.git.rakukuip%40gmail.com
patch subject: [PATCH net 1/1] net: erspan: avoid out-of-bounds reads on short non-IP frames
config: x86_64-buildonly-randconfig-1005-20261130 (https://download.01.org/0day-ci/archive/20261130/20261130185021.1198OdiG-lkp@intel.com/config)
compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261130/20261130185021.1198OdiG-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/20261130185021.1198OdiG-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from net/sched/act_tunnel_key.c:14:
>> include/net/erspan.h:211:9: error: call to undeclared function 'pskb_inet_may_pull'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     211 |         return pskb_inet_may_pull(skb);
         |                ^
   1 error generated.


vim +/pskb_inet_may_pull +211 include/net/erspan.h

   175	
   176	static inline bool erspan_xmit_prepare(struct sk_buff *skb)
   177	{
   178		__be16 type = skb->protocol;
   179		int maclen = ETH_HLEN;
   180		int nhlen = 0;
   181	
   182		if (!pskb_may_pull(skb, ETH_HLEN))
   183			return false;
   184	
   185		skb_reset_mac_header(skb);
   186	
   187		if (eth_type_vlan(type)) {
   188			skb->mac_len = 0;
   189			type = __vlan_get_protocol(skb, type, &maclen);
   190			if (!type)
   191				return false;
   192	
   193			switch (type) {
   194	#if IS_ENABLED(CONFIG_IPV6)
   195			case htons(ETH_P_IPV6):
   196				nhlen = sizeof(struct ipv6hdr);
   197				break;
   198	#endif
   199			case htons(ETH_P_IP):
   200				nhlen = sizeof(struct iphdr);
   201				break;
   202			}
   203	
   204			if (!pskb_may_pull(skb, maclen + nhlen))
   205				return false;
   206	
   207			skb_set_network_header(skb, maclen);
   208			return true;
   209		}
   210	
 > 211		return pskb_inet_may_pull(skb);
   212	}
   213	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Technical Details
Message-ID: <20261130185021.1198OdiG-lkp@intel.com>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374115-linux-kernel-netdev=dewy.ru
References: <c06f54ca06d68861e2b56ffcd25b2cedac04476a.1795833342.git.rakukuip@gmail.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374115-linux-kernel-netdev=dewy.ru
From: lkp@intel.com (kernel test robot)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net 1/1] net: erspan: avoid out-of-bounds reads on short
 non-IP frames
Date: Mon, 30 Nov 2026 18:55:31 +0800
Organization: Usenet Network
Message-ID: <20261130185021.1198OdiG-lkp@intel.com>
References: <c06f54ca06d68861e2b56ffcd25b2cedac04476a.1795833342.git.rakukuip@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="1407209"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:E67dLDfYY/8j8Vewnwx9uFf2DRo= sha256:T+5Lxf5nHh2QEK6jdATHVN91P5KwbSm6KiweCm4CHvU=
	sha1:4w7zcBiuiR0mlXyHQ1fOgT3OqRI= sha256:zkuhY//cDxtvA/4zgUJ1y6TloCCZAZr3QnPPT07sV7M=
Content-Disposition: inline
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 80FEA125FDC; Mon, 30 Nov 2026 13:56:23 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.152
X-Spam-Status: No, score=-3.152 tagged_above=-9999 required=6.31
	tests=[DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=intel.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id dfkNyt-N0r3K;
	Mon, 30 Nov 2026 13:56:19 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-374115-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=intel.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 1F032125D23; Mon, 30 Nov 2026 13:56:09 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id A197322DA3; Mon, 30 Nov 2026 10:56:08 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1796036168;
	b=sXZhEisix7P3JCCPazOUUsoChLFKRLLN3oEzWD42n4HDBquTU4cms8+YjPdOdXt9qrOg
	 D5kuj7206K78O3wz70i8LPmMaf1bCvqpfimpOhfuo0Jn7RS/ORg+DWKwaFaMBvQPUqibM
	 9C8UWjOj2s246dG1b/0OVm17nlyWDV0XZC2JaTDVWoJ7dQkFWz4RYboSW1SlKSGN9QhGB
	 L6yTDNZSR5UV9AChc1rR64Jiuiauc7TNh+MF3HLnoKP+1kzQGE0by3g3mH8MDFZ/8eX/r
	 ztZW2XuLWT2eOlDsB+Z5U5f1gzl1A07wf32RixFIOaj3qhrw/QaeYDasyOW9g/vNgZQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796036168;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:
	 X-CSE-ConnectionGUID:X-CSE-MsgGUID:X-IronPort-AV:X-IronPort-AV:
	 Received:X-CSE-ConnectionGUID:X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:
	 Received:Received:Date:From:To:Cc:Subject:Message-ID:References:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type:
	 Content-Disposition:In-Reply-To;
	bh=Hm/jHxmL88X4de+aUYOgGIVs46stDmb5A+xgMDH9s3Y=;
	b=rigyR+DzyT41EVL8huzr1gkaQ5mkURX0QZz4nzbRgRqgR18UjX+pdnW8s82Q0MUkvWpn
	 tpRnEbplx1UDNUBpJ5AMJb1rPZcn/e8cwEUjZ09ZIf7lcP4iWOAot7KsB7IMBNIlbu/4G
	 IsDWv4818hrKGasyG2c4cqL+O6rGmvpfNkj5HRRPLgVc+nS9St/PcejJqo1NRF32iQr2W
	 u4wdtoSeDPJ+1Yvwxhaf6O4K5NUBSgI4NQMrYUDQNbb/bNptpo3z2VcgoHZJ5rKFBOVxk
	 CHeqEoWy4CVdhMLIyR0o4FvWsiqf7rhoUAjOqfuk9G/qUEfxo3WrJfFqmUkLAcjweoA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=DQ94dYc8;
	dmarc=pass header.from=intel.com;
	spf=pass smtp.mailfrom=intel.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 4CBFE606A332;
	Mon, 30 Nov 2026 10:56:08 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=DQ94dYc8
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=198.175.65.11
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796036167;
	b=CpZ2fUACjQQ1HLaiPclaJhzi+HFi1z6MpYh9mMgBENYaXGc8+KHAnbPS6x8k0YoIc1yV
	 /0oMibLpkykAKz0UiZGhqgqiDemXf9TMS+GLbhqmgYIp3i05hHCTRX0Le5AQrTbIPNWbs
	 bg5QmuCh4yZ0ZcGCfkox4DwDNzvZsPv3kegNA4GOeN02zlgWxc1N0aV22kLlgcmZTx+xC
	 vPOgU0oSccsPT5fiHYws9sxSHBtNX9GldQ+4pLnzQdBHDyj3MFec1immg1OMOL2OwuRMe
	 m60Xak0dRhgvdtAHAYUjBDxssc6Jm3oUwed/+cBc20DBfMQNIDrdl3AUsFohifcnu2w==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796036167;
	h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID:
	 X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID:
	 X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Received:Date:From:To:
	 Cc:Subject:Message-ID:References:MIME-Version:Content-Type:
	 Content-Disposition:In-Reply-To;
	bh=Hm/jHxmL88X4de+aUYOgGIVs46stDmb5A+xgMDH9s3Y=;
	b=UoYuUWqsJ/Ynh21BvxG5Kq9In836EsslFiCzHWZp1Z+FJgg2vp5+q5Z0oF+6Gq6HoGks
	 SRGHepNRJgYvgA9aASgszuOm85aaewqlYWaRK/w5QBALKBDX57eEivACochiAHVHT68G+
	 b81Uf4fVHWq+c6CXi3hP7KwzKTgmUR9xef9+23MpYW6P7EFhyhr4QUXRZSfGPcKjxf4Ti
	 9IS7zC5Ewb+9/S4BInUC2vFM02Aw3As6TRLlOUzhMr8Ijp5VvFqVZnijUyvvZKEh3I5YH
	 tyA5BlUb0QS7pDoMfXbf+nx9yyTdn9flo42MtiHEpWAtDNHnW+7Hi8N8jrFKyZPZyjw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=intel.com;
	spf=pass smtp.mailfrom=intel.com;
	dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=DQ94dYc8;
	arc=none smtp.remote-ip=198.175.65.11
X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11])
	(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC45E606A33B
	for <netdev@vger.kernel.org>; Mon, 30 Nov 2026 10:56:04 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org DC45E606A33B
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
  d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
  t=1796036165; x=1827572165;
  h=date:from:to:cc:subject:message-id:references:
   mime-version:in-reply-to;
  bh=Hm/jHxmL88X4de+aUYOgGIVs46stDmb5A+xgMDH9s3Y=;
  b=DQ94dYc8Y6UP3goKRCB0JaNc9IXEIlQVk1d+YupoWhV0i4Tk1dIJvlVs
   tnruSMezcV5hvwnPnJ0UfPkFgx79PsvTRPq6kU3eNxDD53gzTGqLM4vDr
   NomzH8U+0TM6uGCjOv7/GWoRbaZvRqve7/gwuIKXGVEHfhwIUtH7tb3eh
   mMwEwmoKg3LzTDQI7yI7qSY7bFFyMvHkVi8IApZajukKnJT93mLLOIv03
   vMEuU7qhRBS3Hjfda3A890/cj3rVNl7CI8UCyOACHPUaQ1staI4Gfvb2I
   PomHRo5nVaxd7ktJElad0q61Z/PZvt6RIBkxLGku4OFHcKB2jE3Z+k0PE
   w==;
X-CSE-ConnectionGUID: MoIu2x2VSTq5jZ0aMYEPGQ==
X-CSE-MsgGUID: UNcQN6E3Twajiujzx6TSUA==
X-IronPort-AV: E=McAfee;i="6800,10657,11981"; a="4749807"
X-IronPort-AV: E=Sophos;i="6.27,242,1787036400"; 
   d="scan'208";a="4749807"
X-Received: from orviesa002.jf.intel.com ([10.64.159.142])
  by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2026 02:56:05 -0800
X-CSE-ConnectionGUID: F0WwjLTcQIqJkljH6xppzw==
X-CSE-MsgGUID: Cb/LA7k3Q7Cf8HPPAMXN4A==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.27,242,1787036400"; 
   d="scan'208";a="12933490"
X-Received: from lkp-server01.sh.intel.com (HELO 0caa9d2d175c) ([10.239.97.150])
  by orviesa002.jf.intel.com with ESMTP; 30 Nov 2026 02:56:01 -0800
X-Received: from kbuild by 0caa9d2d175c with local (Exim 4.98.2)
	(envelope-from <lkp@intel.com>)
	id 1xXz37-00000001aYz-3WUS;
	Mon, 30 Nov 2026 10:55:57 +0000
X-Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
	pabeni@redhat.com, willemb@google.com, horms@kernel.org,
	dsahern@kernel.org, idosch@nvidia.com, u9012063@gmail.com,
	mvohra@vmware.com, matthias.may@westermo.com, vega@nebusec.ai,
	sashiko-bot@kernel.org, rakukuip@gmail.com, weir@nebusec.ai
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <c06f54ca06d68861e2b56ffcd25b2cedac04476a.1795833342.git.rakukuip@gmail.com>