Bug 799347

Summary: path_utils:test_path_concat_neg fails on 64-bit big endians
Product: [Fedora] Fedora Reporter: Dan Horák <dan>
Component: ding-libsAssignee: Stephen Gallagher <sgallagh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dpal, jakub, law, schwab, sgallagh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ding-libs-0.1.3-8.fc17 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 801393 (view as bug list) Environment:
Last Closed: 2012-03-21 18:51:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 801393    

Description Dan Horák 2012-03-02 14:48:37 UTC
The test_path_concat_neg test from path_utils fails on s390x and ppc64 (aka 64-bit big endians) with 

Running suite(s): path_utils
*** stack smashing detected ***: /builddir/build/BUILD/ding-libs-0.1.3/.libs/lt-path_utils_ut terminated
======= Backtrace: =========
/lib64/libc.so.6(__fortify_fail+0x20)[0x3fffd202574]
/lib64/libc.so.6(__fortify_fail+0x0)[0x3fffd202554]
/builddir/build/BUILD/ding-libs-0.1.3/.libs/lt-path_utils_ut[0x80003ef6]
/lib64/libcheck.so.0(srunner_run_all+0x794)[0x3fffd29a4a8]
/builddir/build/BUILD/ding-libs-0.1.3/.libs/lt-path_utils_ut[0x80001476]
/lib64/libc.so.6(__libc_start_main+0x11c)[0x3fffd10030c]
/builddir/build/BUILD/ding-libs-0.1.3/.libs/lt-path_utils_ut[0x800014e2]
======= Memory map: ========
80000000-8000a000 r-xp 00000000 fd:00 2626645                            /builddir/build/BUILD/ding-libs-0.1.3/.libs/lt-path_utils_ut
8000a000-8000b000 r-xp 00009000 fd:00 2626645                            /builddir/build/BUILD/ding-libs-0.1.3/.libs/lt-path_utils_ut
8000b000-8000c000 rwxp 0000a000 fd:00 2626645                            /builddir/build/BUILD/ding-libs-0.1.3/.libs/lt-path_utils_ut
bd579000-bd59a000 rw-p 00000000 00:00 0                                  [heap]
3fffd0a4000-3fffd0b4000 r-xp 00000000 fd:00 2359681                      /usr/lib64/libgcc_s-4.7.0-20120229.so.1
3fffd0b4000-3fffd0b5000 rwxp 00010000 fd:00 2359681                      /usr/lib64/libgcc_s-4.7.0-20120229.so.1
3fffd0b9000-3fffd0bb000 rwxp 00000000 00:00 0 
3fffd0bb000-3fffd0d6000 r-xp 00000000 fd:00 2360818                      /usr/lib64/libpthread-2.15.so
3fffd0d6000-3fffd0d7000 r-xp 0001a000 fd:00 2360818                      /usr/lib64/libpthread-2.15.so
3fffd0d7000-3fffd0d8000 rwxp 0001b000 fd:00 2360818                      /usr/lib64/libpthread-2.15.so
3fffd0d8000-3fffd0dc000 rwxp 00000000 00:00 0 
3fffd0dc000-3fffd285000 r-xp 00000000 fd:00 2360792                      /usr/lib64/libc-2.15.so
3fffd285000-3fffd289000 r-xp 001a8000 fd:00 2360792                      /usr/lib64/libc-2.15.so
3fffd289000-3fffd28b000 rwxp 001ac000 fd:00 2360792                      /usr/lib64/libc-2.15.so
3fffd28b000-3fffd28f000 rwxp 00000000 00:00 0 
3fffd28f000-3fffd292000 r-xp 00000000 fd:00 2626507                      /builddir/build/BUILD/ding-libs-0.1.3/.libs/libpath_utils.so.1.0.0
3fffd292000-3fffd293000 r-xp 00002000 fd:00 2626507                      /builddir/build/BUILD/ding-libs-0.1.3/.libs/libpath_utils.so.1.0.0
3fffd293000-3fffd294000 rwxp 00003000 fd:00 2626507                      /builddir/build/BUILD/ding-libs-0.1.3/.libs/libpath_utils.so.1.0.0
3fffd294000-3fffd295000 rwxp 00000000 00:00 0 
3fffd295000-3fffd29d000 r-xp 00000000 fd:00 2364406                      /usr/lib64/libcheck.so.0.0.0
3fffd29d000-3fffd29e000 r-xp 00007000 fd:00 2364406                      /usr/lib64/libcheck.so.0.0.0
3fffd29e000-3fffd29f000 rwxp 00008000 fd:00 2364406                      /usr/lib64/libcheck.so.0.0.0
3fffd2a0000-3fffd2a1000 rwxp 00000000 00:00 0 
3fffd2a1000-3fffd2a6000 rwxp 00000000 00:00 0 
3fffd2a6000-3fffd2a8000 r-xp 00000000 00:00 0                            [vdso]
3fffd2a8000-3fffd2c9000 r-xp 00000000 fd:00 2360785                      /usr/lib64/ld-2.15.so
3fffd2c9000-3fffd2ca000 r-xp 00020000 fd:00 2360785                      /usr/lib64/ld-2.15.so
3fffd2ca000-3fffd2cb000 rwxp 00021000 fd:00 2360785                      /usr/lib64/ld-2.15.so
3fffd2cb000-3fffd2cc000 rw-p 00000000 00:00 0 
3ffffd13000-3ffffd28000 rw-p 00000000 00:00 0                            [stack]
95%: Checks: 24, Failures: 0, Errors: 1
path_utils/path_utils_ut.c:253:E:path_utils:test_path_concat_neg:0: (after this point) Received signal 6 (Aborted)
FAIL: path_utils_ut

