lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150914044531.GA27880@kroah.com>
Date:	Sun, 13 Sep 2015 21:45:31 -0700
From:	Greg KH <gregkh@...uxfoundation.org>
To:	Chandra Gorentla <csgorentla@...il.com>
Cc:	johnny.kim@...el.com, glen.lee@...el.com, rachel.kim@...el.com,
	dean.lee@...el.com, chris.park@...el.com, dan.carpenter@...cle.com,
	inux-wireless@...r.kernel.org, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: Re: drivers: staging: wilc1000 - NULL pointer dereference

On Sun, Sep 13, 2015 at 06:17:26PM +0530, Chandra Gorentla wrote:
> Hi,
> 
> At this point I do not have the hardware.
> 
> NULL pointer deference is observed in the wilc1000.ko module on x86 target
> with bus type SPI and when SPI is not ready.  Following are the steps to
> reproduce.
> 
> $ sudo insmod drivers/staging/wilc1000/wilc1000.ko
> $ sudo ifconfig wlan1 up
> 
> wlan1 in the above command is the device controlled by 'wilc1000.ko'.
> 
> Though the target I tested is not built to support WILC1000, my test
> scenario can be treated as a case where in SPI is not working or WILC1000
> is not connected to the supported hardware.
> 
> I think I know a fix (pasted below) to this but cannot test it because hardware
> is not available to test positive cases.
> 
> Thanks,
> chandra
> 
> gcs@...-HP-Compaq-nx6320:~/linux/staging$ git diff
> diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
> index 63f44f8..48f063d 100644
> --- a/drivers/staging/wilc1000/linux_wlan.c
> +++ b/drivers/staging/wilc1000/linux_wlan.c
> @@ -1634,6 +1634,12 @@ int mac_open(struct net_device *ndev)
> 	int i = 0;
> 	struct WILC_WFI_priv *priv;
>  
> +#ifdef WILC_SPI
> +	if (!g_linux_wlan || !g_linux_wlan->wilc_spidev) {
> +		netdev_err(ndev, "wilc1000: SPI device not ready\n");
> +		return -ENODEV;
> +	}
> +#endif
> 	nic = netdev_priv(ndev);
> 	priv = wiphy_priv(nic->wilc_netdev->ieee80211_ptr->wiphy);
> 	PRINT_D(INIT_DBG, "MAC OPEN[%p]\n", ndev);
> gcs@...-HP-Compaq-nx6320:~/linux/staging$ 
> 

Can you resend this in a format that I can apply it?

thanks,

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