🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #16412

Re: [PATCH] bpf: fix verifier model mismatch on __sk_buff.remote_port narrow read

#16412
From: patchwork-bot+netdevbpf
Date: Sat, 14 Nov 2026 18:50
30 lines
9003 bytes
Hello:

This patch was applied to bpf/bpf.git (master)
by Alexei Starovoitov <ast@kernel.org>:

On Thu,  5 Nov 2026 14:03:31 +0800 you wrote:
> On little endian, the ctx access conversion for __sk_buff.remote_port
> loads the 16-bit skc_dport and shifts it left by 16, producing a
> 4-byte value of up to 0xffff0000.  It reports its width through
> bpf_target_off() as 2, the member size.
> 
> A 2-byte read is a narrower load of this 4-byte ctx field, but the
> fixup pass only masks the result when the access size is smaller
> than the reported width, so the masking is skipped.  The verifier
> models the register as [0, 0xffff] while the runtime value is
> [0, 0xffff0000].  Arithmetic the verifier folds to a constant can
> therefore take any 16-bit port value at runtime, enabling
> out-of-bounds reads and writes relative to map values.
> 
> [...]

Here is the summary with links:
  - bpf: fix verifier model mismatch on __sk_buff.remote_port narrow read
    https://git.kernel.org/bpf/bpf/c/4722bac72de6

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Technical Details
Message-ID: <179468221032.2337414.16612050775582398663.git-patchwork-notify@kernel.org>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363415-linux-kernel-netdev=dewy.ru
References: <20261105060331.1912252-1-bsdhenrymartin@gmail.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363415-linux-kernel-netdev=dewy.ru
From: patchwork-bot+netdevbpf@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH] bpf: fix verifier model mismatch on __sk_buff.remote_port
 narrow read
