usb: mtu3: fix memory corruption in mtu3_debugfs_regset()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 3 Dec 2020 08:41:13 +0000 (11:41 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Dec 2020 15:02:38 +0000 (16:02 +0100)
commit4cfc27cb56208be233915bb524198a5f1da4679a
tree4dae8095592da4bc5cec63eb73c74bc9f1587056
parente8d7daf69edb6a7b0367313098bc554a3b686c1e
usb: mtu3: fix memory corruption in mtu3_debugfs_regset()

commit 3f6f6343a29d9ea7429306b83b18e66dc1331d5c upstream.

This code is using the wrong sizeof() so it does not allocate enough
memory.  It allocates 32 bytes but 72 are required.  That will lead to
memory corruption.

Fixes: ae07809255d3 ("usb: mtu3: add debugfs interface files")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/X8ikqc4Mo2/0G72j@mwanda
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/mtu3/mtu3_debugfs.c