From nobody Mon Feb 9 11:47:58 2026 Received: from mail-07.mail-europe.com (mail-0701.mail-europe.com [51.83.17.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D5F34779B5 for ; Wed, 21 Jan 2026 13:20:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=51.83.17.38 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769001650; cv=none; b=UoG8B101XTnjb8tX2/2kBnCw8TVO/JGx2J0oK2pfUkIc/UA5vBddRPx1sUwCh1AYp24ETf9MHM3II22omuNI//MDmWoVN6VEXTte+YgcdYAiWlvtDLnMDGoojXsPZVrum4IY30QCGcfrDsNEoOWy2wLqXwsfb5OcMJYWdxobm4U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769001650; c=relaxed/simple; bh=yd2NOl8qR9vazUYyuNp5iURVq8i3q+QR3gXcTq1q5bM=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=HHTueMw0q2/iEk+xSbvP0Qqci/p5ntbB0PwOn8H09ZmCKlwVnTfys5GWOFyj4j4XWT4GGhf2ZMSBfrfe9oZbu41GrMVyS+RAxKvrRFPJFIp7t1fvA9ishH/dPqm4Aksn0Fp4DYkbmHMcpXqxuXAhAQM+fRfex85dMhCWmXo8i1c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=1g4.org; spf=fail smtp.mailfrom=1g4.org; dkim=pass (2048-bit key) header.d=1g4.org header.i=@1g4.org header.b=FinjMozh; arc=none smtp.client-ip=51.83.17.38 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=1g4.org Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=1g4.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=1g4.org header.i=@1g4.org header.b="FinjMozh" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1g4.org; s=protonmail2; t=1769001638; x=1769260838; bh=uR0vWLX68z8KOTADUQfKb6VvihqOcenbH5spIdlB5Z4=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=FinjMozh5Z5R9rPjNI107142E9H/ovUjDxoovDjwCOOJrkK2gsjBnZ38IzCwG6ymA C031a+Sl/TKWnCq2ifB3EhSLmXj7NfNRYzR7YzUCGgpGbptpSc4xs6CXcuEBePyedx jQf4FAl1hh/sKqD6sl5J6KAOmbyXOS/DB6csf47/jY91YHNmye0G5VJRBGBeUD9Tjh hJXkTkBRWxB5fZAdWFHl5fxrO6vqKDn1P6TMN9Devwg+0Iwi/mFs3o86ha3IOSw9Rp Z7jvyo7cVlea2PPQSXAJ9lKSzzMxxRH/HHexB3gywu8SgsDa5BI5JEo3SlaL1kXxsb /E5ONiWnWAgIA== Date: Wed, 21 Jan 2026 13:20:35 +0000 To: netdev@vger.kernel.org From: Paul Moses Cc: Jamal Hadi Salim , Cong Wang , Jiri Pirko , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , linux-kernel@vger.kernel.org, Paul Moses , stable@vger.kernel.org Subject: [PATCH net v3 1/7] net/sched: act_gate: zero-initialize netlink dump struct Message-ID: <20260121131954.2710459-2-p@1g4.org> In-Reply-To: <20260121131954.2710459-1-p@1g4.org> References: <20260121131954.2710459-1-p@1g4.org> Feedback-ID: 8253658:user:proton X-Pm-Message-ID: 2edab436c14d019c28ffa4bb4b211b0ade442e2d Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Zero-initialize the dump struct before selective assignment to avoid leaking stack padding in netlink replies. This matches other actions (e.g. act_connmark) that zero-init their dump structs. Fixes: a51c328df310 ("net: qos: introduce a gate control flow action") Cc: stable@vger.kernel.org Signed-off-by: Paul Moses --- net/sched/act_gate.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/net/sched/act_gate.c b/net/sched/act_gate.c index c1f75f2727576..aacd57e5f4374 100644 --- a/net/sched/act_gate.c +++ b/net/sched/act_gate.c @@ -499,16 +499,16 @@ static int tcf_gate_dump(struct sk_buff *skb, struct = tc_action *a, { unsigned char *b =3D skb_tail_pointer(skb); struct tcf_gate *gact =3D to_gate(a); - struct tc_gate opt =3D { - .index =3D gact->tcf_index, - .refcnt =3D refcount_read(&gact->tcf_refcnt) - ref, - .bindcnt =3D atomic_read(&gact->tcf_bindcnt) - bind, - }; + struct tc_gate opt =3D { }; struct tcfg_gate_entry *entry; struct tcf_gate_params *p; struct nlattr *entry_list; struct tcf_t t; =20 + opt.index =3D gact->tcf_index; + opt.refcnt =3D refcount_read(&gact->tcf_refcnt) - ref; + opt.bindcnt =3D atomic_read(&gact->tcf_bindcnt) - bind; + spin_lock_bh(&gact->tcf_lock); opt.action =3D gact->tcf_action; =20 --=20 2.52.GIT