This is log from s390x - http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=609982, ppc64 only show a failure not the backtrace - http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=414594

Version-Release number of selected component (if applicable):
ding-libs-0.1.3-6.fc18.src.rpm

Additional information:
The crash first appeared when built with gcc 4.7. Both ppc and s390 builds (32-bit)) are OK.

Comment 1 Stephen Gallagher 2012-03-05 21:06:34 UTC
Reassigning to glibc. The exact same SRPM builds successfully in Koji against EPEL 6: http://koji.fedoraproject.org/koji/taskinfo?taskID=3853151
but fails against Fedora 17: http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=419468

I assume something broke in the compiler between then and now.

Comment 2 Dan Horák 2012-03-05 21:57:06 UTC
So there are 2 more things that I could try - F-16 gcc 4.6 with F-17 glibc (this combination should work) and F-17 gcc 4.7 with F-16 glibc (if possible at all).

On the other side the usual answer to "stack smashing detected" is that the application is wrong.

Comment 3 Jeff Law 2012-03-06 04:54:13 UTC
You're hitting a FOTIFY_SOURCE failure.  The *vast* majority of the time this is going to be a failure in the source package.  See the first two frames in the backtrace.

FORTIFY_SOURCE is a set of static and dynamic checks to detect common errors, particularly buffer overflows, overflows of fd_sets and the like.

Fedora 17 includes a newer glibc which has more checks, so that could easily explain the behaviour reported in c#1.

I'm reassigning this back to ding-libs until there's some solid evidence this is a glibc issue.

Comment 4 Stephen Gallagher 2012-03-06 16:20:24 UTC
Sorry for the noise. I did manage to identify the issue as an off-by-one error writing to a static buffer. A patch has now been submitted upstream.

Comment 5 Jeff Law 2012-03-06 16:27:12 UTC
No problem.  Glad you were able to track it down.

Comment 6 Stephen Gallagher 2012-03-06 16:40:18 UTC
Upstream ticket:
https://fedorahosted.org/sssd/ticket/1230

Comment 7 Fedora Update System 2012-03-16 12:49:03 UTC
ding-libs-0.1.3-8.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/ding-libs-0.1.3-8.fc17

Comment 8 Fedora Update System 2012-03-16 19:03:30 UTC
Package ding-libs-0.1.3-8.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing ding-libs-0.1.3-8.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-3930/ding-libs-0.1.3-8.fc17
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2012-03-21 18:51:32 UTC
ding-libs-0.1.3-8.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.