Mailing List Archive

Tracking Heap Corruption bug
Hello guys, First of all, thank you very much for producing the SPF libraries.

I am the Sr. developer for CIPAFilter (cipafilter.com) which, among other things, is an anti-spam appliance that implements greylisting, spamassassin, etc. A few months ago, I implemented SPF in our product by utilizing your library.

Since then, we've had crashing with segmentation fault and core dumps on an irregular basis on many customers. (We have a watchdog that brings the milter back up so the customers don't notice) I've been trying to trouble shoot this for the last 2 weeks but I'm having alot of trouble tracking it down. I've thrown gdb, dmalloc, and valgrind at the problem but so far I can't get this one fixed.

All the core dumps back trace something similar to this (But not always the same, sometimes a slightly different trace, but this is the most common):

#0 0x4010954b in free () from /lib/libc.so.6
#1 0x401093d3 in free () from /lib/libc.so.6
#2 0x4008a283 in SPF_dns_rr_free (spfrr=0x851d070) at spf_dns_rr.c:115
#3 0x400908d9 in SPF_server_get_record (spf_server=0x839d6a0,
spf_request=0x8508b98, spf_response=0x84ef970, spf_recordp=0xbf1ff980)
at spf_server.c:351
#4 0x4008f8ac in SPF_request_query_mailfrom (spf_request=0x8508b98,
spf_responsep=0xbf1ff9b8) at spf_request.c:253
#5 0x08066313 in SPFCheck (MailData=0x850ca98, spf_server=0x839d6a0)
at milter-greylist.c:510
#6 0x080665a2 in GreyList (ctx=0x852b968, MailData=0x850ca98)
at milter-greylist.c:624
#7 0x08064782 in mlfi_envrcpt (ctx=0x852b968, argv=0x850a558) at milter.c:140
#8 0x0806b9e7 in st_rcpt ()
#9 0x0806b298 in mi_engine ()
#10 0x08069e09 in mi_handle_session ()
#11 0x08069685 in mi_thread_handle_wrapper ()
#12 0x4004b10c in pthread_detach () from /lib/libpthread.so.0
#13 0x4016c60a in clone () from /lib/libc.so.6

First thing I think, is that I have a heap corruption issue, that isn't necessarily in the spf library, so I try and trace it down with dmalloc and valgrind. I'm still working on that angle but no solid leads yet.

When I examined the core files in more detail, however, I discovered that all the crashes seem to be associated with a particular domain (I've examined more than a dozen cores from multiple customer sites and it's always the same story). They're all associated with from addresses that look like this "ret@e54709.willfindsome1.com" and "ret@s40574.willfindsomeone.com". (Notice there are 2 domains, willfindsomeone1.com and willfindsomeone.com.)

There are no SPF records for the s40574 part, but there are for the willfindsomeone.com part... But they don't look corrupt or broken to me.

For the above backtrace:

(gdb) frame 4
#4 0x4008f8ac in SPF_request_query_mailfrom (spf_request=0x8508b98,
spf_responsep=0xbf1ff9b8) at spf_request.c:253
253 spf_request.c: No such file or directory.
in spf_request.c
(gdb) print *spf_request
$2 = {spf_server = 0x839d6a0, client_ver = 2, ipv4 = {s_addr = 4188406856},
ipv6 = {in6_u = {u6_addr8 = '\0' <repeats 15 times>, u6_addr16 = {0, 0, 0,
0, 0, 0, 0, 0}, u6_addr32 = {0, 0, 0, 0}}},
env_from = 0x84f4ea0 "ret@j55767.willfindsome1.com",
helo_dom = 0x84f4e38 "j55767.willfindsome1.com", rcpt_to_dom = 0x0,
use_local_policy = 0 '\0', use_helo = 0 '\0', env_from_lp = 0x84f4ec8 "ret",
env_from_dp = 0x84f4e58 "j55767.willfindsome1.com", client_dom = 0x0,
cur_dom = 0x84f4e58 "j55767.willfindsome1.com", max_var_len = 0}

I'm hoping someone will have some hints. I'm happy to provide core files, answer whatever I can, etc, etc. Looks like some spammer has found a way to crash the default implementation!

Dmalloc gives me errors like the following:

