#91 buffer overflow

open
nobody
None
5
2010-06-12
2010-06-12
tsk
No

Strange, when uploading files manually with wput everything is ok...always! :-)

when uploading via script, wput works ok except with one host, bailing out with a buffer overflow.
it makes no difference if uploading a directory or a file.

cpu: quadcore AMD Phenom II 2800 (lspci: tail of this report)
Linux xxxxxxx 2.6.32-22-server #33-Ubuntu SMP Wed Apr 28 14:34:48 UTC 2010 x86_64 GNU/Linux
wput version: 0.6.2
GNU bash, versie 4.1.5(1)-release (x86_64-pc-linux-gnu)

wput --basename="$UITBOX/$MAPPAD/$SESSIE/" -v -a "$LOGFILES/$LOGFILE" \ "$UITBOX/$MAPPAD/$SESSIE/$DOEL" "ftp://$LOGIN:$PASSWD@$HOST"

Here is a complete dump of the output...hope this info is sufficient
if not, don't hesitate to mail me for further info

348481K .......... .......... .......... .......... .......... 29% 8.97 MiB/s
404248K .......... .......... .......... .......... .......... 33% 8.83 MiB/s
457681K .......... .......... .......... .......... .......... 37% 9.23 MiB/s
512485K .......... .......... .......... .......... .......... 41% 10.46 MiB/s
564739K .......... .......... .......... .......... .......... 45% 10.20 MiB/s
615870K .......... .......... .......... .......... .......... 49% 10.02 MiB/s
669389K .......... .......... .......... .......... .......... 52% 9.99 MiB/s
722259K .......... .......... .......... .......... .......... 56% 9.88 MiB/s
776478K .......... .......... .......... .......... .......... 60% 10.20 MiB/s
831229K .......... .......... .......... .......... .......... 65% 10.34 MiB/s
886510K .......... .......... .......... .......... .......... 68% 10.37 MiB/s
939992K .......... .......... .......... .......... .......... 72% 10.55 MiB/s
993545K .......... .......... .......... .......... .......... 76% 10.26 MiB/s
1046799K .......... .......... .......... .......... .......... 80% 10.17 MiB/s
1101100K .......... .......... .......... *** buffer overflow detected ***: wput terminated
======= Backtrace: =========
/lib/libc.so.6(__fortify_fail+0x37)[0x7f7d26fca1d7]
/lib/libc.so.6(+0xfe090)[0x7f7d26fc9090]
/lib/libc.so.6(+0xfd4f9)[0x7f7d26fc84f9]
/lib/libc.so.6(_IO_default_xsputn+0xcc)[0x7f7d26f40d1c]
/lib/libc.so.6(_IO_vfprintf+0x3d34)[0x7f7d26f140d4]
/lib/libc.so.6(__vsprintf_chk+0x99)[0x7f7d26fc8599]
/lib/libc.so.6(__sprintf_chk+0x7f)[0x7f7d26fc84df]
wput[0x40a65d]
wput[0x40abdd]
wput[0x406140]
wput[0x4067f0]
wput[0x40d827]
wput[0x40444f]
/lib/libc.so.6(__libc_start_main+0xfd)[0x7f7d26ee9c4d]
wput[0x402759]
======= Memory map: ========
00400000-00415000 r-xp 00000000 08:02 271190 /usr/bin/wput
00614000-00615000 r--p 00014000 08:02 271190 /usr/bin/wput
00615000-00616000 rw-p 00015000 08:02 271190 /usr/bin/wput
022d0000-022f1000 rw-p 00000000 00:00 0 [heap]
7f7d25b42000-7f7d25b58000 r-xp 00000000 08:02 131339 /lib/libgcc_s.so.1
7f7d25b58000-7f7d25d57000 ---p 00016000 08:02 131339 /lib/libgcc_s.so.1
7f7d25d57000-7f7d25d58000 r--p 00015000 08:02 131339 /lib/libgcc_s.so.1
7f7d25d58000-7f7d25d59000 rw-p 00016000 08:02 131339 /lib/libgcc_s.so.1
7f7d25d59000-7f7d25d6f000 r-xp 00000000 08:02 142247 /lib/libresolv-2.11.1.so
7f7d25d6f000-7f7d25f6e000 ---p 00016000 08:02 142247 /lib/libresolv-2.11.1.so
7f7d25f6e000-7f7d25f6f000 r--p 00015000 08:02 142247 /lib/libresolv-2.11.1.so
7f7d25f6f000-7f7d25f70000 rw-p 00016000 08:02 142247 /lib/libresolv-2.11.1.so
7f7d25f70000-7f7d25f72000 rw-p 00000000 00:00 0
7f7d25f72000-7f7d25f77000 r-xp 00000000 08:02 142237 /lib/libnss_dns-2.11.1.so
7f7d25f77000-7f7d26176000 ---p 00005000 08:02 142237 /lib/libnss_dns-2.11.1.so
7f7d26176000-7f7d26177000 r--p 00004000 08:02 142237 /lib/libnss_dns-2.11.1.so
7f7d26177000-7f7d26178000 rw-p 00005000 08:02 142237 /lib/libnss_dns-2.11.1.so
7f7d26178000-7f7d26184000 r-xp 00000000 08:02 142238 /lib/libnss_files-2.11.1.so
7f7d26184000-7f7d26383000 ---p 0000c000 08:02 142238 /lib/libnss_files-2.11.1.so
7f7d26383000-7f7d26384000 r--p 0000b000 08:02 142238 /lib/libnss_files-2.11.1.so
7f7d26384000-7f7d26385000 rw-p 0000c000 08:02 142238 /lib/libnss_files-2.11.1.so
7f7d26385000-7f7d26388000 r-xp 00000000 08:02 132353 /lib/libgpg-error.so.0.4.0
7f7d26388000-7f7d26587000 ---p 00003000 08:02 132353 /lib/libgpg-error.so.0.4.0
7f7d26587000-7f7d26588000 r--p 00002000 08:02 132353 /lib/libgpg-error.so.0.4.0
7f7d26588000-7f7d26589000 rw-p 00003000 08:02 132353 /lib/libgpg-error.so.0.4.0
7f7d26589000-7f7d265fe000 r-xp 00000000 08:02 132343 /lib/libgcrypt.so.11.5.2
7f7d265fe000-7f7d267fd000 ---p 00075000 08:02 132343 /lib/libgcrypt.so.11.5.2
7f7d267fd000-7f7d267fe000 r--p 00074000 08:02 132343 /lib/libgcrypt.so.11.5.2
7f7d267fe000-7f7d26801000 rw-p 00075000 08:02 132343 /lib/libgcrypt.so.11.5.2
7f7d26801000-7f7d26817000 r-xp 00000000 08:02 131179 /lib/libz.so.1.2.3.3
7f7d26817000-7f7d26a16000 ---p 00016000 08:02 131179 /lib/libz.so.1.2.3.3
7f7d26a16000-7f7d26a17000 r--p 00015000 08:02 131179 /lib/libz.so.1.2.3.3
7f7d26a17000-7f7d26a18000 rw-p 00016000 08:02 131179 /lib/libz.so.1.2.3.3
7f7d26a18000-7f7d26ab4000 r-xp 00000000 08:02 265898 /usr/lib/libgnutls.so.26.14.12
7f7d26ab4000-7f7d26cb3000 ---p 0009c000 08:02 265898 /usr/lib/libgnutls.so.26.14.12
7f7d26cb3000-7f7d26cb9000 r--p 0009b000 08:02 265898 /usr/lib/libgnutls.so.26.14.12
7f7d26cb9000-7f7d26cba000 rw-p 000a1000 08:02 265898 /usr/lib/libgnutls.so.26.14.12
7f7d26cba000-7f7d26cca000 r-xp 00000000 08:02 267972 /usr/lib/libtasn1.so.3.1.7
7f7d26cca000-7f7d26ec9000 ---p 00010000 08:02 267972 /usr/lib/libtasn1.so.3.1.7
7f7d26ec9000-7f7d26eca000 r--p 0000f000 08:02 267972 /usr/lib/libtasn1.so.3.1.7
7f7d26eca000-7f7d26ecb000 rw-p 00010000 08:02 267972 /usr/lib/libtasn1.so.3.1.7
7f7d26ecb000-7f7d27043000 r-xp 00000000 08:02 142225 /lib/libc-2.11.1.so
7f7d27043000-7f7d27243000 ---p 00178000 08:02 142225 /lib/libc-2.11.1.so
7f7d27243000-7f7d27247000 r--p 00178000 08:02 142225 /lib/libc-2.11.1.so
7f7d27247000-7f7d27248000 rw-p 0017c000 08:02 142225 /lib/libc-2.11.1.so
7f7d27248000-7f7d2724d000 rw-p 00000000 00:00 0
7f7d2724d000-7f7d27257000 r-xp 00000000 08:02 265900 /usr/lib/libgnutls-openssl.so.26.14.12
7f7d27257000-7f7d27456000 ---p 0000a000 08:02 265900 /usr/lib/libgnutls-openssl.so.26.14.12
7f7d27456000-7f7d27457000 r--p 00009000 08:02 265900 /usr/lib/libgnutls-openssl.so.26.14.12
7f7d27457000-7f7d27458000 rw-p 0000a000 08:02 265900 /usr/lib/libgnutls-openssl.so.26.14.12
7f7d27458000-7f7d27478000 r-xp 00000000 08:02 142222 /lib/ld-2.11.1.so
7f7d27625000-7f7d27664000 r--p 00000000 08:02 271098 /usr/lib/locale/en_US.utf8/LC_CTYPE
7f7d27664000-7f7d2766b000 r--s 00000000 08:02 271760 /usr/lib/gconv/gconv-modules.cache
7f7d2766b000-7f7d27670000 rw-p 00000000 00:00 0
7f7d27674000-7f7d27675000 rw-p 00000000 00:00 0
7f7d27675000-7f7d27676000 r--p 00000000 08:02 271104 /usr/lib/locale/en_US.utf8/LC_MESSAGES/SYS_LC_MESSAGES
7f7d27676000-7f7d27678000 rw-p 00000000 00:00 0
7f7d27678000-7f7d27679000 r--p 00020000 08:02 142222 /lib/ld-2.11.1.so
7f7d27679000-7f7d2767a000 rw-p 00021000 08:02 142222 /lib/ld-2.11.1.so
7f7d2767a000-7f7d2767b000 rw-p 00000000 00:00 0
7fffd9754000-7fffd9769000 rw-p 00000000 00:00 0

lspci
00:00.0 Host bridge: Advanced Micro Devices [AMD] RS780 Host Bridge
00:01.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (int gfx)
00:05.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 1)
00:11.0 SATA controller: ATI Technologies Inc SB700/SB800 SATA Controller [IDE mode]
00:12.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller
00:12.1 USB Controller: ATI Technologies Inc SB700 USB OHCI1 Controller
00:12.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller
00:13.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller
00:13.1 USB Controller: ATI Technologies Inc SB700 USB OHCI1 Controller
00:13.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller
00:14.0 SMBus: ATI Technologies Inc SBx00 SMBus Controller (rev 3c)
00:14.1 IDE interface: ATI Technologies Inc SB700/SB800 IDE Controller
00:14.3 ISA bridge: ATI Technologies Inc SB700/SB800 LPC host controller
00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge
00:14.5 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI2 Controller
00:18.0 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] HyperTransport Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Miscellaneous Control
00:18.4 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Link Control
01:05.0 VGA compatible controller: ATI Technologies Inc 760G [Radeon 3000]
01:05.1 Audio device: ATI Technologies Inc RS780 Azalia controller
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)

Discussion