Date: Sat, 14 Nov 2026 18:50:10 +0000
Organization: Usenet Network
Message-ID: <179468221032.2337414.16612050775582398663.git-patchwork-notify@kernel.org>
References: <20261105060331.1912252-1-bsdhenrymartin@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1637668"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:Z5pbDz4Yoq8PI9A9K70Y63u0uyc= sha256:8ud1bdKiBnYhqNmGXoySq14alUYyDdaytb62sq0+UTk=
	sha1:+9MI1PWAXYFo/FQjATTM03xspDQ= sha256:O1w0940oMTlnqQ5t962Q0Re24hXc2Aw8nuib6jYTAHk=
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 E3A8C11489C; Sat, 14 Nov 2026 21:51:09 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	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=kernel.org
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 8kdaQ_7hVRke;
	Sat, 14 Nov 2026 21:51:04 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-363415-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id AD7C011489E; Sat, 14 Nov 2026 21:50:49 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id 240F533DF2; Sat, 14 Nov 2026 18:50:22 +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=1794682212;
	b=Jo0VITOiQazbCF9rIktWr9PpfJlY/YOHocRAJi1/+7h/Gr8Nka+bxjatZe495EQCw+IC
	 C7urqowdXpYvtLNudVEe+1CEJVVPkb+M+2ApS2S8bRnqRLb9hpljvhkSiZs/8MHqGtfY9
	 Ty14b0NOkOH01w9UKfbT64+o7hiQjhJUGBbvvMTUK/XgUBaOmNdlEfwJv9h8n/tDqev0D
	 CDTBDWdQ5y0ajtf4eF7l70MDPbO0af0txPWwNXNRieSLUX7toUI4xsSIRHZl78xQglxVF
	 7pYrBMLKN7h3Y81d/PrM4VMLemYwlmSpYqxLvQbjcnqrc4AsvaZaVqb/DQrPvlzJ7hA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794682212;
	h=X-Original-To:Received:Received:DKIM-Signature:Received:Content-Type:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding:Subject:From:Message-Id:Date:References:
	 In-Reply-To:To:Cc;
	bh=fEnV7meHeIXrbVFY6btGf5S6ZSC7MZxfBU/Gv7848Sg=;
	b=U0EghHOhg7k6zEnSxyRk+nqeGGzDbn6pfIzbrnAlFs+UkGJLyiX+YnPaxXW/53XJlFYO
	 0Bus8Lt4pbcbqoTzlUIaW0K0ovAA0sVhPvG8UYruP6uPIohpmsN3DYF1bur+kxtbNCEWV
	 LKO0lxc48plivcoh8OQxTIiloh746oyFKkzmKS0CjPE44K8mdFKkpggUBFHtdDWqHwOid
	 cSNRoceIGblioQf/w+A5ff3daXJ1eY4dGbuqC2+Qi9rGrKtCKRAIP1ZfRprEDTtxfGyIX
	 TX/Gp3h/K7mKgg75YG1pA5IogWoDzQCbVlOpk1K/1lqT08qVqCBE6RGEEl0ddyjpVFw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=FvFmHS+5;
	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 C7634606A88E;
	Sat, 14 Nov 2026 18:50:12 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=FvFmHS+5
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794682212;
	b=1UuXkcb5plrk3tZhhJ7Eghmt0cOlFc3gmnSI0DgTzxqHO6PjzrEdd5pnrejtgTEqtYYa
	 rP3PGZhjQvk+u8xQDUMZ1s9z3H9G23/jNS3r5JYoycytKtciAKJXUg8G43yGKeJPvv6ob
	 ln3QAKj1hAbzrZpQxBVbZg5N1dVdHRoDdlUn1z/bQt+iLiMWQb0It4vVhcnPgT8a0fvvz
	 J0hYTYLABWFBTUcKb2oJWWIlhGIdjDkoZwkdk+xtJny/39csTz3btyy1+9utx7mSPbwp7
	 6wrLsKdS8/aeJBalY/8pIRsXaYx+ImXLrr+lw9jUE400LMN8dAQFcrgo9fW6e3Y997w==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794682212;
	h=Received:DKIM-Signature:Received:Content-Type:MIME-Version:
	 Content-Transfer-Encoding:Subject:From:Message-Id:Date:References:
	 In-Reply-To:To:Cc;
	bh=fEnV7meHeIXrbVFY6btGf5S6ZSC7MZxfBU/Gv7848Sg=;
	b=qPV17k2RDCzhaqCbrezkXq0JA15HG8+QrKETsB5m9HE/qBLgPru8Y3a4gFNeqH9Uqs7F
	 Y46X2bl/hO44oMV2tEwZ81N3lGHJOmtAe8Dgn93KJEcP1IJp9D782e/la8SdpWpJxRUhS
	 nro4xsOT7UG/wAaU7kW5eJWL9/YOmFHZN+4Ygn+njFjLWvrjk0Q2s45Ot/3SMs5bXNebp
	 8dTQBOTQUNPvTeBL3K2DHCP0bAzEXdz4F1d72YDh6uUel2xcgzjM+qjhHhdshGrRrdoy9
	 IpuFeMAWNN7MCB1SsG+uV5L0RfE80JWPYGD1yp9exihv1wMBs1/RtEd613y+ayh7VvQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=FvFmHS+5;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id E3B75606A33D;
	Sat, 14 Nov 2026 18:50:11 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE0E91F000C4;
	Sat, 14 Nov 2026 18:50:11 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1794682211;
	bh=fEnV7meHeIXrbVFY6btGf5S6ZSC7MZxfBU/Gv7848Sg=;
	h=Subject:From:Date:References:In-Reply-To:To:Cc;
	b=FvFmHS+5+QWxgtOwZTk/Y0D+SqDIHf0VYPzmVLeWjONAqHuW/t2jQRbuoPckf452l
	 2yis/DCXEOZ9/JqbF+uxZlSCtivMICeIQooAoDxqULDSBs0OxwFYXDesotmA4wAw+S
	 IjGw9IZ2u+lRuiU9RSUm4R3yBcth0yk9hkT9MYkJ/9NZC9tjcx0V/ndN5YMc7yDec6
	 MOg9RZ4G+Z1dsEWgdUTV3zUnQReGYUUKIi2D0B4NWWLALLpkklZp7BAQ/zMqLTEcCd
	 oktWRpJjtMyOPVI1rFDu7AcfWUr0TRrcBOS2A31nbCYNqgDJkEeDuZjyj8dloqZ0g2
	 Gj0pgfLPikesQ==
X-Received: from [10.30.226.235] (localhost [IPv6:::1])
	by aws-us-west-2-korg-oddjob-rhel9-1.codeaurora.org (Postfix) with ESMTP id B4411380821F;
	Sat, 14 Nov 2026 18:50:11 +0000 (UTC)
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: <20261105060331.1912252-1-bsdhenrymartin@gmail.com>
X-Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
 eddyz87@gmail.com, memxor@gmail.com, john.fastabend@gmail.com,
 bpf@vger.kernel.org, netdev@vger.kernel.org, stable@vger.kernel.org