1189541998: 229886: ERROR: _dmalloc_chunk_heap_check: failed OVER picket-fence magic-number check (err 27)
1189541998: 229886: error details: checking user pointer
1189541998: 229886: pointer '0x40b0ce08' from 'unknown' prev access 'ra=0x4008a395'
1189541998: 229886: dump of proper fence-top bytes: 'i\336\312\372'
1189541998: 229886: dump of '0x40b0ce08'+59: '.4.166.251 ~all\000\000\000\000\000'
1189541998: 229886: next pointer '0x40b0ce80' (size 64) may have run under from 'ra=0x4008f1f2'

Looks like part of this SPF entry is over running it's buffer... But I have no idea why that would happen.

David

-------------------------------------------
-----------------------------------------------------------------------
To unsubscribe, change your address, or temporarily deactivate your
subscription,
please go to http://v2.listbox.com/member/?member_id=1311533&id_secret=40755145-969c7b
Powered by Listbox: http://www.listbox.com
Re: Tracking Heap Corruption bug [ In reply to ]
Which SPF library? Is this libspf2?

Scott K

-------------------------------------------
-----------------------------------------------------------------------
To unsubscribe, change your address, or temporarily deactivate your
subscription,
please go to http://v2.listbox.com/member/?member_id=1311533&id_secret=40755906-8170de
Powered by Listbox: http://www.listbox.com
RE: Tracking Heap Corruption bug [ In reply to ]
Oh yea, libspf2. Revision 1.2.5

David

-----Original Message-----
From: Scott Kitterman [mailto:scott@kitterman.com]
Sent: Tue 9/11/2007 6:13 PM
To: spf-devel@v2.listbox.com
Subject: Re: [spf-devel] Tracking Heap Corruption bug

Which SPF library? Is this libspf2?

Scott K

-------------------------------------------
-----------------------------------------------------------------------
To unsubscribe, change your address, or temporarily deactivate your
subscription,
please go to http://v2.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com

-------------------------------------------
-----------------------------------------------------------------------
To unsubscribe, change your address, or temporarily deactivate your
subscription,
please go to http://v2.listbox.com/member/?member_id=1311533&id_secret=40757990-9e7f27
Powered by Listbox: http://www.listbox.com
RE: Tracking Heap Corruption bug [ In reply to ]
Looks like another domain is triggering this problem now. Same pattern as before, randomly generated subdomains that don't exist. Main domain does exist and has spf record. Username in from field is always "ret". Following are two back traces and the contents of the spf_request variables.

(gdb) bt
#0 0x4010954b in free () from /lib/libc.so.6
#1 0x401093d3 in free () from /lib/libc.so.6
#2 0x4008a283 in SPF_dns_rr_free (spfrr=0x8505660) at spf_dns_rr.c:115
#3 0x400908d9 in SPF_server_get_record (spf_server=0x839d6a0,
spf_request=0x83bd718, spf_response=0x8529938, spf_recordp=0xbf5ff980)
at spf_server.c:351
#4 0x4008f8ac in SPF_request_query_mailfrom (spf_request=0x83bd718,
spf_responsep=0xbf5ff9b8) at spf_request.c:253
#5 0x08066313 in SPFCheck (MailData=0x84fb170, spf_server=0x839d6a0)
at milter-greylist.c:510
#6 0x080665a2 in GreyList (ctx=0x8524f50, MailData=0x84fb170)
at milter-greylist.c:624
#7 0x08064782 in mlfi_envrcpt (ctx=0x8524f50, argv=0x84f5020) at milter.c:140
#8 0x0806b9e7 in st_rcpt ()
#9 0x0806b298 in mi_engine ()
#10 0x08069e09 in mi_handle_session ()
#11 0x08069685 in mi_thread_handle_wrapper ()
#12 0x4004b10c in pthread_detach () from /lib/libpthread.so.0
#13 0x4016c60a in clone () from /lib/libc.so.6
(gdb) frame 4
#4 0x4008f8ac in SPF_request_query_mailfrom (spf_request=0x83bd718,
spf_responsep=0xbf5ff9b8) at spf_request.c:253
253 spf_request.c: No such file or directory.
in spf_request.c
(gdb) print *spf_request
$1 = {spf_server = 0x839d6a0, client_ver = 2, ipv4 = {s_addr = 2146635860},
ipv6 = {in6_u = {u6_addr8 = '\0' <repeats 15 times>, u6_addr16 = {0, 0, 0,
0, 0, 0, 0, 0}, u6_addr32 = {0, 0, 0, 0}}},
env_from = 0x852bf98 "ret@x46677.whoisyourbigcrush.com",
helo_dom = 0x85116c0 "x46677.whoisyourbigcrush.com", rcpt_to_dom = 0x0,
use_local_policy = 0 '\0', use_helo = 0 '\0', env_from_lp = 0x8526e90 "ret",
env_from_dp = 0x8511730 "x46677.whoisyourbigcrush.com", client_dom = 0x0,
cur_dom = 0x8511730 "x46677.whoisyourbigcrush.com", max_var_len = 0}




