From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 158B13858000; Fri, 17 Dec 2021 09:34:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 158B13858000 From: "mark at klomp dot org" To: elfutils-devel@sourceware.org Subject: [Bug libelf/28685] UBSan: member access within misaligned address 0x7ff316818032 for type 'struct Elf32_Phdr' Date: Fri, 17 Dec 2021 09:34:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: libelf X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mark at klomp dot org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: mark at klomp dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_reconfirmed_on bug_status everconfirmed assigned_to cc Message-ID: In-Reply-To: References: 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 09:34:11 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28685 Mark Wielaard changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2021-12-17 Status|UNCONFIRMED |ASSIGNED Ever confirmed|0 |1 Assignee|unassigned at sourceware dot org |mark at klomp dot o= rg CC| |mark at klomp dot org --- Comment #1 from Mark Wielaard --- > gelf_xlate.h:42:1: runtime error: member access within misaligned address= 0x7f019ba78032 for type 'struct Elf32_Phdr', which requires 4 byte alignme= nt > [...] > #0 0x7f019d8fa5ea in Elf32_cvt_Phdr /home/vagrant/elfutils/libelf/gelf_= xlate.h:42 #1 0x7f019d8f85f3 in elf32_xlatetom /home/vagrant/elfutils/libelf/elf32_xlatetom.c:104 #2 0x7f019d827a76 in dwfl_segment_report_module /home/vagrant/elfutils/libdwfl/dwfl_segment_report_module.c:472 I have to think about this one. Should we try to handle unaligned access in the xlateto functions? Those functions make use of a lot of tricky macros, which depend on the typ= es passed in. Or should we fix the called (dwfl_segment_report_module) to only pass corre= ctly aligned buffers to the xlateto function? The xlate functions translate between big/little endian on-disk/in-memory E= lf datastructure representations. --=20 You are receiving this mail because: You are on the CC list for the bug.=