From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4DE762236E8 for ; Fri, 23 Jan 2026 17:54:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769190898; cv=none; b=V20QWwUge5v6UquehdQR6Eo/G8ehc+0vvRpy0NNydbw0pVHv84rXO783n9v/mdU/+hNtEoP3Pbj4AFVI9GTMglwnxCLDQjcBfnGNKUWrqfpe54Lj3foVMHdgwQsuU0bGaeZ/eGbCuDbRfiDjCjmXgqWtmWAXXqW4LXvThzqK/+E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769190898; c=relaxed/simple; bh=jZHzPwIW+gEBmdNrysnZ8e5NZXtHMTr4+x+9Bs3d+HU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=c+QCVDLI7swUVzxd2xfrQZdVRkglftpNXg0R/zx6VY7I3sQGuGwDWwdvsVwhJVCqd1NDaOd9gy50Te3lR+u5140+pJfh30heK2zhlJOxPh4UxNfJlHO9ulwVUjtudsCPmgOT46c7L2/vxXAA8fAjAwspoY3+k1nNHrngAGeQ2Lg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jQNcaRoK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jQNcaRoK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69451C19423; Fri, 23 Jan 2026 17:54:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769190897; bh=jZHzPwIW+gEBmdNrysnZ8e5NZXtHMTr4+x+9Bs3d+HU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jQNcaRoKvWoIbdLvcdYAXZDDjtsc5Pd8J9cOhwyKK6FCdogZ7gHsFmjiAzloXvw4F hBkjK/nfFSn+atKGca4KsW4r1QIZZAfqtXB0YYck2xa2dOW5lRieEB0Vwnh9sM83m/ qJTsaDBiuYyYRRuUGOxSJVIPY8COt9X68UJU1XEoVN8EsrhnG2CE1ZXitwQheK0aYL oDGMsVTT/SPyEX30nsRlxlkUjbQRSOiEKw7DzvbIoWCAIyu2LasrIBP7uRfPGg8GSE isy9GIU6ojvOwZxwThbfVesPD1zVHuknD6wN4r9WlB7imfxe+ebvAc9mUVlMvbH60u a4uTO5zqIVrkA== Date: Fri, 23 Jan 2026 17:54:53 +0000 From: Simon Horman To: Paolo Abeni Cc: netdev@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Donald Hunter , Andrew Lunn , Shuah Khan , Willem de Bruijn , sdf@fomichev.me, petrm@nvidia.com, razor@blackwall.org, idosch@nvidia.com Subject: Re: [PATCH v5 net-next 08/10] geneve: extract hint option at GRO stage Message-ID: References: Precedence: bulk X-Mailing-List: netdev@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: On Thu, Jan 22, 2026 at 03:57:39PM +0100, Paolo Abeni wrote: > On 1/21/26 5:11 PM, Paolo Abeni wrote: > > @@ -566,6 +726,25 @@ static struct sk_buff *geneve_gro_receive(struct sock *sk, > > goto out; > > } > > > > + /* The GRO hint/nested hdr could use a different ethernet type. */ > > + hint_off = geneve_sk_gro_hint_off(sk, gh, &type, &gh_len); > > + if (hint_off) { > > + const struct geneve_opt_gro_hint *gro_hint; > > + > > + /* > > + * If the hint is present, and nested hdr validation fails, do > > + * not attempt plain GRO: it will ignore inner hdrs and cause > > + * OoO. > > + */ > > + gh = skb_gro_header(skb, off_gnv + gh_len, off_gnv); > > + if (unlikely(!gh)) > > + goto out; > > + > > + gro_hint = geneve_opt_gro_hint(gh, hint_off); > > + if (!geneve_opt_gro_hint_validate_csum(skb, gh, gro_hint)) > > + goto out; > > + } > > + > > list_for_each_entry(p, head, list) { > > if (!NAPI_GRO_CB(p)->same_flow) > > continue; > > AI review reports a possible OoB access later on in: Sorry, I forwarded the AI review to you and the whole world, just now, before noticing this email. > > if (gh->opt_len != gh2->opt_len || > memcmp(gh, gh2, gh_len)) { > NAPI_GRO_CB(p)->same_flow = 0; > continue; > } > > specifically in the memcmp() accessing bytes not pulled yet from gh2. I > think such OoB access is not possible: before reaching the buffer bounds > the other packet hdr should match the current one geneve hdr, including > the hint option. Thus, while processing the such packet, the GRO stage > should have already pulled all the relevant data. > > I think this is simply too much to get for the LLM, at least ATM. > > Side note: I was sure I did the shellcheck test before posting, but nipa > says I at very least forgot about it before some latest update (warn in > patch 10). @Jakub: please LMK if you prefer another revision. > > /P >