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=1796383628; b=VjXNYgMM9E+sFqMKL1ELTuP6w9GtmxFrAoJQR6hlL7Wtx9jDo4BVa0aA81EaLc5m9Wye K9JiuDcbSBrbohDT4im1Z30I4YtQaGTrJQ8hHYzzgZ8Z7lSBDySTwdSGEEO/6iiVZsuIk yEXnKg+mwCQfL7b4dcxqgRsCn/nv2CJYB1MNU3qSJjBQ29n9HhKSZcPArkT/Sbd9NCrM8 gGmKM13DvicynbwHU98e8aUEVrsPCEbwYv8DJEwi05Gr5kTq/NO5j9/1JsjeRA7NOnroh Xbm7mwAg86HJm5j0VI1+08taTE1I7IPVA0d+JIo+7FQf7d20b+yOWVO/qFzQ1eddKUw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796383628; 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=X8au8GCEV1Syul8WHzHbA/KJruY7PYGOF2MQO8E62Io=; b=gokMB/sNb18GffbJU5JGtaiakAAGvQpLhkCVEWWGwvCO2m3d8wJOFWtpKwZfJjLo0khG nVKA/KcennRU8yFGnRoEjiwZO3mq6r7aOOyo9HS5Bh68+/1t+JU6tAscgegwd7yesD1nj BIAhiTDPWVUV28Rch/Trl0KjrGAbGb9U1v72kOEdgDa5kop3CMrnummZ7dnbOJ7oqyrGf BexC5P0OIWJobxMVcHkwO29Tb0me109312wuCfdoDcQpyJcZTJT1FzTM/gR8Ymgka4bKd jFHVnF+Z+FcvRuD1uDuERPTZLZf4jv/EFE1G0iJTY/byLxdw//GdMHUZUpXvV/zR8+w== 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="wJQ/QYxS"; 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 99276606A32C; Fri, 4 Dec 2026 11:27:08 +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=wJQ/QYxS Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11B9C1F000C2; Fri, 4 Dec 2026 11:27:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796383628; bh=X8au8GCEV1Syul8WHzHbA/KJruY7PYGOF2MQO8E62Io=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=wJQ/QYxSyrrCLvj6Gyh8K/f2M4HTHZLih7ytWMo1yy5qv+X17VGUsoSvkWWlHqaq9 SeuCm2tf+zC2dUmsmJfWNKhx3AKiYxwH0Ge6ID9JMY6Aw/yeHan1pAzxR/toem1Yob dWvF+sZ9fALh5YPAkqZLz6+leH7WTUxl9nisU0gk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alexei Starovoitov , Sasha Levin Subject: [PATCH 6.12 303/555] bpf: Clear the data that bpf_msg_push_data() adds Date: Fri, 4 Dec 2026 19:05:46 +0900 Message-ID: <20261204100620.918350881@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100603.988357525@linuxfoundation.org> References: <20261204100603.988357525@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 6.12-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 3d75bd7137477..659b8e64591c1 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -2875,7 +2875,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