linux/net
Florian Westphal 6d0ccbac68 sctp: Prevent uninitialized memory access
valgrind reports uninizialized memory accesses when running
sctp inside the network simulation cradle simulator:

 Conditional jump or move depends on uninitialised value(s)
    at 0x570E34A: sctp_assoc_sync_pmtu (associola.c:1324)
    by 0x57427DA: sctp_packet_transmit (output.c:403)
    by 0x5710EFF: sctp_outq_flush (outqueue.c:824)
    by 0x5710B88: sctp_outq_uncork (outqueue.c:701)
    by 0x5745262: sctp_cmd_interpreter (sm_sideeffect.c:1548)
    by 0x57444B7: sctp_side_effects (sm_sideeffect.c:976)
    by 0x5744460: sctp_do_sm (sm_sideeffect.c:945)
    by 0x572157D: sctp_primitive_ASSOCIATE (primitive.c:94)
    by 0x5725C04: __sctp_connect (socket.c:1094)
    by 0x57297DC: sctp_connect (socket.c:3297)

 Conditional jump or move depends on uninitialised value(s)
    at 0x575D3A5: mod_timer (timer.c:630)
    by 0x5752B78: sctp_cmd_hb_timers_start (sm_sideeffect.c:555)
    by 0x5754133: sctp_cmd_interpreter (sm_sideeffect.c:1448)
    by 0x5753607: sctp_side_effects (sm_sideeffect.c:976)
    by 0x57535B0: sctp_do_sm (sm_sideeffect.c:945)
    by 0x571E9AE: sctp_endpoint_bh_rcv (endpointola.c:474)
    by 0x573347F: sctp_inq_push (inqueue.c:104)
    by 0x572EF93: sctp_rcv (input.c:256)
    by 0x5689623: ip_local_deliver_finish (ip_input.c:230)
    by 0x5689759: ip_local_deliver (ip_input.c:268)
    by 0x5689CAC: ip_rcv_finish (dst.h:246)

#1 is due to "if (t->pmtu_pending)".
8a4794914f "[SCTP] Flag a pmtu change request"
suggests it should be initialized to 0.

#2 is the heartbeat timer 'expires' value, which is uninizialised, but
test by mod_timer().
T3_rtx_timer seems to be affected by the same problem, so initialize it, too.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-18 23:04:39 -07:00
..
9p 9p: fix error path during early mount 2008-05-14 19:23:27 -05:00
802 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-07-18 02:39:39 -07:00
8021q Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-07-18 02:39:39 -07:00
appletalk [NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS. 2008-03-26 04:39:53 +09:00
atm atm: use const where reasonable 2008-06-17 16:20:06 -07:00
ax25 ax25: Fix std timer socket destroy handling. 2008-06-17 21:26:37 -07:00
bluetooth net: remove CVS keywords 2008-06-11 21:00:38 -07:00
bridge Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-07-18 02:39:39 -07:00
can can: add sanity checks 2008-07-05 23:38:43 -07:00
core pkt_sched: Manage qdisc list inside of root qdisc. 2008-07-18 22:50:15 -07:00
dccp mib: add net to NET_INC_STATS_BH 2008-07-16 20:31:16 -07:00
decnet sock: add net to prot->enter_memory_pressure callback 2008-07-16 20:28:10 -07:00
econet econet: Use sock_orphan() instead of open-coded (and buggy) variant. 2008-06-17 03:01:47 -07:00
ethernet [NET]: Return more appropriate error from eth_validate_addr(). 2008-04-13 22:45:40 -07:00
ieee80211 wext: Emit event stream entries correctly when compat. 2008-06-16 18:50:49 -07:00
ipv4 tcp: RTT metrics scaling 2008-07-18 23:02:15 -07:00
ipv6 proc: consolidate per-net single-release callers 2008-07-18 04:07:44 -07:00
ipx [NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS. 2008-03-26 04:39:53 +09:00
irda Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-07-18 02:39:39 -07:00
iucv Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-07-18 02:39:39 -07:00
key Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-06-13 20:52:39 -07:00
lapb
llc llc: Use sock_graft() instead of by-hand version. 2008-06-17 01:21:03 -07:00
mac80211 pkt_sched: Kill netdev_queue lock. 2008-07-17 19:21:30 -07:00
netfilter Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-07-18 02:39:39 -07:00
netlabel Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-07-18 02:39:39 -07:00
netlink Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-07-05 23:08:07 -07:00
netrom netdev: Allocate multiple queues for TX. 2008-07-17 19:21:00 -07:00
packet packet: add PACKET_RESERVE sockopt 2008-07-18 18:05:19 -07:00
rfkill rfkill: ignore errors from rfkill_toggle_radio in rfkill_add_switch 2008-07-08 14:16:03 -04:00
rose netdev: Allocate multiple queues for TX. 2008-07-17 19:21:00 -07:00
rxrpc MIB: add struct net to UDP_INC_STATS_BH 2008-07-05 21:18:48 -07:00
sched pkt_sched: Fix noqueue_qdisc initialization. 2008-07-18 23:00:11 -07:00
sctp sctp: Prevent uninitialized memory access 2008-07-18 23:04:39 -07:00
sunrpc Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-07-18 02:39:39 -07:00
tipc tipc: Optimization to multicast name lookup algorithm 2008-07-14 22:45:33 -07:00
unix Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-06-28 01:19:40 -07:00
wanrouter net: Remove references to wan-router.txt in Kconfigs 2008-07-14 22:22:29 -07:00
wireless wext: make sysfs bits optional and deprecate them 2008-07-14 14:52:57 -04:00
x25 x25: Use sock_orphan() instead of open-coded (and buggy) variant. 2008-06-17 03:05:13 -07:00
xfrm xfrm: Add a XFRM_STATE_AF_UNSPEC flag to xfrm_usersa_info 2008-07-10 16:55:37 -07:00
Kconfig net: Add STP demux layer 2008-07-05 21:25:39 -07:00
Makefile vlan: uninline __vlan_hwaccel_rx 2008-07-08 03:23:36 -07:00
TUNABLE
compat.c net: Add compat support for getsockopt (MCAST_MSFILTER) 2008-04-29 03:23:22 -07:00
nonet.c
socket.c wext: Dispatch and handle compat ioctls entirely in net/wireless/wext.c 2008-06-16 18:32:46 -07:00
sysctl_net.c net: remove CVS keywords 2008-06-11 21:00:38 -07:00