Re: [Bacula-users] bat gets *** buffer overflow detected ***
2009-03-15 22:08:18
Dan Langille wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Mark Wright wrote:
>
>> I am using Ubuntu 8.10 Desktop (tried both 32-bit and 64-bit versions)
>> and liferay 2.4.4. I used the following procedure to create the bat module:
>>
>> *
>> *remove qt3* (if installed)
>> o
>>
>> sudo apt-get --purge remove qt3-dev-tools qt3-designer libqwt-dev
>>
>> *
>> *install qt4*
>> o
>>
>> sudo apt-get install qt4-dev-tools qt4-qtconfig libqt4-core
>> libqt4-dev
>>
>> *
>> *install qwt*
>> o
>>
>> apt-get install libqwt5-qt4 libqwt5-qt4-dev
>>
>> o
>> make sure, that under /usr/lib the libqwt.so links to
>> libqwt-qt4.so.5, if not create a symlink.
>> o
>>
>> cd /usr/lib
>> sudo ln -s libqwt-qt4.so.5 libqwt.so
>>
>> *
>> configure
>> o
>>
>> ./configure --enable-bat --enable-client-only
>> --with-qwt=/usr/lib/
>>
>> o
>> The result of the succesfull configure should show these lines:
>> +
>>
>> bat support: yes -L/usr/lib64
>> client-only: yes
>>
>> *
>> proceed to make
>> o
>>
>> make
>>
>> *
>> install bat
>> o
>>
>> sudo cp src/qt-console/bat /usr/sbin/
>>
>> o
>>
>> sudo cp src/qt-console/bat.conf /etc/bacula/
>>
>> *
>> start it
>> o
>>
>> bat -d99 -c /etc/bacula/bat.conf
>>
>> When I run it I get a
>> *** buffer overflow detected ***: bat terminated
>> ====== Backtrace: ======
>> /lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[oxb727d6d8]
>> /lib/tls/i686/cmov/libc.so.6[0xb727b800]
>> bat[0x8116d8c]
>> bat[ox8055c7d]
>> /lib/tls/i686/cmov/libc.so.6(__livc_start_main+0xe5)[0xb7199685]
>> bat[0x80555b1]
>>
>
> Is this a case of compiling with options to check for buffer overflow?
>
> Please search the archives for bat and buffer overflow. Your answer may
> be there. I seem to recall that some distros insist upon compile
> options that are simply wrong.
>
> - --
> Dan Langille
>
> BSDCan - The Technical BSD Conference : http://www.bsdcan.org/
> PGCon - The PostgreSQL Conference: http://www.pgcon.org/
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.11 (FreeBSD)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkm9rn0ACgkQCgsXFM/7nTykQwCfS+VA3fUlN58sUP4EOM13piMi
> p2YAoO0oInYs6fUoTSFeoA/q/ebdlI3V
> =Q6xa
> -----END PGP SIGNATURE-----
>
>
Thanks for the response. The only info I could find seemed to have to do
with setting the D_FORTIFY_SOURCE as part of the CFLAGS. I tried using
-D_FORTIFY_SOURCE=0, -D_FORTIFY_SOURCE=2 and -D_FORTIFY_SOURCE=3D0, but
I got the same results. I have to admit that I really don't understand
what the settings do, but I could not find any other information on how
I might set those. I also found the following information, although I
could not figure out how to use it in Ubuntu:
To avoid this problem a workaround for Redhat platforms is to set the
CFLAGS in your ~/.rpmmacros file as follows:
# uncomment for bacula #%__global_cflags -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=0 -fno-exceptions -fno-strict-aliasing -fno-rtti
For SuSE platforms set as follows in your ~/.rpmrc file:
optflags: i586 -O2 -g -m32 -march=i586 -mtune=i686 -fmessage-length=0
-D_FORTIFY_SOURCE=0 optflags: x86_64 -O2 -g -fmessage-length=0
-D_FORTIFY_SOURCE=0
--
*Mark Wright*
Chief Technology Officer
Web: redesetgrow.com <http://www.redesetgrow.com/>
Email: mwright AT redesetgrow DOT com <mailto:mwright AT redesetgrow DOT com>
Phone: (888) 386-3822
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
|
|
|