(gdb) bt
#0 0x40108b3d in malloc () from /lib/libc.so.6
#1 0x40109bdb in realloc () from /lib/libc.so.6
#2 0x401098e4 in realloc () from /lib/libc.so.6
#3 0x40086a96 in SPF_c_ensure_capacity (datap=0x84ebbe0, sizep=0x84ebbe4,
length=32) at spf_compile.c:107
#4 0x4008796c in SPF_c_mech_add (spf_server=0x839d6a0, spf_record=0x84ebbd8,
spf_response=0x84ec330, mechtype=0x4009234c, prefix=2,
mech_value=0xbf5ff900) at spf_compile.c:831
#5 0x40088300 in SPF_record_compile (spf_server=0x839d6a0,
spf_response=0x84ec330, spf_recordp=0xbf5ff980,
record=0x84eb650 "v=spf1 a mx a:whosurcrush.com mx:whosurcrush.com ip4:89.149.229.152 ~all") at spf_compile.c:1260
#6 0x400908ce in SPF_server_get_record (spf_server=0x839d6a0,
spf_request=0x84ebea0, spf_response=0x84ec330, spf_recordp=0xbf5ff980)
at spf_server.c:348
#7 0x4008f8ac in SPF_request_query_mailfrom (spf_request=0x84ebea0,
spf_responsep=0xbf5ff9b8) at spf_request.c:253
#8 0x08066313 in SPFCheck (MailData=0x84ee390, spf_server=0x839d6a0)
at milter-greylist.c:510
#9 0x080665a2 in GreyList (ctx=0x84edc30, MailData=0x84ee390)
at milter-greylist.c:624
#10 0x08064782 in mlfi_envrcpt (ctx=0x84edc30, argv=0x84ebe78) at milter.c:140
#11 0x0806b9e7 in st_rcpt ()
---Type <return> to continue, or q <return> to quit---
#12 0x0806b298 in mi_engine ()
#13 0x08069e09 in mi_handle_session ()
#14 0x08069685 in mi_thread_handle_wrapper ()
#15 0x4004b10c in pthread_detach () from /lib/libpthread.so.0
#16 0x4016c60a in clone () from /lib/libc.so.6
(gdb) frame 7
#7 0x4008f8ac in SPF_request_query_mailfrom (spf_request=0x84ebea0,
spf_responsep=0xbf5ff9b8) at spf_request.c:253
253 spf_request.c: No such file or directory.
in spf_request.c
(gdb) print *spf_request
$1 = {spf_server = 0x839d6a0, client_ver = 2, ipv4 = {s_addr = 2565182809},
ipv6 = {in6_u = {u6_addr8 = '\0' <repeats 15 times>, u6_addr16 = {0, 0, 0,
0, 0, 0, 0, 0}, u6_addr32 = {0, 0, 0, 0}}},
env_from = 0x84ebf58 "ret@j33261.whosurcrush.com",
helo_dom = 0x84eab90 "j33261.whosurcrush.com", rcpt_to_dom = 0x0,
use_local_policy = 0 '\0', use_helo = 0 '\0', env_from_lp = 0x84ebf78 "ret",
env_from_dp = 0x84ebee8 "j33261.whosurcrush.com", client_dom = 0x0,
cur_dom = 0x84ebee8 "j33261.whosurcrush.com", max_var_len = 0}



