diff options
author | Annie Cherkaev <annie.cherk@gmail.com> | 2017-07-15 15:08:58 -0600 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-08-02 20:43:36 -0700 |
commit | 9f5af546e6acc30f075828cb58c7f09665033967 (patch) | |
tree | 34c3f3dc904c33796a1ea992a125caf876d049f9 /drivers/isdn/i4l/isdn_common.c | |
parent | 4d3f5d04d69e9479a3df88ceb0e2cd8188a49366 (diff) | |
download | linux-next-9f5af546e6acc30f075828cb58c7f09665033967.tar.gz |
isdn/i4l: fix buffer overflow
This fixes a potential buffer overflow in isdn_net.c caused by an
unbounded strcpy.
[ ISDN seems to be effectively unmaintained, and the I4L driver in
particular is long deprecated, but in case somebody uses this..
- Linus ]
Signed-off-by: Jiten Thakkar <jitenmt@gmail.com>
Signed-off-by: Annie Cherkaev <annie.cherk@gmail.com>
Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: Kees Cook <keescook@chromium.org>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/isdn/i4l/isdn_common.c')
-rw-r--r-- | drivers/isdn/i4l/isdn_common.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c index 89b09c51ab7c..38a5bb764c7b 100644 --- a/drivers/isdn/i4l/isdn_common.c +++ b/drivers/isdn/i4l/isdn_common.c @@ -1376,6 +1376,7 @@ isdn_ioctl(struct file *file, uint cmd, ulong arg) if (arg) { if (copy_from_user(bname, argp, sizeof(bname) - 1)) return -EFAULT; + bname[sizeof(bname)-1] = 0; } else return -EINVAL; ret = mutex_lock_interruptible(&dev->mtx); |