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

Configure Feed

Select the types of activity you want to include in your feed.

net: sched: cls_api: fix tc_chain_fill_node to initialize tcm_info to zero to prevent an info-leak

When building netlink messages, tc_chain_fill_node() never initializes
the tcm_info field of struct tcmsg. Since the allocation is not zeroed,
kernel heap memory is leaked to userspace through this 4-byte field.

The fix simply zeroes tcm_info alongside the other fields that are
already initialized.

Fixes: 32a4f5ecd738 ("net: sched: introduce chain object to uapi")
Signed-off-by: Yochai Eisenrich <echelonh@gmail.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Link: https://patch.msgid.link/20260328211436.1010152-1-echelonh@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Yochai Eisenrich and committed by
Jakub Kicinski
e6e3eb5e ddc748a3

+1
+1
net/sched/cls_api.c
··· 2969 2969 tcm->tcm__pad1 = 0; 2970 2970 tcm->tcm__pad2 = 0; 2971 2971 tcm->tcm_handle = 0; 2972 + tcm->tcm_info = 0; 2972 2973 if (block->q) { 2973 2974 tcm->tcm_ifindex = qdisc_dev(block->q)->ifindex; 2974 2975 tcm->tcm_parent = block->q->handle;