-----Original Message-----
From: David Hinkle [mailto:hinkle@cipafilter.com]
Sent: Tue 9/11/2007 6:05 PM
To: spf-devel@v2.listbox.com
Subject: [spf-devel] Tracking Heap Corruption bug

Hello guys, First of all, thank you very much for producing the SPF libraries.

I am the Sr. developer for CIPAFilter (cipafilter.com) which, among other things, is an anti-spam appliance that implements greylisting, spamassassin, etc. A few months ago, I implemented SPF in our product by utilizing your library.

Since then, we've had crashing with segmentation fault and core dumps on an irregular basis on many customers. (We have a watchdog that brings the milter back up so the customers don't notice) I've been trying to trouble shoot this for the last 2 weeks but I'm having alot of trouble tracking it down. I've thrown gdb, dmalloc, and valgrind at the problem but so far I can't get this one fixed.

All the core dumps back trace something similar to this (But not always the same, sometimes a slightly different trace, but this is the most common):

#0 0x4010954b in free () from /lib/libc.so.6
#1 0x401093d3 in free () from /lib/libc.so.6
#2 0x4008a283 in SPF_dns_rr_free (spfrr=0x851d070) at spf_dns_rr.c:115
#3 0x400908d9 in SPF_server_get_record (spf_server=0x839d6a0,
spf_request=0x8508b98, spf_response=0x84ef970, spf_recordp=0xbf1ff980)
at spf_server.c:351
#4 0x4008f8ac in SPF_request_query_mailfrom (spf_request=0x8508b98,
spf_responsep=0xbf1ff9b8) at spf_request.c:253
#5 0x08066313 in SPFCheck (MailData=0x850ca98, spf_server=0x839d6a0)
at milter-greylist.c:510
#6 0x080665a2 in GreyList (ctx=0x852b968, MailData=0x850ca98)
at milter-greylist.c:624
#7 0x08064782 in mlfi_envrcpt (ctx=0x852b968, argv=0x850a558) at milter.c:140
#8 0x0806b9e7 in st_rcpt ()
#9 0x0806b298 in mi_engine ()
#10 0x08069e09 in mi_handle_session ()
#11 0x08069685 in mi_thread_handle_wrapper ()
#12 0x4004b10c in pthread_detach () from /lib/libpthread.so.0
#13 0x4016c60a in clone () from /lib/libc.so.6

First thing I think, is that I have a heap corruption issue, that isn't necessarily in the spf library, so I try and trace it down with dmalloc and valgrind. I'm still working on that angle but no solid leads yet.

When I examined the core files in more detail, however, I discovered that all the crashes seem to be associated with a particular domain (I've examined more than a dozen cores from multiple customer sites and it's always the same story). They're all associated with from addresses that look like this "ret@e54709.willfindsome1.com" and "ret@s40574.willfindsomeone.com". (Notice there are 2 domains, willfindsomeone1.com and willfindsomeone.com.)

There are no SPF records for the s40574 part, but there are for the willfindsomeone.com part... But they don't look corrupt or broken to me.

For the above backtrace:

(gdb) frame 4
#4 0x4008f8ac in SPF_request_query_mailfrom (spf_request=0x8508b98,
spf_responsep=0xbf1ff9b8) at spf_request.c:253
253 spf_request.c: No such file or directory.
in spf_request.c
(gdb) print *spf_request
$2 = {spf_server = 0x839d6a0, client_ver = 2, ipv4 = {s_addr = 4188406856},
ipv6 = {in6_u = {u6_addr8 = '\0' <repeats 15 times>, u6_addr16 = {0, 0, 0,
0, 0, 0, 0, 0}, u6_addr32 = {0, 0, 0, 0}}},
env_from = 0x84f4ea0 "ret@j55767.willfindsome1.com",
helo_dom = 0x84f4e38 "j55767.willfindsome1.com", rcpt_to_dom = 0x0,
use_local_policy = 0 '\0', use_helo = 0 '\0', env_from_lp = 0x84f4ec8 "ret",
env_from_dp = 0x84f4e58 "j55767.willfindsome1.com", client_dom = 0x0,
cur_dom = 0x84f4e58 "j55767.willfindsome1.com", max_var_len = 0}

I'm hoping someone will have some hints. I'm happy to provide core files, answer whatever I can, etc, etc. Looks like some spammer has found a way to crash the default implementation!

