|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
commit 3ad5dab476205d6e16156cf0511fa6884b3b0fc4
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
Author: Florian Weimer <fweimer@redhat.com>
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
Date: Tue Jul 7 09:58:45 2020 +0200
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
elf: Do not signal LA_ACT_CONSISTENT for an empty namespace [BZ #26076]
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
The auditing interface identifies namespaces by their first loaded
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
module. Once the namespace is empty, it is no longer possible to signal
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
LA_ACT_CONSISTENT for it because the first loaded module is already gone
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
at that point.
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
diff --git a/elf/dl-close.c b/elf/dl-close.c
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
index 7fe91bdd9aaf694e..698bda929c0eab6c 100644
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
--- a/elf/dl-close.c
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
+++ b/elf/dl-close.c
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
@@ -795,8 +795,14 @@ _dl_close_worker (struct link_map *map, bool force)
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
if (__glibc_unlikely (do_audit))
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
{
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
struct link_map *head = ns->_ns_loaded;
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
- /* Do not call the functions for any auditing object. */
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
- if (head->l_auditing == 0)
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
+ /* If head is NULL, the namespace has become empty, and the
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
+ audit interface does not give us a way to signal
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
+ LA_ACT_CONSISTENT for it because the first loaded module is
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
+ used to identify the namespace.
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
+
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
+ Furthermore, do not notify auditors of the cleanup of a
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
+ failed audit module loading attempt. */
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
+ if (head != NULL && head->l_auditing == 0)
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
{
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
struct audit_ifaces *afct = GLRO(dl_audit);
|
|
![](https://seccdn.libravatar.org/avatar/fcc0873d860f7e6944b3abea5b6b447609288dcd55d37b92d3e9e9b1a1e81f06?s=16&d=retro) |
4c1956 |
for (unsigned int cnt = 0; cnt < GLRO(dl_naudit); ++cnt)
|