[Openswan dev] LEAK_DETECTIVE hits passert()

Paul Wouters paul at xelerance.com
Tue Nov 30 22:22:32 EST 2010


On Tue, 30 Nov 2010, Paul Wouters wrote:

With -lefence, I seem to be getting core dumps quickly. They all look like this:

Core was generated by `/usr/local/libexec/ipsec/pluto --nofork --secretsfile /etc/ipsec.secrets --ipse'.
Program terminated with signal 11, Segmentation fault.
#0  openswan_DBG_dump (label=0x80f3911 "     obj: ", p=0xb7e3dff8, len=8)
     at /root/openswan-2.6.32rc2/programs/pluto/log.c:779
779			*bp++ = hexdig[(*cp >> 4) & 0xF];
(gdb) bt
#0  openswan_DBG_dump (label=0x80f3911 "     obj: ", p=0xb7e3dff8, len=8)
     at /root/openswan-2.6.32rc2/programs/pluto/log.c:779
#1  0x08066ac2 in process_packet_tail (mdp=0x8124c40)
     at /root/openswan-2.6.32rc2/programs/pluto/ikev1.c:1638
#2  0x0808ba0d in comm_handle (ifp=0xb7ca1fcc)
     at /root/openswan-2.6.32rc2/programs/pluto/demux.c:212
#3  0x0805f89d in call_server ()
     at /root/openswan-2.6.32rc2/programs/pluto/server.c:764
#4  0x0805cb3a in main (argc=Cannot access memory at address 0x4)
     at /root/openswan-2.6.32rc2/programs/pluto/plutomain.c:1019

However, I do get them very regularly.

Corresponding logs:

Dec  1 04:04:34 unreachable pluto[2443]: |    next payload type: ISAKMP_NEXT_ID
Dec  1 04:04:34 unreachable pluto[2443]: |    length: 260
Dec  1 04:04:34 unreachable pluto[2443]: | got payload 0x20(ISAKMP_NEXT_ID) needed: 0x0 opt: 0x200030
Dec  1 04:04:34 unreachable pluto[2443]: | ***parse ISAKMP Identification Payload (IPsec DOI):
Dec  1 04:04:34 unreachable pluto[2443]: |    next payload type: ISAKMP_NEXT_ID
Dec  1 04:04:34 unreachable pluto[2443]: |    length: 16
Dec  1 04:04:34 unreachable pluto[2443]: |    ID type: ID_IPV4_ADDR_SUBNET
Dec  1 04:04:34 unreachable pluto[2443]: |    Protocol ID: 0
Dec  1 04:04:34 unreachable pluto[2443]: |    port: 0
Dec  1 04:04:34 unreachable pluto[2443]: |      obj:   c0 a8 6f 00  ff ff ff 00  00 00 00 10  04 00 00 00
Dec  1 04:04:34 unreachable pluto[2443]: | got payload 0x20(ISAKMP_NEXT_ID) needed: 0x0 opt: 0x200030
Dec  1 04:04:34 unreachable pluto[2443]: | ***parse ISAKMP Identification Payload (IPsec DOI):
Dec  1 04:04:34 unreachable pluto[2443]: |    next payload type: ISAKMP_NEXT_NONE
Dec  1 04:04:34 unreachable pluto[2443]: |    length: 16
Dec  1 04:04:34 unreachable pluto[2443]: |    ID type: ID_IPV4_ADDR_SUBNET
Dec  1 04:04:34 unreachable pluto[2443]: |    Protocol ID: 0
Dec  1 04:04:34 unreachable pluto[2443]: |    port: 0
Dec  1 04:04:46 unreachable ipsec__plutorun: Starting Pluto subsystem...
Dec  1 04:04:46 unreachable pluto[2778]: Starting Pluto (Openswan Version 2.6.32rc2; Vendor ID OEWgNjE|hLwV) pid:2778

Full backtrace:

(gdb) bt full
#0  openswan_DBG_dump (label=0x80f3911 "     obj: ", p=0xb7e3dff8, len=8)
     at /root/openswan-2.6.32rc2/programs/pluto/log.c:779
 	i = 2
 	j = 0
 	buf = "     obj:   c1 6e 9d 00  ff ff ff 00  00 00 00 10  04 00 00 00\000***parse "
 	bp = 0xbfc2ce08 " 00 00 00 10  04 00 00 00"
 	bufstart = 0xbfc2cded "  c1 6e 9d 00  ff ff ff 00  00 00 00 10  04 00 00 00"
 	cp = (const unsigned char *) 0xb7e3e000 ""
 	hexdig = "0123456789abcdef"
#1  0x08066ac2 in process_packet_tail (mdp=0x8124c40)
     at /root/openswan-2.6.32rc2/programs/pluto/ikev1.c:1638
 	s = 32
 	sd = (const struct struct_desc *) 0x811ec8c
 	pd = (struct payload_digest *) 0xb7cb7a7c
 	np = 5
 	needed = 0
 	excuse = 0x80fe690 ""
 	md = (struct msg_digest *) 0xb7cb7888
 	st = (struct state *) 0xb7be5a8c
 	from_state = STATE_QUICK_R0
 	smc = (const struct state_microcode *) 0x80f3e60
---Type <return> to continue, or q <return> to quit---
 	new_iv_set = <value optimized out>
#2  0x0808ba0d in comm_handle (ifp=0xb7ca1fcc)
     at /root/openswan-2.6.32rc2/programs/pluto/demux.c:212
 	non_esp = 3217283192
 	md = (struct msg_digest *) 0xb7cb7888
#3  0x0805f89d in call_server ()
     at /root/openswan-2.6.32rc2/programs/pluto/server.c:764
 	fd = <value optimized out>
 	next_time = 60
 	maxfd = <value optimized out>
 	readfds = {__osfds_bits = {0, 4096, 0 <repeats 254 times>}}
 	writefds = {__osfds_bits = {0 <repeats 256 times>}}
 	ndes = 1
 	ifp = <value optimized out>
 	lastn = 0
#4  0x0805cb3a in main (argc=Cannot access memory at address 0x4
)
     at /root/openswan-2.6.32rc2/programs/pluto/plutomain.c:1019
 	e = <value optimized out>
 	sk = 4
 	saref = 1
 	fork_desired = 0
 	lockfd = <value optimized out>
 	ocspuri = 0x0
---Type <return> to continue, or q <return> to quit---
 	nhelpers = 0
 	coredir = <value optimized out>
 	oco = (const struct osw_conf_options *) 0x8127e60
 	nat_traversal = 1
 	nat_t_spf = 1
 	keep_alive = 0
 	force_keepalive = 0
 	virtual_private = 0xbfc3e8bf "%v4:10.0.0.0/8,%v4:192.168.0.0/16"
 	long_opts = {{name = 0x80ef7aa "help", has_arg = 0, flag = 0x0,
     val = 104}, {name = 0x811e96f "version", has_arg = 0, flag = 0x0,
     val = 118}, {name = 0x80ef7af "optionsfrom", has_arg = 1, flag = 0x0,
     val = 43}, {name = 0x80ef7bb "nofork", has_arg = 0, flag = 0x0,
     val = 100}, {name = 0x80ef7c2 "stderrlog", has_arg = 0, flag = 0x0,
     val = 101}, {name = 0x80ef7cc "noklips", has_arg = 0, flag = 0x0,
     val = 110}, {name = 0x80ef7d4 "use-nostack", has_arg = 0, flag = 0x0,
     val = 110}, {name = 0x80ef7e0 "use-none", has_arg = 0, flag = 0x0,
     val = 110}, {name = 0x80ef7e9 "force_busy", has_arg = 0, flag = 0x0,
     val = 68}, {name = 0x80ef7f4 "nocrsend", has_arg = 0, flag = 0x0,
     val = 99}, {name = 0x80ef7fd "strictcrlpolicy", has_arg = 0, flag = 0x0,
     val = 114}, {name = 0x80ef80d "crlcheckinterval", has_arg = 1, flag = 0x0,
     val = 120}, {name = 0x80ef81e "ocsprequestcert", has_arg = 1, flag = 0x0,
     val = 113}, {name = 0x80ef82e "ocspuri", has_arg = 1, flag = 0x0,
     val = 111}, {name = 0x80ef836 "uniqueids", has_arg = 0, flag = 0x0, 
---Type <return> to continue, or q <return> to quit---
     val = 117}, {name = 0x80ef840 "useklips", has_arg = 0, flag = 0x0,
     val = 107}, {name = 0x80ef849 "use-klips", has_arg = 0, flag = 0x0,
     val = 107}, {name = 0x80ef853 "use-auto", has_arg = 0, flag = 0x0,
     val = 71}, {name = 0x80ef85c "usenetkey", has_arg = 0, flag = 0x0,
     val = 75}, {name = 0x80ef866 "use-netkey", has_arg = 0, flag = 0x0,
     val = 75}, {name = 0x80ef871 "use-mast", has_arg = 0, flag = 0x0,
     val = 77}, {name = 0x80ef87a "use-mastklips", has_arg = 0, flag = 0x0,
     val = 77}, {name = 0x80ef888 "use-bsdkame", has_arg = 0, flag = 0x0,
     val = 70}, {name = 0x80ef894 "interface", has_arg = 1, flag = 0x0,
     val = 105}, {name = 0x80ef640 "listen", has_arg = 1, flag = 0x0,
     val = 76}, {name = 0x80ef89e "ikeport", has_arg = 1, flag = 0x0,
     val = 112}, {name = 0x80ef8a6 "ctlbase", has_arg = 1, flag = 0x0,
     val = 98}, {name = 0x80ef8ae "secretsfile", has_arg = 1, flag = 0x0,
     val = 115}, {name = 0x80ef8ba "foodgroupsdir", has_arg = 1, flag = 0x0,
     val = 102}, {name = 0x80ef8c8 "perpeerlogbase", has_arg = 1, flag = 0x0,
     val = 80}, {name = 0x80ef8d7 "perpeerlog", has_arg = 0, flag = 0x0,
     val = 108}, {name = 0x80ef8e2 "noretransmits", has_arg = 0, flag = 0x0,
     val = 82}, {name = 0x80ef632 "coredir", has_arg = 1, flag = 0x0,
     val = 67}, {name = 0x80ef8f0 "ipsecdir", has_arg = 1, flag = 0x0,
     val = 102}, {name = 0x80ef8f9 "ipsec_dir", has_arg = 1, flag = 0x0,
     val = 102}, {name = 0x80ef903 "adns", has_arg = 1, flag = 0x0, val = 97}, {
     name = 0x80ef908 "nat_traversal", has_arg = 0, flag = 0x0, val = 49}, {
     name = 0x80ef916 "keep_alive", has_arg = 1, flag = 0x0, val = 50}, {
---Type <return> to continue, or q <return> to quit---
     name = 0x80ef921 "force_keepalive", has_arg = 0, flag = 0x0, val = 51}, {
     name = 0x80ef931 "disable_port_floating", has_arg = 0, flag = 0x0,
     val = 52}, {name = 0x80ef947 "debug-nat_t", has_arg = 0, flag = 0x0,
     val = 53}, {name = 0x80ef953 "debug-nattraversal", has_arg = 0,
     flag = 0x0, val = 53}, {name = 0x80ef966 "debug-nat-t", has_arg = 0,
     flag = 0x0, val = 53}, {name = 0x80ef972 "virtual_private", has_arg = 1,
     flag = 0x0, val = 54}, {name = 0x80ef982 "nhelpers", has_arg = 1,
     flag = 0x0, val = 106}, {name = 0x80ef98b "debug-none", has_arg = 0,
     flag = 0x0, val = 78}, {name = 0x80ef996 "debug-all", has_arg = 0,
     flag = 0x0, val = 65}, {name = 0x80ef9a0 "debug-raw", has_arg = 0,
     flag = 0x0, val = 257}, {name = 0x80ef9aa "debug-crypt", has_arg = 0,
     flag = 0x0, val = 258}, {name = 0x80ef9b6 "debug-crypto", has_arg = 0,
     flag = 0x0, val = 258}, {name = 0x80ef9c3 "debug-parsing", has_arg = 0,
     flag = 0x0, val = 260}, {name = 0x80ef9d1 "debug-emitting", has_arg = 0,
     flag = 0x0, val = 264}, {name = 0x80ef9e0 "debug-control", has_arg = 0,
     flag = 0x0, val = 272}, {name = 0x80ef9ee "debug-lifecycle", has_arg = 0,
     flag = 0x0, val = 288}, {name = 0x80ef9fe "debug-klips", has_arg = 0,
     flag = 0x0, val = 320}, {name = 0x80efa0a "debug-netkey", has_arg = 0,
     flag = 0x0, val = 320}, {name = 0x80efa17 "debug-dns", has_arg = 0,
     flag = 0x0, val = 384}, {name = 0x80efa21 "debug-oppo", has_arg = 0,
     flag = 0x0, val = 512}, {name = 0x80efa2c "debug-oppoinfo", has_arg = 0,
     flag = 0x0, val = 16640}, {name = 0x80efa3b "debug-controlmore",
     has_arg = 0, flag = 0x0, val = 768}, {name = 0x80efa4d "debug-dpd", 
---Type <return> to continue, or q <return> to quit---
     has_arg = 0, flag = 0x0, val = 8448}, {name = 0x80efa57 "debug-x509",
     has_arg = 0, flag = 0x0, val = 4352}, {name = 0x80efa62 "debug-private",
     has_arg = 0, flag = 0x0, val = 1048832}, {name = 0x80efa70 "debug-pfkey",
     has_arg = 0, flag = 0x0, val = 1280}, {
     name = 0x80efa7c "impair-delay-adns-key-answer", has_arg = 0, flag = 0x0,
     val = 2097408}, {name = 0x80efa99 "impair-delay-adns-txt-answer",
     has_arg = 0, flag = 0x0, val = 4194560}, {
     name = 0x80efab6 "impair-bust-mi2", has_arg = 0, flag = 0x0,
     val = 8388864}, {name = 0x80efac6 "impair-bust-mr2", has_arg = 0,
     flag = 0x0, val = 16777472}, {name = 0x80efad6 "impair-jacob-two-two",
     has_arg = 0, flag = 0x0, val = 134217984}, {
     name = 0x80efaeb "impair-shared-phase1", has_arg = 0, flag = 0x0,
     val = 268435712}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}}



More information about the Dev mailing list