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=1796389162; b=MQxk029i4+b46p3mOtpAu5npxz/N+fevFIHNvEiFayQHbpphbz1HH8Eg4C5etE/OFQ54 Ghfx5/gVJlZZnb/QX+zdQ+YGxJkfU+a5ihTAgYeiRbrnt9+45EPfKz4lw49UpXSMyIwiM SV70nImONhW8TmJB45U9hN6dszF8pN5xdxRLkqJN7J+KTwgLg7BNbuWDZo1zzNNu262wY NcS/tjl/XGcT8SEUBONbH4ScZPsolC+c1NcFezqJ1OVz6UB+l0zPVE/XLKScsUIdAP0JX lmPDqomzIB/0zKhZUN15PoEtXEnI/atPRz2vtkzZP7j10AWigAxw7DCbivgQY7dpeWA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796389162; 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=jVSxLNTSvGnlFC4fAewon2HC7MW4/GPrr3OF+XUyDww=; b=BGuGyOJoNJNZhClzmLGLr09+wH7BfcX+mbzqkAF1/ocJoREDeZJaHLfz2YNyBZXnII0W xkUSwdJ4r5OvgDAQaTuwGLVy+eASHBZSZIVtF7w/dx2Fa2xKD1QQXOM9MNQsyqdz4owBM S/HRdC7rVUiFMrVBQcWM4Cai6VKoRULXM7wfvOq5hOoPbndsaFuseBhqyyFwYuiwz66P9 4RBpkDVYYjdFE6+wDJ6A7LEsJWtcbSuJxCseq9Xw9hN8fms4wiSSKPoPpXYCTO1b4JOzZ 3K5XxRTKKA+/ISa+0ZugRS7EQUKjW0CuMiO0P4gmS7ghABlH4R/3aF7HdEsIKGsB4Vw== 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=YvbNYszo; 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 06F79606A322; Fri, 4 Dec 2026 12:59:21 +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=YvbNYszo Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50D6D1F00931; Fri, 4 Dec 2026 12:59:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796389161; bh=jVSxLNTSvGnlFC4fAewon2HC7MW4/GPrr3OF+XUyDww=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=YvbNYszoZ9WZnM5C8/7Urt8AMhtXzQEPCavOX+EStIYhN04UXdaejny35XKZXd1rA CH80dg1rmd9iWUY7u2MIqR1wEU/8Zbv4fTOsQfso0CKAv2rVWOIOj6FAmnEAp6oI7G Mls6CwfQcKgAH7R0uoCTacWjLca3zkg8/ITNLjKU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alexei Starovoitov , Sasha Levin Subject: [PATCH 6.1 0885/1059] bpf: Clear the data that bpf_msg_push_data() adds Date: Fri, 4 Dec 2026 19:06:56 +0900 Message-ID: <20261204100706.937798251@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-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 e4d5ad0512f34..b176ab515d737 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -2825,7 +2825,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