Dmalloc gives me errors like the following:

1189541998: 229886: ERROR: _dmalloc_chunk_heap_check: failed OVER picket-fence magic-number check (err 27)
1189541998: 229886: error details: checking user pointer
1189541998: 229886: pointer '0x40b0ce08' from 'unknown' prev access 'ra=0x4008a395'
1189541998: 229886: dump of proper fence-top bytes: 'i\336\312\372'
1189541998: 229886: dump of '0x40b0ce08'+59: '.4.166.251 ~all\000\000\000\000\000'
1189541998: 229886: next pointer '0x40b0ce80' (size 64) may have run under from 'ra=0x4008f1f2'

Looks like part of this SPF entry is over running it's buffer... But I have no idea why that would happen.

David

-------------------------------------------
-----------------------------------------------------------------------
To unsubscribe, change your address, or temporarily deactivate your
subscription,
please go to http://v2.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com

-------------------------------------------
-----------------------------------------------------------------------
To unsubscribe, change your address, or temporarily deactivate your
subscription,
please go to http://v2.listbox.com/member/?member_id=1311533&id_secret=40809003-c6e766
Powered by Listbox: http://www.listbox.com
Re: Tracking Heap Corruption bug [ In reply to ]
On Tuesday 11 September 2007 19:18, David Hinkle wrote:
> Oh yea, libspf2. Revision 1.2.5
>
I'd suggest looking at the Debian package as it has some 64 bit related fixes.
Do check each file as there is at least one patch in there that is GPL only
(IIRC).

Scott K

-------------------------------------------
-----------------------------------------------------------------------
To unsubscribe, change your address, or temporarily deactivate your
subscription,
please go to http://v2.listbox.com/member/?member_id=1311533&id_secret=40806515-e0647e
Powered by Listbox: http://www.listbox.com
RE: Tracking Heap Corruption bug [ In reply to ]
This isn't being run a 64 bit platform, so that's not an issue for me.

David

-----Original Message-----
From: Scott Kitterman [mailto:scott@kitterman.com]
Sent: Tue 9/11/2007 7:02 PM
To: spf-devel@v2.listbox.com
Subject: Re: [spf-devel] Tracking Heap Corruption bug

On Tuesday 11 September 2007 19:18, David Hinkle wrote:
> Oh yea, libspf2. Revision 1.2.5
>
I'd suggest looking at the Debian package as it has some 64 bit related fixes.
Do check each file as there is at least one patch in there that is GPL only
(IIRC).

Scott K

-------------------------------------------
-----------------------------------------------------------------------
To unsubscribe, change your address, or temporarily deactivate your
subscription,
please go to http://v2.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com

-------------------------------------------
-----------------------------------------------------------------------
To unsubscribe, change your address, or temporarily deactivate your
subscription,
please go to http://v2.listbox.com/member/?member_id=1311533&id_secret=40812279-18e38e
Powered by Listbox: http://www.listbox.com
RE: Tracking Heap Corruption bug [ In reply to ]
OK. I misunderstood. There are a number of other issues patched there too.

Scott K

...... Original Message .......
On Tue, 11 Sep 2007 19:19:12 -0500 "David Hinkle" <hinkle@cipafilter.com>
wrote:
>
>This isn't being run a 64 bit platform, so that's not an issue for me.
>
>David
>
>-----Original Message-----
>From: Scott Kitterman [mailto:scott@kitterman.com]
>Sent: Tue 9/11/2007 7:02 PM
>To: spf-devel@v2.listbox.com
>Subject: Re: [spf-devel] Tracking Heap Corruption bug
>
>On Tuesday 11 September 2007 19:18, David Hinkle wrote:
>> Oh yea, libspf2. Revision 1.2.5
>>
>I'd suggest looking at the Debian package as it has some 64 bit related
fixes.
>Do check each file as there is at least one patch in there that is GPL
only
>(IIRC).
>
>Scott K
>
>-------------------------------------------
>-----------------------------------------------------------------------
>To unsubscribe, change your address, or temporarily deactivate your
>subscription,
>please go to http://v2.listbox.com/member/?&
>Powered by Listbox: http://www.listbox.com
>
>-------------------------------------------
>-----------------------------------------------------------------------
>To unsubscribe, change your address, or temporarily deactivate your
>subscription,
>please go to http://v2.listbox.com/member/?&
>Powered by Listbox: http://www.listbox.com
>

