From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 768F63858291; Mon, 20 Feb 2023 11:50:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 768F63858291 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676893851; bh=p3i1XYXy4cUxbPNVUJw1Wt4dUgsLUUtamnyIFCy5pDQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nFXGUaAOrzDF/n88spLTH5tVuT3ST5Ya2tK09wVzrggmuuFpmy0a6Paf2ROH3S6WR ya/sOwSC15h6zbsIyZxcoGcG+e5lQ+UdKHeYO4TaNR/zlnclvqCvpUGPt531U4/eMx HfjPSS0HbzkRF0XnGsidrD+NKEqRFxUZxyHeoJYM= From: "stsp at users dot sourceforge.net" To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/30134] DT_AUDIT is ignored for dlopen()ed solib Date: Mon, 20 Feb 2023 11:50:51 +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: 2.38 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal 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: security- X-Bugzilla-Changed-Fields: 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=3D30134 --- Comment #5 from Stas Sergeev --- (In reply to Florian Weimer from comment #4) > Maybe in theory, but it's not how the current implementation is structure= d. > It depends on an auditing flag in RELRO memory for hardening, so that the > auditing (function) pointers cannot be overwritten if the process did not > start with auditing enabled. Yes, I already "noticed" that. That's why my dlload_audit_module() patch is still not posted. :( But it will be posted sooner or later. Yes, I realize it may be rejected because it moves the audit list to rw space, but what should I do if I need that patch... Do you have any suggestion in that area while I am still polishing it? > We would also have to figure out all the small corner cases and work out > what to do for them. For example, auditing is currently a process-global > operation, and the auditing modules are never unloaded after being create= d. > Adding dlopen support might change that: auditing could perhaps be > restricted to the local search scope, and dlclose might unload the auditor > as well. Or not, it's hard to tell without some exploration. Yes, closing the module that had DT_AUDIT looks like a good place to unload the audit module as well, unless some other solib also had the same DT_AUDIT. So perhaps that would need a refcount. > We also have hard limits on the number of auditors. The explicit one > (namespace count) is perhaps somewhat easy to overcome, but there is also > the static TLS space consumption by new auditing namespaces. I am yet to understand why every audit module needs a new NS. Wouldn't it be possible to use one separate NS for all audit modules? --=20 You are receiving this mail because: You are on the CC list for the bug.=