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  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]
Date:	Sat, 13 Sep 2008 15:56:07 -0400
From:	Jeff Garzik <jeff@...zik.org>
To:	Krzysztof Halasa <khc@...waw.pl>
CC:	Adrian Bunk <bunk@...nel.org>, netdev@...r.kernel.org
Subject: Re: wan/hdlc_x25.c: fix a NULL dereference

Krzysztof Halasa wrote:
> WAN: fixes a NULL dereference in hdlc_x25.
> 
> Reported-by: Adrian Bunk <bunk@...nel.org>.
> Signed-off-by: Krzysztof Halasa <khc@...waw.pl>
> 
> diff --git a/drivers/net/wan/hdlc_x25.c b/drivers/net/wan/hdlc_x25.c
> index 8b7e5d2..cbcbf6f 100644
> --- a/drivers/net/wan/hdlc_x25.c
> +++ b/drivers/net/wan/hdlc_x25.c
> @@ -163,15 +163,17 @@ static void x25_close(struct net_device *dev)
>  
>  static int x25_rx(struct sk_buff *skb)
>  {
> +	struct net_device *dev = skb->dev;
> +
>  	if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) {
> -		skb->dev->stats.rx_dropped++;
> +		dev->stats.rx_dropped++;
>  		return NET_RX_DROP;
>  	}
>  
> -	if (lapb_data_received(skb->dev, skb) == LAPB_OK)
> +	if (lapb_data_received(dev, skb) == LAPB_OK)
>  		return NET_RX_SUCCESS;
>  
> -	skb->dev->stats.rx_errors++;
> +	dev->stats.rx_errors++;
>  	dev_kfree_skb_any(skb);
>  	return NET_RX_DROP;

applied


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists