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]
Date:	Tue, 06 Mar 2012 16:35:49 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	abi.dmitryt@...il.com
Cc:	netdev@...r.kernel.org, sjurbren@...il.com
Subject: Re: [PATCH] caif: Fix for a race in socket transmit with flow
 control.

From: Dmitry Tarnyagin <abi.dmitryt@...il.com>
Date: Sun,  4 Mar 2012 19:39:18 +0100

> @@ -224,8 +224,12 @@ noxoff:
>  	rcu_read_unlock_bh();
>  
>  	err = dev_queue_xmit(skb);
> -	if (err > 0)
> -		err = -EIO;
> +	if (unlikely(err > 0)) {
> +		if (err == NET_XMIT_DROP)
> +			err = -EAGAIN;
> +		else
> +			err = -EIO;
> +	}
>  
>  	return err;
>  }

If there is a packet scheduler classifier rule saying to drop all
packets that match a certain criteria, this will always return -EAGAIN
for certain SKBs.

> +		ret = transmit_skb(skb, cf_sk, noblock, timeo);
> +	} while (ret == -EAGAIN);

And therefore this will loop forever.

I think this is just a bad way to handle it, drops are drops and they
can happen anywhere not just the place that signals things like
NET_XMIT_DROP.

Just simply ignore positive return values from dev_queue_xmit() and
traslate them into zero.  Then you need to make no other changes at
all.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