tuntap: add sanity checks about msg_controllen in sendmsg
stable inclusion from stable-v5.10.111 commit 647b35aaf454271d68067d4bf05154095fe63f93 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5GL1Z Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=647b35aaf454271d68067d4bf05154095fe63f93 -------------------------------- [ Upstream commit 74a335a0 ] In patch [1], tun_msg_ctl was added to allow pass batched xdp buffers to tun_sendmsg. Although we donot use msg_controllen in this path, we should check msg_controllen to make sure the caller pass a valid msg_ctl. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fe8dd45bb7556246c6b76277b1ba4296c91c2505Reported-by: NEric Dumazet <eric.dumazet@gmail.com> Suggested-by: NJason Wang <jasowang@redhat.com> Signed-off-by: NHarold Huang <baymaxhuang@gmail.com> Acked-by: NJason Wang <jasowang@redhat.com> Link: https://lore.kernel.org/r/20220303022441.383865-1-baymaxhuang@gmail.comSigned-off-by: NJakub Kicinski <kuba@kernel.org> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com> Reviewed-by: NWei Li <liwei391@huawei.com>
Showing
想要评论请 注册 或 登录