linux-stable/drivers/isdn
Dan Carpenter dca534e301 mISDN: make sure device name is NUL terminated
[ Upstream commit ccfb62f27b ]

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>
2019-06-22 08:16:16 +02:00
..
capi isdn: fix kernel-infoleak in capi_unlocked_ioctl 2019-01-09 17:14:43 +01:00
divert isdn: divert: fix sprintf buffer overflow warning 2017-07-14 09:03:11 -07:00
gigaset License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hardware mISDN: hfcpci: Test both vendor & device ID for Digium HFC4S 2019-04-03 06:25:08 +02:00
hisax isdn: hisax: hfc_pci: Fix a possible concurrency use-after-free bug in HFCPCI_l1hw() 2019-02-12 19:46:09 +01:00
hysdn hysdn: fix to a race condition in put_log_buffer 2017-08-07 11:25:14 -07:00
i4l isdn: i4l: isdn_tty: Fix some concurrency double-free bugs 2019-02-27 10:08:04 +01:00
isdnloop isdn: isdnloop: fix logic error in isdnloop_sendbuf 2017-09-07 20:03:54 -07:00
mISDN mISDN: make sure device name is NUL terminated 2019-06-22 08:16:16 +02:00
Kconfig
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00