From: sohu0106 <sohu0106@126.com>
To: schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com
Cc: linux-s390@vger.kernel.org, torvalds@linux-foundation.org,
linux-kernel@vger.kernel.org
Subject: drivers/s390/char/keyboard.c NULL pointer reference
Date: Thu, 3 Aug 2017 21:57:38 +0800 (CST) [thread overview]
Message-ID: <3b10f99f.aa01.15da8632dec.Coremail.sohu0106@126.com> (raw)
Local users able to send the NULL arg argument to kbd_ioctl(), which could cause kernel crash
diff --git a/keyboard.c
b/keyboard.c
index ba0e4f9..3ec16b1 100644
--- a/keyboard.c
+++ b/keyboard.c
@@ -456,6 +456,8 @@ int kbd_ioctl(struct kbd_data *kbd, unsigned int cmd, unsigned long arg)
int perm;
argp = (void __user *)arg;
+ if( !argp )
+ return -EFAULT;
/*
* To have permissions to do most of the vt ioctls, we either have
https://bugzilla.kernel.org/show_bug.cgi?id=196575
next reply other threads:[~2017-08-03 13:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-03 13:57 sohu0106 [this message]
2017-08-04 9:26 ` Heiko Carstens
2017-08-05 1:44 ` sohu0106
2017-08-05 7:50 ` Heiko Carstens
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3b10f99f.aa01.15da8632dec.Coremail.sohu0106@126.com \
--to=sohu0106@126.com \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=schwidefsky@de.ibm.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome