[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170804092608.GB3278@osiris>
Date: Fri, 4 Aug 2017 11:26:08 +0200
From: Heiko Carstens <heiko.carstens@...ibm.com>
To: sohu0106 <sohu0106@....com>
Cc: schwidefsky@...ibm.com, linux-s390@...r.kernel.org,
torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: drivers/s390/char/keyboard.c NULL pointer reference
On Thu, Aug 03, 2017 at 09:57:38PM +0800, sohu0106 wrote:
>
>
> 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;
This doesn't make sense as well. All uaccess functions are able to handle
NULL pointers within user space.
Powered by blists - more mailing lists