-------------------------------------------
-----------------------------------------------------------------------
To unsubscribe, change your address, or temporarily deactivate your
subscription,
please go to http://v2.listbox.com/member/?member_id=1311533&id_secret=40813969-c058a9
Powered by Listbox: http://www.listbox.com
Re: Tracking Heap Corruption bug [ In reply to ]
David Hinkle wrote:

> Since then, we've had crashing with segmentation fault and core dumps
> on an irregular basis on many customers.

I, too, see random crashes of my milter if and only if it uses SPF2
library. 32 bit, library is 1.2.5 vanilla, milter is
http://www.average.org/zmscanner , crashes are once in maybe a week on a
low traffic system (~1000 msgs/day).

Eugene

-------------------------------------------
-----------------------------------------------------------------------
To unsubscribe, change your address, or temporarily deactivate your
subscription,
please go to http://v2.listbox.com/member/?member_id=1311533&id_secret=40858384-6ecce8
Powered by Listbox: http://www.listbox.com
Re: Tracking Heap Corruption bug [ In reply to ]
On Wednesday 12 September 2007 02:02, Scott Kitterman wrote:
> On Tuesday 11 September 2007 19:18, David Hinkle wrote:
> > Oh yea, libspf2. Revision 1.2.5
>
> I'd suggest looking at the Debian package as it has some 64 bit related
> fixes. Do check each file as there is at least one patch in there that is
> GPL only (IIRC).

No, I managed to persuade Robert.

--
Magnus Holmgren holmgren@lysator.liu.se
(No Cc of list mail needed, thanks)

-------------------------------------------
-----------------------------------------------------------------------
To unsubscribe, change your address, or temporarily deactivate your
subscription,
please go to http://v2.listbox.com/member/?member_id=1311533&id_secret=40886509-f173f8
Powered by Listbox: http://www.listbox.com
Re: Tracking Heap Corruption bug [ In reply to ]
On Wed, 12 Sep 2007 11:48:26 +0200 Magnus Holmgren
<holmgren@lysator.liu.se> wrote:
>On Wednesday 12 September 2007 02:02, Scott Kitterman wrote:
>> On Tuesday 11 September 2007 19:18, David Hinkle wrote:
>> > Oh yea, libspf2. Revision 1.2.5
>>
>> I'd suggest looking at the Debian package as it has some 64 bit related
>> fixes. Do check each file as there is at least one patch in there that is
>> GPL only (IIRC).
>
>No, I managed to persuade Robert.
>
Thanks for that. I appreciate you making the effort to keep the Debian
licensing consistent with the original author's.

Scott K

-------------------------------------------
-----------------------------------------------------------------------
To unsubscribe, change your address, or temporarily deactivate your
subscription,
please go to http://v2.listbox.com/member/?member_id=1311533&id_secret=40902716-960d3d
Powered by Listbox: http://www.listbox.com
RE: Tracking Heap Corruption bug [ In reply to ]
Are these patches going into the main distribution?

David


-----Original Message-----
From: Scott Kitterman [mailto:scott@kitterman.com]
Sent: Wed 9/12/2007 5:42 AM
To: spf-devel@v2.listbox.com
Subject: Re: [spf-devel] Tracking Heap Corruption bug

On Wed, 12 Sep 2007 11:48:26 +0200 Magnus Holmgren
<holmgren@lysator.liu.se> wrote:
>On Wednesday 12 September 2007 02:02, Scott Kitterman wrote:
>> On Tuesday 11 September 2007 19:18, David Hinkle wrote:
>> > Oh yea, libspf2. Revision 1.2.5
>>
>> I'd suggest looking at the Debian package as it has some 64 bit related
>> fixes. Do check each file as there is at least one patch in there that is
>> GPL only (IIRC).
>
>No, I managed to persuade Robert.
>
Thanks for that. I appreciate you making the effort to keep the Debian
licensing consistent with the original author's.

Scott K

-------------------------------------------
-----------------------------------------------------------------------
To unsubscribe, change your address, or temporarily deactivate your
subscription,
please go to http://v2.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com

