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]
Date:	Wed, 01 Oct 2014 12:05:24 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Sowmini Varadhan <sowmini.varadhan@...cle.com>
Cc:	davem@...emloft.net, raghuram.kothakota@...cle.com,
	netdev@...r.kernel.org
Subject: Re: [PATCH net-next 2/2] sunvnet: vnet_start_xmit() must hold a
 refcnt on port.

On Wed, 2014-10-01 at 14:56 -0400, Sowmini Varadhan wrote:
> A vnet_port_remove could be triggered as a result of an ldm-unbind operation
> by the peer, or a module unload, or other changes to the inter-vnet-link
> configuration.  When this is concurrent with vnet_start_xmit(),
> the following sequence could occur
> 
>   thread 1                                    thread 2
> vnet_start_xmit
>  -> tx_port_find
>     spin_lock_irqsave(&vp->lock..)
>     ret = __tx_port_find(..)
>     spin_lock_irqrestore(&vp->lock..)
>                                            vio_remove -> ..
>                                                ->vnet_port_remove
>                                            spin_lock_irqsave(&vp->lock..)
>                                            cleanup
>                                            spin_lock_irqrestore(&vp->lock..)
>                                            kfree(port)
>  /* attempt to use ret will bomb */
> 
> This patch avoids the problem by holding/releasing a refcnt on
> the vnet_port.

Hmpff... This calls for rcu protection here !


--
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