drivers/s390/char/keyboard.c NULL pointer reference
From: sohu0106
Date: Thu Aug 03 2017 - 09:58:00 EST
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