From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 971F23858410; Fri, 17 Dec 2021 10:38:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 971F23858410 From: "evvers at ya dot ru" To: elfutils-devel@sourceware.org Subject: [Bug libdw/28710] New: ERROR: AddressSanitizer: SEGV on unknown address (on i386) Date: Fri, 17 Dec 2021 10:38:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: libdw X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: evvers at ya dot ru X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Dec 2021 10:38:42 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28710 Bug ID: 28710 Summary: ERROR: AddressSanitizer: SEGV on unknown address (on i386) Product: elfutils Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: libdw Assignee: unassigned at sourceware dot org Reporter: evvers at ya dot ru CC: elfutils-devel at sourceware dot org Target Milestone: --- Created attachment 13861 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D13861&action=3Ded= it File triggering ASan OSS-Fuzz reported a stack-use-after-return on i386 in https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3D42264. It can be reproduced on an x86_64 Fedora machine by installing libc.i686, zlib-devel.= i686 and libasan.i686 and building elfutils with -m32 ``` autoreconf -i -f ./configure --enable-maintainer-mode --disable-debuginfod --disable-libdebuginfod --without-bzlib --without-lzma --without-zstd= =20=20=20=20 --enable-sanitize-address CFLAGS=3D"-m32 -g -O1" CXXFLAGS=3D"-m32 -g -O= 1" make -j$(nproc) V=3D1 $ ASAN_OPTIONS=3Ddetect_stack_use_after_return=3D1 LD_LIBRARY_PATH=3D"./libdw;./libelf" ./src/stack --core ./oss-fuzz-42264 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D13653=3D=3DERROR: AddressSanitizer: stack-use-after-return on address= 0xf567a000 at pc 0xf7860e9b bp 0xffc10ae8 sp 0xffc10adc READ of size 4 at 0xf567a000 thread T0 #0 0xf7860e9a in dwfl_segment_report_module /home/vagrant/elfutils/libdwfl/dwfl_segment_report_module.c:556 #1 0xf786e251 in _new.dwfl_core_file_report /home/vagrant/elfutils/libdwfl/core-file.c:559 #2 0x804b78a in parse_opt /home/vagrant/elfutils/src/stack.c:595 #3 0xf7457d4d in argp_parse (/lib/libc.so.6+0x11ed4d) #4 0x804caaa in main /home/vagrant/elfutils/src/stack.c:695 #5 0xf735e468 in __libc_start_call_main (/lib/libc.so.6+0x25468) #6 0xf735e549 in __libc_start_main_impl (/lib/libc.so.6+0x25549) #7 0x804a57b in _start (/home/vagrant/elfutils/src/stack+0x804a57b) Address 0xf567a000 is located in stack of thread T0 at offset 0 in frame #0 0xf786d0ef in dwfl_report_core_segments /home/vagrant/elfutils/libdwfl/core-file.c:126 This frame has 1 object(s): [32, 88) 'phdr_mem' (line 137) ``` --=20 You are receiving this mail because: You are on the CC list for the bug.=