linux/net/core
David S. Miller 69cc64d8d9 [NDISC]: Fix race in generic address resolution
Frank Blaschka provided the bug report and the initial suggested fix
for this bug.  He also validated this version of this fix.

The problem is that the access to neigh->arp_queue is inconsistent, we
grab references when dropping the lock lock to call
neigh->ops->solicit() but this does not prevent other threads of
control from trying to send out that packet at the same time causing
corruptions because both code paths believe they have exclusive access
to the skb.

The best option seems to be to hold the write lock on neigh->lock
during the ->solicit() call.  I looked at all of the ndisc_ops
implementations and this seems workable.  The only case that needs
special care is the IPV4 ARP implementation of arp_solicit().  It
wants to take neigh->lock as a reader to protect the header entry in
neigh->ha during the emission of the soliciation.  We can simply
remove the read lock calls to take care of that since holding the lock
as a writer at the caller providers a superset of the protection
afforded by the existing read locking.

The rest of the ->solicit() implementations don't care whether the
neigh is locked or not.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-12 17:54:17 -08:00
..
Makefile
datagram.c
dev.c [AUDIT] Add uid, gid fields to ANOM_PROMISCUOUS message 2008-02-01 14:25:10 -05:00
dev_mcast.c [VLAN]: set_rx_mode support for unicast address list 2008-01-31 19:28:24 -08:00
dst.c [NETNS][DST] dst: pass the dst_ops as parameter to the gc functions 2008-01-28 15:02:46 -08:00
ethtool.c
fib_rules.c [NETNS]: Process FIB rule action in the context of the namespace. 2008-01-28 15:08:14 -08:00
filter.c
flow.c [IPSEC] flow: reorder "struct flow_cache_entry" and remove SLAB_HWCACHE_ALIGN 2008-02-07 23:30:42 -08:00
gen_estimator.c [NET_SCHED]: Convert packet schedulers from rtnetlink to new netlink API 2008-01-28 15:11:10 -08:00
gen_stats.c [NET_SCHED]: Convert packet schedulers from rtnetlink to new netlink API 2008-01-28 15:11:10 -08:00
iovec.c
kmap_skb.h
link_watch.c
neighbour.c [NDISC]: Fix race in generic address resolution 2008-02-12 17:54:17 -08:00
net-sysfs.c
net-sysfs.h
net_namespace.c typo fixes in net/core/net_namespace.c 2008-02-03 17:56:48 +02:00
netevent.c
netpoll.c
pktgen.c [PKTGEN]: pktgen should not print info that it is spinning 2008-01-31 19:28:26 -08:00
request_sock.c
rtnetlink.c [NET] rtnetlink.c: remove no longer used functions 2008-02-05 03:17:22 -08:00
scm.c
skbuff.c virtio: Implement skb_partial_csum_set, for setting partial csums on untrusted packets. 2008-02-04 23:49:56 +11:00
sock.c [NET]: Introducing socket mark socket option. 2008-01-31 19:27:19 -08:00
stream.c
sysctl_net_core.c
user_dma.c
utils.c [NET] core/utils.c: digit2bin is dead static inline 2008-01-28 15:01:58 -08:00