-------------------------------------------
-----------------------------------------------------------------------
To unsubscribe, change your address, or temporarily deactivate your
subscription,
please go to http://v2.listbox.com/member/?member_id=1311533&id_secret=40946895-81c73d
Powered by Listbox: http://www.listbox.com
RE: Tracking Heap Corruption bug [ In reply to ]
Technically there is no reason why not. The last libspf2 maintainer went
MIA. I'm working on talking someone else into it right now.

So I'd say eventually.

Scott K

On Wed, 12 Sep 2007 09:44:33 -0500 "David Hinkle" <hinkle@cipafilter.com>
wrote:
>Are these patches going into the main distribution?
>
>David
>
>
>-----Original Message-----
>From: Scott Kitterman [mailto:scott@kitterman.com]
>Sent: Wed 9/12/2007 5:42 AM
>To: spf-devel@v2.listbox.com
>Subject: Re: [spf-devel] Tracking Heap Corruption bug
>
>On Wed, 12 Sep 2007 11:48:26 +0200 Magnus Holmgren
><holmgren@lysator.liu.se> wrote:
>>On Wednesday 12 September 2007 02:02, Scott Kitterman wrote:
>>> On Tuesday 11 September 2007 19:18, David Hinkle wrote:
>>> > Oh yea, libspf2. Revision 1.2.5
>>>
>>> I'd suggest looking at the Debian package as it has some 64 bit related
>>> fixes. Do check each file as there is at least one patch in there that
is
>>> GPL only (IIRC).
>>
>>No, I managed to persuade Robert.
>>
>Thanks for that. I appreciate you making the effort to keep the Debian
>licensing consistent with the original author's.
>
>Scott K
>
>-------------------------------------------
>-----------------------------------------------------------------------
>To unsubscribe, change your address, or temporarily deactivate your
>subscription,
>please go to http://v2.listbox.com/member/?&
>Powered by Listbox: http://www.listbox.com
>
>-------------------------------------------
>-----------------------------------------------------------------------
>To unsubscribe, change your address, or temporarily deactivate your
>subscription,
>please go to http://v2.listbox.com/member/?&
>Powered by Listbox: http://www.listbox.com
>

-------------------------------------------
-----------------------------------------------------------------------
To unsubscribe, change your address, or temporarily deactivate your
subscription,
please go to http://v2.listbox.com/member/?member_id=1311533&id_secret=40949776-1380ed
Powered by Listbox: http://www.listbox.com
RE: Tracking Heap Corruption bug [ In reply to ]
I've broken my spf code out into a separate executable. I've examined it with valgrind and I can't get it to do anything weird except the error message below. I did get it to do something weird one time when I wasn't running valgrind. I'm thinking that the spammers DNS is doing something weird intermittently. Since I can't track down this heap corruption bug, and because it's too dangerous to let live, I'm just going to separate all the ospf calls out and my software and instead call a separate executable to do the checks.

root@davidsbox:/MyProjects/cipafilter# valgrind ./spf-helper 216.110.191.113 ret@r32586.willfindyourmatch.com r32586.willfindyourmatch.com; echo $?
==7227== Memcheck, a memory error detector.
==7227== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==7227== Using LibVEX rev 1732, a library for dynamic binary translation.
==7227== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==7227== Using valgrind-3.2.3, a dynamic binary instrumentation framework.
==7227== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==7227== For more details, rerun with: -v
==7227==
Using HELO domain: r32586.willfindyourmatch.com
Using from address: ret@r32586.willfindyourmatch.com
==7227== Conditional jump or move depends on uninitialised value(s)
==7227== at 0x457AABB: __res_vinit (in /lib/libc-2.2.3.so)
==7227== by 0x457A18F: __res_ninit (res_init.c:135)
==7227== by 0x44884A1: SPF_dns_resolv_lookup (spf_dns_resolv.c:147)
==7227== by 0x44877A2: SPF_dns_lookup (spf_dns.c:114)
==7227== by 0x4487E71: SPF_dns_cache_lookup (spf_dns_cache.c:387)
==7227== by 0x44877A2: SPF_dns_lookup (spf_dns.c:114)
==7227== by 0x448F6FD: SPF_server_get_record (spf_server.c:275)
==7227== by 0x448E8AB: SPF_request_query_mailfrom (spf_request.c:253)
==7227== by 0x8048B7B: main (spf-helper.c:83)
Error: Unknown SPF Response: 0
Exteneded SPF Pass
==7227==
==7227== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 5 from 3)
==7227== malloc/free: in use at exit: 2,648 bytes in 27 blocks.
==7227== malloc/free: 62 allocs, 36 frees, 4,773 bytes allocated.
==7227== For counts of detected errors, rerun with: -v
==7227== searching for pointers to 27 not-freed blocks.
==7227== checked 320,800 bytes.
==7227==
==7227== LEAK SUMMARY:
==7227== definitely lost: 0 bytes in 0 blocks.
==7227== possibly lost: 0 bytes in 0 blocks.
==7227== still reachable: 2,648 bytes in 27 blocks.
==7227== suppressed: 0 bytes in 0 blocks.
==7227== Rerun with --leak-check=full to see details of leaked memory.
0



