From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796418576; b=WdCDCPcunYIfncXv1dEUGiYolY5Y/8HVGIajhLTLWzzsbdkAn3Gu7ewjHiPmo5zFq1G4 JbnzD3H/24Fl/tGBmdRIlTDPaoRW3YcsqjNtvlCKX4GCPIZUGTvRKURpJRm3dTpHxVKJB xNYb9wWrXVcuV1rfB0PSjrcLe86hM52Md7tZY/gvO6bPL/nUWbuwnmCtgkLauAeqD93cg eJhTvnGWrkDECKz+tUAXRHhufzzsfF0rPDP52YyMy5sH0EzS/ahxSc1U+iEwA8fK4jni5 Sh5k/qpawmjgmXXbWpJXKL7zCqPrbCisiRFE2OJmO4fXhvoeFkw1+YrCetPbwhrovCA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796418576; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=+1O97jM+ZmbDhRTPj22bXcMnVmsAr6wLtzjNu6uI1PU=; b=uZBwErn/QBjrc22ivJscOlkorcZ7oOUK54aYS7XI+NHEEO0pY9BHSzJlwWhok2IT5baP dWE3DkKtCCtJ7vMBiX0EkkMenUvpCHuj7SncFFFVz+kFHXmDPW9j+ExQJwYiafLV9A9u+ jsQ1goiwL8X10rdleNqiUgYhTipeFmmlE5kLCI7AluFjcQNV/psG0QvheoHJmrpGnSQtr 3CRyMfFQZ/vPwzbEebYdpTL6E9AAOIsUhsGnrNo4/E9T3Hu2sZsu741txViRGiLBEds/N fXXn2x4kpzkIMYO6qilxB/2gg6Z/Fjp5xNyNyNdgyUkhQ/VeAxYxu//U/CWckOfRcQw== 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=jZB7XKXL; arc=none smtp.remote-ip=100.103.45.18 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 67762606A338 for ; Fri, 4 Dec 2026 21:09:36 +0000 (UTC) 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=jZB7XKXL Received: by smtp.kernel.org (Postfix) with ESMTPSA id D80D61F00A10; Fri, 4 Dec 2026 21:09:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796418576; bh=+1O97jM+ZmbDhRTPj22bXcMnVmsAr6wLtzjNu6uI1PU=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=jZB7XKXLSVoRovmmw/LJ+igt4m3JYNx+kM1heBetKcceE1xgA4vyVgSIkb0YGLSKO xWWOaNCjcLr6lZIwstvcibh6ta5nsSKPsyV7wGqo4CT0eS18bSq2k7OwQmoYY+BvoO bU9UskV3mCRSI/bmcCshLFi+iqRoGORc2QFUbZNUG68otOILfhJDlCIHCF8xsLKxjU 2MWcye2Tl/X4VV/cgvJXAEOA9jQq1FZOfJ26OPXWT70hui5sakDWZYRc92NQ/h7/4j r8gwJTVLHx9AkcKJz/7Sz5zvToDiVXmxi4sQ0R9JPi+amPjCKJGlYkRDVcA9669WDv HqXFkaSm7eGrQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH net 04/10] net: skbuff, skmsg, strparser: reject unreadable frags Reply-To: sashiko-reviews@lists.linux.dev To: "Octavian Purdila" Cc: bpf@vger.kernel.org In-Reply-To: <45de3e0b30489d345270cdc5c582218dc119cc31.1796329894.git.tavip@google.com> References: <45de3e0b30489d345270cdc5c582218dc119cc31.1796329894.git.tavip@google.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 21:09:35 +0000 X-Mailing-List: bpf@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] net: __skb_send_sock() transmits linear head and masks -EFAULT -- commit 176413a89d4b1baf360d64806067d08b833448bd Author: Octavian Purdila net: skbuff, skmsg, strparser: reject unreadable frags This commit adds readability checks for skb fragments in scatterlist conversion, __skb_send_sock(), sockmap verdict processing, and strparser to fail with -EFAULT on unreadable frags. > diff --git a/net/core/skbuff.c b/net/core/skbuff.c > index 8ac7ad1378a12..d20d08682a132 100644 > --- a/net/core/skbuff.c > +++ b/net/core/skbuff.c > @@ -3380,6 +3380,11 @@ static int __skb_send_sock(struct sock *sk, struct= sk_buff *skb, int offset, > if (!len) > goto out; > =20 > + if (unlikely(!skb_frags_readable(skb)) && skb_shinfo(skb)->nr_frags) { > + ret =3D -EFAULT; > + goto error; > + } > + > /* Make offset relative to start of frags */ > offset -=3D skb_headlen(skb); [Severity: Medium] Does this check run too late in __skb_send_sock(), after the linear head has already been sent and -EFAULT is masked? When the requested range spans linear head data and unreadable fragments (or an unreadable frag_list member), the preceding loop sends the head and decrements len. At error:, orig_len !=3D len, so __skb_send_sock() masks -EFAULT and returns the positive partial byte count instead. Looping callers such as espintcp_sendskb_locked() then put a partial linear prefix on the wire before seeing -EFAULT on the next call. Checking whether the requested range reaches any unreadable fragments before sending linear bytes would avoid partial transmission. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/cover.1796329894.gi= t.tavip@google.com?part=3D4