USB: gadget: zero allocate endpoint 0 buffers
stable inclusion from stable-v5.10.85 commit e4de8ca013f06ad4a0bf40420a291c23990e4131 bugzilla: 186032 https://gitee.com/openeuler/kernel/issues/I4QVI4 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e4de8ca013f06ad4a0bf40420a291c23990e4131 -------------------------------- commit 86ebbc11 upstream. Under some conditions, USB gadget devices can show allocated buffer contents to a host. Fix this up by zero-allocating them so that any extra data will all just be zeros. Reported-by: NSzymon Heidrich <szymon.heidrich@gmail.com> Tested-by: NSzymon Heidrich <szymon.heidrich@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录