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] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0707241557160.6699@bender.nucleusys.com>
Date:	Tue, 24 Jul 2007 15:57:28 +0300 (EEST)
From:	Petko Manolov <petkan@...leusys.com>
To:	Micah Gruber <micah.gruber@...il.com>
cc:	petkan@...rs.sourceforge.net, linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org, jgarzik@...ox.com
Subject: Re: [PATCH] [2.6.22] Fix a potential NULL pointer dereference in
 write_bulk_callback() in drivers/net/usb/pegasus.c

ACK :-)


cheers,
Petko


On Mon, 23 Jul 2007, Micah Gruber wrote:

> This patch fixes a potential null dereference bug where we dereference 
> pegasus before a null check. This patch simply moves the dereferencing after 
> the null check.
>
> Signed-off-by: Micah Gruber <micah.gruber@...il.com>
>
> ---
>
> --- a/drivers/net/usb/pegasus.c
> +++ b/drivers/net/usb/pegasus.c
> @@ -768,11 +768,13 @@
> static void write_bulk_callback(struct urb *urb)
> {
>       pegasus_t *pegasus = urb->context;
> -       struct net_device *net = pegasus->net;
> +       struct net_device *net;
>
>       if (!pegasus)
>               return;
>
> +       net = pegasus->net;
> +
>       if (!netif_device_present(net) || !netif_running(net))
>               return;
>
-
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