summaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-05-22 11:45:13 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-22 08:18:25 +0200
commitf4678b7808e7783d67cc02f41f6dca3f158a9a5f (patch)
tree7005e39b06fe56219542ed4b473aff6cb50f404c /arch/x86
parente2f9c0f7345435fcff108e24372f426f601fa661 (diff)
mISDN: make sure device name is NUL terminated
[ Upstream commit ccfb62f27beb295103e9392462b20a6ed807d0ea ] The user can change the device_name with the IMSETDEVNAME ioctl, but we need to ensure that the user's name is NUL terminated. Otherwise it could result in a buffer overflow when we copy the name back to the user with IMGETDEVINFO ioctl. I also changed two strcpy() calls which handle the name to strscpy(). Hopefully, there aren't any other ways to create a too long name, but it's nice to do this as a kernel hardening measure. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/x86')
0 files changed, 0 insertions, 0 deletions