]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: sched: act_connmark: initialize struct tc_ife to fix kernel leak
authorRanganath V N <vnranganath.20@gmail.com>
Sun, 9 Nov 2025 09:13:35 +0000 (14:43 +0530)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 11 Nov 2025 14:00:08 +0000 (15:00 +0100)
commit62b656e43eaeae445a39cd8021a4f47065af4389
tree2a3c0ba9adf22e7bfb97c9939fca6b91b23eec01
parent60e6489f8e3b086bd1130ad4450a2c112e863791
net: sched: act_connmark: initialize struct tc_ife to fix kernel leak

In tcf_connmark_dump(), the variable 'opt' was partially initialized using a
designatied initializer. While the padding bytes are reamined
uninitialized. nla_put() copies the entire structure into a
netlink message, these uninitialized bytes leaked to userspace.

Initialize the structure with memset before assigning its fields
to ensure all members and padding are cleared prior to beign copied.

Reported-by: syzbot+0c85cae3350b7d486aee@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=0c85cae3350b7d486aee
Tested-by: syzbot+0c85cae3350b7d486aee@syzkaller.appspotmail.com
Fixes: 22a5dc0e5e3e ("net: sched: Introduce connmark action")
Signed-off-by: Ranganath V N <vnranganath.20@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20251109091336.9277-2-vnranganath.20@gmail.com
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/sched/act_connmark.c