-----Original Message-----
From: Scott Kitterman [mailto:scott@kitterman.com]
Sent: Wed 9/12/2007 9:57 AM
To: spf-devel@v2.listbox.com
Subject: RE: [spf-devel] Tracking Heap Corruption bug

Technically there is no reason why not. The last libspf2 maintainer went
MIA. I'm working on talking someone else into it right now.

So I'd say eventually.

Scott K

On Wed, 12 Sep 2007 09:44:33 -0500 "David Hinkle" <hinkle@cipafilter.com>
wrote:
>Are these patches going into the main distribution?
>
>David
>
>
>-----Original Message-----
>From: Scott Kitterman [mailto:scott@kitterman.com]
>Sent: Wed 9/12/2007 5:42 AM
>To: spf-devel@v2.listbox.com
>Subject: Re: [spf-devel] Tracking Heap Corruption bug
>
>On Wed, 12 Sep 2007 11:48:26 +0200 Magnus Holmgren
><holmgren@lysator.liu.se> wrote:
>>On Wednesday 12 September 2007 02:02, Scott Kitterman wrote:
>>> On Tuesday 11 September 2007 19:18, David Hinkle wrote:
>>> > Oh yea, libspf2. Revision 1.2.5
>>>
>>> I'd suggest looking at the Debian package as it has some 64 bit related
>>> fixes. Do check each file as there is at least one patch in there that
is
>>> GPL only (IIRC).
>>
>>No, I managed to persuade Robert.
>>
>Thanks for that. I appreciate you making the effort to keep the Debian
>licensing consistent with the original author's.
>
>Scott K
>
>-------------------------------------------
>-----------------------------------------------------------------------
>To unsubscribe, change your address, or temporarily deactivate your
>subscription,
>please go to http://v2.listbox.com/member/?&
>Powered by Listbox: http://www.listbox.com
>
>-------------------------------------------
>-----------------------------------------------------------------------
>To unsubscribe, change your address, or temporarily deactivate your
>subscription,
>please go to http://v2.listbox.com/member/?&
>Powered by Listbox: http://www.listbox.com
>

-------------------------------------------
-----------------------------------------------------------------------
To unsubscribe, change your address, or temporarily deactivate your
subscription,
please go to http://v2.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com

-------------------------------------------
-----------------------------------------------------------------------
To unsubscribe, change your address, or temporarily deactivate your
subscription,
please go to http://v2.listbox.com/member/?member_id=1311533&id_secret=40999398-9e17e4
Powered by Listbox: http://www.listbox.com
RE: Tracking Heap Corruption bug [ In reply to ]
Perhaps the spammers know what the bug is, and are generating the random
domains to attack libspf?

On Tue, 2007-09-11 at 19:01 -0500, David Hinkle wrote:
> Looks like another domain is triggering this problem now. Same pattern as before, randomly generated subdomains that don't exist. Main domain does exist and has spf record. Username in from field is always "ret". Following are two back traces and the contents of the spf_request variables.
>

--
Jeremy Jackson
Coplanar Networks
(519)489-4903

-------------------------------------------
-----------------------------------------------------------------------
To unsubscribe, change your address, or temporarily deactivate your
subscription,
please go to http://v2.listbox.com/member/?member_id=1311533&id_secret=41485433-0cf9fe
Powered by Listbox: http://www.listbox.com