Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#40 Segfault on backing up Bold

closed-invalid
nobody
None
5
2010-11-22
2010-09-22
Anonymous
No

Using git-version (sync'd Sept. 22.2010) with and without usb-storage loaded. The Barry gui identifies and loads databases from the phone successfully. Clicking on backup results in a crash, buffer overflow, and aborts. Works just fine on two other PCs I have running Gentoo Linux so I'd have to say it is either machine or kernel specific. This is on a PC running GCC 4.5.1 with -march=atom set. I have attached info that I hope is useful. I compiled with -g so I should be able to provide more if needed.

Discussion


  • Anonymous
    2010-09-22

    The actual error message

     
    Attachments

  • Anonymous
    2010-09-22

    Added system info

     
  • Hi,

    Thanks for the bug report. My guess is that the bug is actually in libtar, and is flagged on your system because you might be using fortify.

    In libtar's lib/encode.c the th_finish() function does a strncpy() of 8 bytes into a 6 byte field and a 2 byte field. If these fields are contiguous in memory, no problem, but it is definitely iffy code.

    Unfortunately, I can't fix it in Barry, except to port it away from libtar to libarchive, or something similar. You may wish to file a bug with gentoo regarding the above issue. Libtar is not actively maintained anymore, so there won't be much upstream help.

    - Chris

     
    • status: open --> pending-invalid
     
  • This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
    • status: pending-invalid --> closed-invalid
     

  • Anonymous
    2010-11-19

    • status: closed-invalid --> open-invalid
     

  • Anonymous
    2010-11-19

    Apologies for not responding sooner; for some reason I didn't receive email updates on this issue. Further introspection with gdb confirms your diagnosis. If I understand you correctly, I need to recompile libtar without fortify set to fix this, correct?

     

  • Anonymous
    2010-11-19

    It seems that GCC enables -D_FORTIFY_SOURCE=2 as soon as you use -O2 (which implies -Os will do it as well.) I will try recompiling libtar with -O and see what happens,.

     
  • Re-emerging libtar with C(XX)FLAGS set to "-g -fno-stack-protector" results in the successful execution of the backup from my Bold 9000. Thanks for your assistance.

     
    • status: open-invalid --> closed-invalid
     
  • Glad to hear you found a workaround! Thanks for the success report.

    - Chris