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=1796380492; b=JiIaxoP1KkTvq4gCBdYr4xvlGUB4TlBOqB6SxOQ/WOq8LF+dERwR7WrchqWXqBCaCwt5 XoWu9OQDSTvHpyZeHvB/UzkU01s6JHn1zAw/9VTep2GCr+7tTvBRBoWVTMcQ6PndI/EKV A6M5HBfDvfveNqo5Gx+P6480A3+pTNdfikJVmVon0ti9aRsG1IlmGW+V5fSNxeDSu4g3w 6wN3oYlvT7Wz/k3gExmWu+eyHpGeXxs5kdTSAusdZJJJEUn6SPl6pwtxMRjyAdhepTKHf Z7M3iziWwYvD6OySvl0nGuNAoDKCjSV4r0aGTBZxiDdbzzq9LjGDBm4NDJKmhihcY1A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796380492; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=59bsfYyvlUs/ZT1GncZ3cShRp4IslqyOQA2pUtKtcSo=; b=lqJWS8lW3XVj//8s5W04PSTjKJpUbOQv1KDhKrOeHbWJmoW1ha1hXtuNjOIybaqDMpFp jBmE10BaxuDa+TinmdPl6lmQzsaqWIs8zqQQ/wv27WgmySO+XKCLjpSjLdckATZ2FPjtV viClvls7dME5NNSKEi/L7cswbW93fsZJxgt3/72S7kFFryFC8YG2J6iT4nEqPd+IAs5aT mJPcS4Z/uqPIF4wTnmZ1QPEY2PqEiLCQmqUewtEdCqUTgSizFu5XxUngPLKnyD2+Q4H4N yC4iZ1DiSaru/p78eDpVzs24SC8d07OaS8OKLjQ+vzFAqeuIS0G3aZg76yQu046m6+A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=rUwNzbxw; 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 A61A8606A689; Fri, 4 Dec 2026 10:34:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=rUwNzbxw Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2009D1F00931; Fri, 4 Dec 2026 10:34:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796380492; bh=59bsfYyvlUs/ZT1GncZ3cShRp4IslqyOQA2pUtKtcSo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=rUwNzbxwVKdFvzvKGirzIQ0EWMgDkSd6Xhcd/g4FKbkyQp8utYkEJdTo1g5HLJW89 b4f+g68Y7DMpbFZvrIIfkgPa5SThsP/TnfVgGX/V7Yiu+c0BLSA8kI4hXt0gcIYF5n ijD73arQT2tdfAk/WbBw22oKixhsUi22T2CojTVs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alexei Starovoitov , Sasha Levin Subject: [PATCH 7.3 296/742] bpf: Clear the data that bpf_msg_push_data() adds Date: Fri, 4 Dec 2026 19:02:40 +0900 Message-ID: <20261204100642.902921903@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100635.034361255@linuxfoundation.org> References: <20261204100635.034361255@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alexei Starovoitov [ Upstream commit 401fce9f48b1d684b92dbc08389d7c20bd036280 ] The helper puts a new page into the message as the allocator gave it. Bytes that the program does not write can be read by it, and are sent to the peer. Allocate zeroed memory. Fixes: 6fff607e2f14 ("bpf: sk_msg program helper bpf_msg_push_data") Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261125032938.670542-39-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin --- net/core/filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/filter.c b/net/core/filter.c index 53ca1457fd331..96a3a208b575b 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -2912,7 +2912,7 @@ BPF_CALL_4(bpf_msg_push_data, struct sk_msg *, msg, u32, start, if (unlikely(copy + len < copy)) return -EINVAL; - page = alloc_pages(__GFP_NOWARN | GFP_ATOMIC | __GFP_COMP, + page = alloc_pages(__GFP_NOWARN | GFP_ATOMIC | __GFP_COMP | __GFP_ZERO, get_order(copy + len)); if (unlikely(!page)) return -ENOMEM; -- 2.53.0