segfaults on amd64 systems
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libspf2 (Debian) |
Fix Released
|
Unknown
|
|||
libspf2 (Ubuntu) |
Fix Released
|
Low
|
Michael Bienia |
Bug Description
Binary package hint: libspf2-2
Package: libspf2-2
Version: 1.2.5-3
The milter-greylist (linked with libspf2) segfaults every time on amd64 cpus. The
attached gdb shows:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1124096352 (LWP 5648)]
0x00002aaaab19d2a0 in memset () from /lib/libc.so.6
(gdb) bt
#0 0x00002aaaab19d2a0 in memset () from /lib/libc.so.6
#1 0x00002aaaaabcc5c2 in SPF_record_
#2 0x00002aaaaabcccb7 in SPF_record_
#3 0x00002aaaaabcceb6 in SPF_request_get_exp () from /usr/lib/
#4 0x00002aaaaabcdd6f in SPF_i_done () from /usr/lib/
#5 0x00002aaaaabcedf6 in SPF_record_
#6 0x00002aaaaabd1525 in SPF_request_
#7 0x00002aaaaabd15cf in SPF_request_
#8 0x000000000040cb75 in ?? ()
#9 0x0000000000403208 in ?? ()
#10 0x00002aaaab02273d in st_sender (g=0x43005140) at engine.c:853
#11 0x00002aaaab021bbe in mi_engine (ctx=0x547f30) at engine.c:355
#12 0x00002aaaab023b1f in mi_handle_session (ctx=0x547f30) at handler.c:45
#13 0x00002aaaab0228d9 in mi_thread_
#14 0x00002aaaaaf0d0fa in start_thread () from /lib/libpthread
#15 0x00002aaaab1f2ce2 in clone () from /lib/libc.so.6
#16 0x0000000000000000 in ?? ()
(gdb)
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Description
+++-===
ii libspf2-2 1.2.5-3 Sender Policy Framework library, written in
Carsten Koch-Mauthe found the same error and debugged the situation, see the mailinglist
article:
http://
I created a patch, based on this analyses, but also change len from int to size_t:
--- src/libspf2/
+++ src/libspf2/
@@ -49,8 +49,8 @@
char *buf;
- int buflen;
- int len;
+ size_t buflen;
+ size_t len;
spf_request = spf_response-
With this patch, the milter-greylist doesn't segfaults. I also report this situation to the libspf2 developer mailinglist and to Debian Bug#392793.
Regards
Herbert Straub
Changed in libspf2: | |
status: | Unknown → Unconfirmed |
Changed in libspf2: | |
status: | Fix Committed → Fix Released |
Changed in libspf2: | |
status: | Unconfirmed → Fix Released |
The attached patch seems to be a more complete solution to this problem. It builds successfully on both AMD64 and i386 systems.