Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net_sched: sch_mqprio: dont leak kernel memory

mqprio_dump() should make sure all fields of struct tc_mqprio_qopt are
initialized.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Eric Dumazet and committed by
David S. Miller
144ce879 682a1694

+1 -1
+1 -1
net/sched/sch_mqprio.c
··· 215 215 struct net_device *dev = qdisc_dev(sch); 216 216 struct mqprio_sched *priv = qdisc_priv(sch); 217 217 unsigned char *b = skb_tail_pointer(skb); 218 - struct tc_mqprio_qopt opt; 218 + struct tc_mqprio_qopt opt = { 0 }; 219 219 struct Qdisc *qdisc; 220 220 unsigned int i; 221 221