Mark,

I attached the gdb backtrace. Let me know if you need anything else.

Thanks!

Brandon

On Sun, 2007-06-17 at 09:20 +0200, Mark Burgess wrote:
> Brandon,
> 
> it would be a great help if you could reproduce this with a backtrace
> in gdb. This will make it much easier to find the problem. Thanks
> 
> gdb cfagent
> run -qIvK
> 
> (overflow)
> 
> back
> 
> 
> 
> Brandon Hutchinson wrote:
> > On RHEL 5 systems (i386), placing FriendStatus(0) in "alerts" causes a
> > buffer overflow error on cfengine versions 2.2.0 and 2.2.1.
> > 
> > I do not receive this buffer overflow error with cfengine 2.1.22 on RHEL
> > 5, nor do I receive it with any version on RHEL 4.
> > 
> > # cfagent -qvIK:
> > ...
> > 
> > CheckFriendConnections(0)
> > *** buffer overflow detected ***: cfagent terminated
> > ======= Backtrace: =========
> > /lib/libc.so.6(__chk_fail+0x41)[0x7ce241]
> > /lib/libc.so.6[0x7cdc83]
> > /lib/libc.so.6(__snprintf_chk+0x37)[0x7cdb67]
> > cfagent[0x8062289]
> > cfagent[0x80770ec]
> > cfagent[0x807b578]
> > cfagent[0x805a5cf]
> > cfagent[0x804f057]
> > /lib/libc.so.6(__libc_start_main+0xdc)[0x702dec]
> > cfagent[0x804acb1]
> > ======= Memory map: ========
> > 002c5000-002c9000 r-xp 00000000 68:02 557095     /lib/libnss_dns-2.5.so
> > 002c9000-002ca000 r-xp 00003000 68:02 557095     /lib/libnss_dns-2.5.so
> > 002ca000-002cb000 rwxp 00004000 68:02 557095     /lib/libnss_dns-2.5.so
> > 005da000-005db000 r-xp 005da000 00:00 0          [vdso]
> > 006d0000-006e9000 r-xp 00000000 68:02 559290     /lib/ld-2.5.so
> > 006e9000-006ea000 r-xp 00018000 68:02 559290     /lib/ld-2.5.so
> > 006ea000-006eb000 rwxp 00019000 68:02 559290     /lib/ld-2.5.so
> > 006ed000-00824000 r-xp 00000000 68:02 559291     /lib/libc-2.5.so
> > 00824000-00826000 r-xp 00137000 68:02 559291     /lib/libc-2.5.so
> > 00826000-00827000 rwxp 00139000 68:02 559291     /lib/libc-2.5.so
> > 00827000-0082a000 rwxp 00827000 00:00 0 
> > 0082c000-0082e000 r-xp 00000000 68:02 559294     /lib/libdl-2.5.so
> > 0082e000-0082f000 r-xp 00001000 68:02 559294     /lib/libdl-2.5.so
> > 0082f000-00830000 rwxp 00002000 68:02 559294     /lib/libdl-2.5.so
> > 00832000-00857000 r-xp 00000000 68:02 559293     /lib/libm-2.5.so
> > 00857000-00858000 r-xp 00024000 68:02 559293     /lib/libm-2.5.so
> > 00858000-00859000 rwxp 00025000 68:02 559293     /lib/libm-2.5.so
> > 0085b000-0086e000 r-xp 00000000 68:02 559300     /lib/libpthread-2.5.so
> > 0086e000-0086f000 r-xp 00012000 68:02 559300     /lib/libpthread-2.5.so
> > 0086f000-00870000 rwxp 00013000 68:02 559300     /lib/libpthread-2.5.so
> > 00870000-00872000 rwxp 00870000 00:00 0 
> > 00874000-00886000 r-xp 00000000 68:02 559283     /lib/libnsl-2.5.so
> > 00886000-00887000 r-xp 00012000 68:02 559283     /lib/libnsl-2.5.so
> > 00887000-00888000 rwxp 00013000 68:02 559283     /lib/libnsl-2.5.so
> > 00888000-0088a000 rwxp 00888000 00:00 0 
> > 0088c000-00895000 r-xp 00000000 68:02
> > 559319     /lib/libnss_files-2.5.so
> > 00895000-00896000 r-xp 00008000 68:02
> > 559319     /lib/libnss_files-2.5.so
> > 00896000-00897000 rwxp 00009000 68:02
> > 559319     /lib/libnss_files-2.5.so
> > 00899000-008a1000 r-xp 00000000 68:02 559320     /lib/libnss_nis-2.5.so
> > 008a1000-008a2000 r-xp 00007000 68:02 559320     /lib/libnss_nis-2.5.so
> > 008a2000-008a3000 rwxp 00008000 68:02 559320     /lib/libnss_nis-2.5.so
> > 008d5000-008e7000 r-xp 00000000 68:02 759336     /usr/lib/libz.so.1.2.3
> > 008e7000-008e8000 rwxp 00011000 68:02 759336     /usr/lib/libz.so.1.2.3
> > 008ea000-009de000 r-xp 00000000 68:02 559314     /lib/libdb-4.3.so
> > 009de000-009e1000 rwxp 000f4000 68:02 559314     /lib/libdb-4.3.so
> > 009f0000-009ff000 r-xp 00000000 68:02 559311     /lib/libresolv-2.5.so
> > 009ff000-00a00000 r-xp 0000e000 68:02 559311     /lib/libresolv-2.5.so
> > 00a00000-00a01000 rwxp 0000f000 68:02 559311     /lib/libresolv-2.5.so
> > 00a01000-00a03000 rwxp 00a01000 00:00 0 
> > 00a10000-00b2c000 r-xp 00000000 68:02
> > 559309     /lib/libcrypto.so.0.9.8b
> > 00b2c000-00b3e000 rwxp 0011c000 68:02
> > 559309     /lib/libcrypto.so.0.9.8b
> > 00b3e000-00b42000 rwxp 00b3e000 00:00 0 
> > 00b62000-00b6d000 r-xp 00000000 68:02
> > 557074     /lib/libgcc_s-4.1.1-20070105.so
> > .1
> > 00b6d000-00b6e000 rwxp 0000a000 68:02
> > 557074     /lib/libgcc_s-4.1.1-20070105.so
> > .1
> > 08048000-080ed000 r-xp 00000000 68:02 767492     /usr/sbin/cfagent
> > 080ed000-080ef000 rw-p 000a5000 68:02 767492     /usr/sbin/cfagent
> > 080ef000-0815b000 rw-p 080ef000 00:00 0 
> > 08632000-086c0000 rw-p 08632000 00:00 0 
> > b7f20000-b7f23000 rw-p b7f20000 00:00 0 
> > b7f28000-b7f2a000 rw-p b7f28000 00:00 0 
> > bfd44000-bfd6a000 rw-p bfd44000 00:00 0          [stack]
> > Aborted
> > 
> > Please let me know if you would like me to gather additional information
> > from the RHEL 5 systems to help troubleshoot the problem.
> > 
> > Best regards,
> > 
> > Brandon Hutchinson
> > _______________________________________________
> > Bug-cfengine mailing list
> > [email protected]
> > https://cfengine.org/mailman/listinfo/bug-cfengine
> 
CheckFriendConnections(0)
*** buffer overflow detected ***: /usr/sbin/cfagent terminated
(no debugging symbols found)
======= Backtrace: =========
/lib/libc.so.6(__chk_fail+0x41)[0x7ce241]
/lib/libc.so.6[0x7cdc83]
/lib/libc.so.6(__snprintf_chk+0x37)[0x7cdb67]
/usr/sbin/cfagent[0x8062119]
/usr/sbin/cfagent[0x8076fec]
/usr/sbin/cfagent[0x807b478]
/usr/sbin/cfagent[0x805a45f]
/usr/sbin/cfagent[0x804f057]
/lib/libc.so.6(__libc_start_main+0xdc)[0x702dec]
/usr/sbin/cfagent[0x804acb1]
======= Memory map: ========
00110000-00114000 r-xp 00000000 68:02 557095     /lib/libnss_dns-2.5.so
00114000-00115000 r-xp 00003000 68:02 557095     /lib/libnss_dns-2.5.so
00115000-00116000 rwxp 00004000 68:02 557095     /lib/libnss_dns-2.5.so
001ee000-001f9000 r-xp 00000000 68:02 557059     
/lib/libgcc_s-4.1.1-20070105.so.1
001f9000-001fa000 rwxp 0000a000 68:02 557059     
/lib/libgcc_s-4.1.1-20070105.so.1
00225000-00226000 r-xp 00225000 00:00 0          [vdso]
006d0000-006e9000 r-xp 00000000 68:02 559290     /lib/ld-2.5.so
006e9000-006ea000 r-xp 00018000 68:02 559290     /lib/ld-2.5.so
006ea000-006eb000 rwxp 00019000 68:02 559290     /lib/ld-2.5.so
006ed000-00824000 r-xp 00000000 68:02 559291     /lib/libc-2.5.so
00824000-00826000 r-xp 00137000 68:02 559291     /lib/libc-2.5.so
00826000-00827000 rwxp 00139000 68:02 559291     /lib/libc-2.5.so
00827000-0082a000 rwxp 00827000 00:00 0 
0082c000-0082e000 r-xp 00000000 68:02 559294     /lib/libdl-2.5.so
0082e000-0082f000 r-xp 00001000 68:02 559294     /lib/libdl-2.5.so
0082f000-00830000 rwxp 00002000 68:02 559294     /lib/libdl-2.5.so
00832000-00857000 r-xp 00000000 68:02 559293     /lib/libm-2.5.so
00857000-00858000 r-xp 00024000 68:02 559293     /lib/libm-2.5.so
00858000-00859000 rwxp 00025000 68:02 559293     /lib/libm-2.5.so
0085b000-0086e000 r-xp 00000000 68:02 559300     /lib/libpthread-2.5.so
0086e000-0086f000 r-xp 00012000 68:02 559300     /lib/libpthread-2.5.so
0086f000-00870000 rwxp 00013000 68:02 559300     /lib/libpthread-2.5.so
00870000-00872000 rwxp 00870000 00:00 0 
00874000-00886000 r-xp 00000000 68:02 559283     /lib/libnsl-2.5.so
00886000-00887000 r-xp 00012000 68:02 559283     /lib/libnsl-2.5.so
00887000-00888000 rwxp 00013000 68:02 559283     /lib/libnsl-2.5.so
00888000-0088a000 rwxp 00888000 00:00 0 
0088c000-00895000 r-xp 00000000 68:02 559319     /lib/libnss_files-2.5.so
00895000-00896000 r-xp 00008000 68:02 559319     /lib/libnss_files-2.5.so
00896000-00897000 rwxp 00009000 68:02 559319     /lib/libnss_files-2.5.so
00899000-008a1000 r-xp 00000000 68:02 559320     /lib/libnss_nis-2.5.so
008a1000-008a2000 r-xp 00007000 68:02 559320     /lib/libnss_nis-2.5.so
008a2000-008a3000 rwxp 00008000 68:02 559320     /lib/libnss_nis-2.5.so
008d5000-008e7000 r-xp 00000000 68:02 759336     /usr/lib/libz.so.1.2.3
008e7000-008e8000 rwxp 00011000 68:02 759336     /usr/lib/libz.so.1.2.3
008ea000-009de000 r-xp 00000000 68:02 559314     /lib/libdb-4.3.so
009de000-009e1000 rwxp 000f4000 68:02 559314     /lib/libdb-4.3.so
009f0000-009ff000 r-xp 00000000 68:02 559311     /lib/libresolv-2.5.so
009ff000-00a00000 r-xp 0000e000 68:02 559311     /lib/libresolv-2.5.so
00a00000-00a01000 rwxp 0000f000 68:02 559311     /lib/libresolv-2.5.so
00a01000-00a03000 rwxp 00a01000 00:00 0 
00a10000-00b2c000 r-xp 00000000 68:02 559309     /lib/libcrypto.so.0.9.8b
00b2c000-00b3e000 rwxp 0011c000 68:02 559309     /lib/libcrypto.so.0.9.8b
00b3e000-00b42000 rwxp 00b3e000 00:00 0 
08048000-080ef000 r-xp 00000000 68:02 760385     /usr/sbin/cfagent
080ef000-080f2000 rw-p 000a6000 68:02 760385     /usr/sbin/cfagent
080f2000-0815d000 rw-p 080f2000 00:00 0 
088dd000-08969000 rw-p 088dd000 00:00 0 
b7f9f000-b7fa2000 rw-p b7f9f000 00:00 0 
b7fa7000-b7fa9000 rw-p b7fa7000 00:00 0 
bf84e000-bf885000 rw-p bf84e000 00:00 0          [stack]

Program received signal SIGABRT, Aborted.
[Switching to Thread -1208355136 (LWP 10889)]
0x00225402 in __kernel_vsyscall ()
(gdb) back
#0  0x00225402 in __kernel_vsyscall ()
#1  0x00715c00 in raise () from /lib/libc.so.6
#2  0x00717451 in abort () from /lib/libc.so.6
#3  0x0074b21b in __libc_message () from /lib/libc.so.6
#4  0x007ce241 in __chk_fail () from /lib/libc.so.6
#5  0x007cdc83 in __vsnprintf_chk () from /lib/libc.so.6
#6  0x007cdb67 in __snprintf_chk () from /lib/libc.so.6
#7  0x08062119 in CheckFriendConnections ()
#8  0x08076fec in HandleFriendStatus ()
#9  0x0807b478 in EvaluateFunction ()
#10 0x0805a45f in DoAlerts ()
#11 0x0804f057 in main ()
(gdb) quit
The program is running.  Exit anyway? (y or n) y
_______________________________________________
Bug-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/bug-cfengine

Reply via email to