Bug 2055179
| Summary: | test_asan_lc.c test case from upstream integration test suite segfaults on aarch64 | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Miloš Prchlík <mprchlik> |
| Component: | binutils | Assignee: | Nick Clifton <nickc> |
| binutils sub component: | system-version | QA Contact: | Miloš Prchlík <mprchlik> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | unspecified | ||
| Priority: | unspecified | CC: | fweimer, mprchlik, nickc, ohudlick, sipoyare |
| Version: | 8.6 | Keywords: | Bugfix, Triaged |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | aarch64 | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | binutils-2.30-114.el8 | Doc Type: | No Doc Update |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-11-08 10:45:15 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Miloš Prchlík
2022-02-16 12:44:14 UTC
(In reply to Miloš Prchlík from comment #0) > Description of problem: > > $ cat test_asan_lc.c > // Test asan with lc https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=876973 > // > // REQUIRES: clang > // RUN: %clang -fsanitize=address %s -o %t -lc > // RUN: %t > > #include <stdio.h> > int main(int argc, char **argv) > { > printf("Hello world!\n"); > return 0; > } Where did you find this test case? It seems to be a binutils bug. I am not sure how this is a binutils bug, but anyway... I assume that this problem only happens when address sanitization is used, and only for the AArch64, correct ? Is the seg-fault happening because [src1] is not aligned to an 8-byte boundary, or because it is an illegal address ? (I am assuming the latter). My best guess is that there is a bug in the address sanitization library code, possibly AArch64 specific, but without more details it is hard to say. (In reply to Nick Clifton from comment #2) > I am not sure how this is a binutils bug, but anyway... Florian has just pointed out to me that this is PR 28348... Reassinging. (In reply to Florian Weimer from comment #1) > (In reply to Miloš Prchlík from comment #0) > > Description of problem: > > > > $ cat test_asan_lc.c > > // Test asan with lc https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=876973 > > // > > // REQUIRES: clang > > // RUN: %clang -fsanitize=address %s -o %t -lc > > // RUN: %t > > > > #include <stdio.h> > > int main(int argc, char **argv) > > { > > printf("Hello world!\n"); > > return 0; > > } > > Where did you find this test case? It seems to be a binutils bug. It comes from upstream LLVM integration test suite, https://github.com/opencollab/llvm-toolchain-integration-test-suite/blob/main/tests/test_asan_lc.c Let me grab another aarch64 box, and get more details. It was fairly reproducible. Fixed in binutils-2.30-114.el8 Bumping ITM by one week to gain more time for testing. I got distracted by the fallout of the recent PSI outage. Verified with binutils-2.30-114.el8. $ export LSAN_OPTIONS=verbosity=1:log_threads=1 $ ./test_asan_lc.c.tmp ==16987==AddressSanitizer: failed to intercept '__isoc99_printf' ==16987==AddressSanitizer: failed to intercept '__isoc99_sprintf' ==16987==AddressSanitizer: failed to intercept '__isoc99_snprintf' ==16987==AddressSanitizer: failed to intercept '__isoc99_fprintf' ==16987==AddressSanitizer: failed to intercept '__isoc99_vprintf' ==16987==AddressSanitizer: failed to intercept '__isoc99_vsprintf' ==16987==AddressSanitizer: failed to intercept '__isoc99_vsnprintf' ==16987==AddressSanitizer: failed to intercept '__isoc99_vfprintf' ==16987==AddressSanitizer: failed to intercept 'xdr_destroy' ==16987==AddressSanitizer: failed to intercept 'crypt' ==16987==AddressSanitizer: failed to intercept 'crypt_r' ==16987==AddressSanitizer: failed to intercept '__cxa_throw' ==16987==AddressSanitizer: failed to intercept '__cxa_rethrow_primary_exception' ==16987==AddressSanitizer: libc interceptors initialized || `[0x201000000000, 0xffffffffffff]` || HighMem || || `[0x041200000000, 0x200fffffffff]` || HighShadow || || `[0x001200000000, 0x0411ffffffff]` || ShadowGap || || `[0x001000000000, 0x0011ffffffff]` || LowShadow || || `[0x000000000000, 0x000fffffffff]` || LowMem || MemToShadow(shadow): 0x001200000000 0x00123fffffff 0x009240000000 0x0411ffffffff redzone=16 max_redzone=2048 quarantine_size_mb=256M thread_local_quarantine_size_kb=1024K malloc_context_size=30 SHADOW_SCALE: 3 SHADOW_GRANULARITY: 8 SHADOW_OFFSET: 0x1000000000 ==16987==Installed the sigaction for signal 11 ==16987==Installed the sigaction for signal 7 ==16987==Installed the sigaction for signal 8 ==16987==T0: stack [0xffffc5d70000,0xffffc6570000) size 0x800000; local=0xffffc65643e0 ==16987==AddressSanitizer Init done Hello world! ==16988==Processing thread 16987. ==16988==Stack at 0xffffc5d70000-0xffffc6570000 (SP = 0xffffc65640d0). ==16988==TLS at 0xffff84dc4bb0-0xffff84dc5a40. $ Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (binutils bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:7693 |