From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3A44A3858C5E; Mon, 3 Apr 2023 09:28:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3A44A3858C5E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1680514099; bh=+fm/p6+84AcHWAfYZ9Z46hjHJ/xzkualvbHDU9chwBw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=AIJUR7jZMTqBq6cB/sCO0vJA5kTEFYgENAhJYvCA7cUpfSVbub1Y+Y/h5LZpwWvrM nIoiZIzzk74UmUyU8Z/NavvRDsdDWWVn2b5AUc8Eq8TN+7/hSFw4Es7Qu3EJa9BFfw Bp4skWDUdVyfl9vf3YcUHwLZqNHpW6unhC9HQ0RI= From: "stsp at users dot sourceforge.net" To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/30007] rfe: dlopen to specified address Date: Mon, 03 Apr 2023 09:28:16 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: dynamic-link X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: stsp at users dot sourceforge.net 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: attachments.created 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30007 --- Comment #33 from Stas Sergeev --- Created attachment 14799 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D14799&action=3Ded= it API description I am glad to finally present v10 which incorporated work on all the comments I got to v9, and that was a bit number. Thanks to all who contributed! I received a few mails that I ignore the comments and therefore my patches should not be looked into. I think this is a contradiction, because the only way to find out if I ignore any comments or not, is to look into the patches. But, to make that task easier, here's the changelog: Changes in v10: - addressed review comments of Adhemerval Zanella - moved refactor patches to the beginning of the serie to simplify review - fixed a few bugs in an elf relocation machinery after various hot discuss= ions - added a new test tst-dlmem-extfns that demo-implements dlopen_with_offset= 4() and fdlopen() - studied and documented all limitations, most importantly those leading to= UB - better documented premap callback as suggested by Szabolcs Nagy - added DLMEM_GENBUF_SRC flag for unaligned generic memory buffers As can be seen, ALL comments were addressed. And at the end of the day it doesn't even matter if that "elf parsing attack" was malicious or not. The main thing is that the problem is not there in v10, so who cares it is existed ever before. :) It motivated me to study every corner case when my loader actually failed to lay out elf segments properly. and as the result, there is a much better API description (attached here), "Limitations" section and a new flag DLMEM_GENBUF_SRC. These all are the measures against any possible failure to lay out an elf segments. So it can be firmly said that v10 have no such problem, and so, the comment was properly addressed and resolved. Thanks! --=20 You are receiving this mail because: You are on the CC list for the bug.=