kernel_optimize_test/include/net
Eric Dumazet 25888e3031 af_unix: limit recursion level
Its easy to eat all kernel memory and trigger NMI watchdog, using an
exploit program that queues unix sockets on top of others.

lkml ref : http://lkml.org/lkml/2010/11/25/8

This mechanism is used in applications, one choice we have is to have a
recursion limit.

Other limits might be needed as well (if we queue other types of files),
since the passfd mechanism is currently limited by socket receive queue
sizes only.

Add a recursion_level to unix socket, allowing up to 4 levels.

Each time we send an unix socket through sendfd mechanism, we copy its
recursion level (plus one) to receiver. This recursion level is cleared
when socket receive queue is emptied.

Reported-by: Марк Коренберг <socketpair@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-11-29 09:45:15 -08:00
..
9p 9p: Add datasync to client side TFSYNC/RFSYNC for dotl 2010-10-28 09:08:49 -05:00
bluetooth
caif caif: SPI-driver bugfix - incorrect padding. 2010-11-03 18:50:03 -07:00
irda
iucv
netfilter
netns
phonet
sctp
tc_act
tipc
act_api.h
addrconf.h
af_ieee802154.h
af_rxrpc.h
af_unix.h af_unix: limit recursion level 2010-11-29 09:45:15 -08:00
ah.h
arp.h
atmclip.h
ax25.h
ax88796.h
cfg80211.h cfg80211: fix WIPHY_FLAG_IBSS_RSN bit 2010-11-15 15:00:42 -05:00
checksum.h
cipso_ipv4.h
cls_cgroup.h
compat.h
datalink.h
dcbnl.h
dn_dev.h
dn_fib.h
dn_neigh.h
dn_nsp.h
dn_route.h
dn.h net: avoid limits overflow 2010-11-10 12:12:00 -08:00
dsa.h
dsfield.h
dst_ops.h b43legacy: Fix compile on ARM architecture 2010-11-15 15:00:42 -05:00
dst.h ipv4: add __rcu annotations to routes.c 2010-10-27 11:37:31 -07:00
esp.h
ethoc.h
fib_rules.h fib_rules: __rcu annotates ctarget 2010-10-27 11:37:32 -07:00
flow.h
garp.h
gen_stats.h
genetlink.h
gre.h
icmp.h
ieee80211_radiotap.h
ieee802154_netdev.h
ieee802154.h
if_inet6.h
inet_common.h
inet_connection_sock.h
inet_ecn.h
inet_frag.h
inet_hashtables.h
inet_sock.h
inet_timewait_sock.h
inet6_connection_sock.h
inet6_hashtables.h
inetpeer.h inetpeer: __rcu annotations 2010-10-27 11:37:33 -07:00
ip_fib.h fib: Fix fib zone and its hash leak on namespace stop 2010-10-28 10:27:03 -07:00
ip_vs.h
ip.h ipv4: add __rcu annotations to ip_ra_chain 2010-10-25 14:18:28 -07:00
ip6_checksum.h
ip6_fib.h
ip6_route.h
ip6_tunnel.h tunnels: add _rcu annotations 2010-10-25 13:09:45 -07:00
ipcomp.h
ipconfig.h
ipip.h tunnels: add __rcu annotations 2010-10-27 11:37:32 -07:00
ipv6.h
ipx.h
iw_handler.h
lapb.h
lib80211.h
llc_c_ac.h
llc_c_ev.h
llc_c_st.h
llc_conn.h
llc_if.h
llc_pdu.h
llc_s_ac.h
llc_s_ev.h
llc_s_st.h
llc_sap.h
llc.h
mac80211.h
mip6.h
mld.h
ndisc.h
neighbour.h net: Fix duplicate volatile warning. 2010-11-18 09:40:04 -08:00
net_namespace.h net_ns: add __rcu annotations 2010-10-25 14:18:27 -07:00
netdma.h
netevent.h
netlabel.h
netlink.h netlink: Make nlmsg_find_attr take a const nlmsghdr*. 2010-11-04 12:26:34 -07:00
netrom.h
nexthop.h
nl802154.h
p8022.h
pkt_cls.h
pkt_sched.h
protocol.h net: add __rcu annotations to protocol 2010-10-27 11:37:31 -07:00
psnap.h
raw.h
rawv6.h
red.h
regulatory.h
request_sock.h
rose.h
route.h
rtnetlink.h
sch_generic.h
scm.h
slhc_vj.h
snmp.h
sock.h net: avoid limits overflow 2010-11-10 12:12:00 -08:00
stp.h
tcp_states.h
tcp.h net: avoid limits overflow 2010-11-10 12:12:00 -08:00
timewait_sock.h
transp_v6.h
udp.h net: avoid limits overflow 2010-11-10 12:12:00 -08:00
udplite.h
wext.h
wimax.h
wpan-phy.h
x25.h
x25device.h
xfrm.h tunnels: add __rcu annotations 2010-10-27 11:37:32 -07:00