lkml.org 
[lkml]   [2006]   [Mar]   [16]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 16 Mar 2006 11:24:13 +0300
FromAlexey Dobriyan <>
SubjectRe: [PATCH] Hamradio: Fix a NULL pointer dereference in net/hamradio/mkiss.c
On Thu, Mar 16, 2006 at 03:07:37PM +0800, Eugene Teo wrote:
> Pointer ax is dereferenced before NULL check.
>
> Coverity bug #817

> --- linux-2.6/drivers/net/hamradio/mkiss.c
> +++ linux-2.6/drivers/net/hamradio/mkiss.c
> @@ -845,13 +845,15 @@ static int mkiss_ioctl(struct tty_struct
>  	unsigned int cmd, unsigned long arg)
>  {
>  	struct mkiss *ax = mkiss_get(tty);
> -	struct net_device *dev = ax->dev;
> +	struct net_device *dev;
>  	unsigned int tmp, err;
>
>  	/* First make sure we're connected. */
>  	if (ax == NULL)
>  		return -ENXIO;
>
> +	dev = ax->dev;
> +

Actual codepath, please... valid "ax" is plonked into ->disc_data in
mkiss_open().

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-16 08:26    [from the cache]
©2003-2008