diff options
author | Dimitry Ivanov <dimitry@google.com> | 2017-04-19 11:28:16 -0700 |
---|---|---|
committer | Moritz Horstmann <dev@peterzweg.at> | 2017-07-11 23:17:11 +0200 |
commit | 3a461fe0e6c0686a76f17ad3d37127293be543c8 (patch) | |
tree | c76d0d37aa44b58a45be765b96c7bc1f7e7b87eb | |
parent | 3aa4e506af80b531d7d9813f05bbf6e4c61e6d27 (diff) | |
download | android_bionic-3a461fe0e6c0686a76f17ad3d37127293be543c8.tar.gz android_bionic-3a461fe0e6c0686a76f17ad3d37127293be543c8.tar.bz2 android_bionic-3a461fe0e6c0686a76f17ad3d37127293be543c8.zip |
linker: remove link from external library on unloadHEADreplicant-6.0-0004-transitionreplicant-6.0-0004-rc6replicant-6.0-0004-rc5-transitionreplicant-6.0-0004-rc5replicant-6.0-0004-rc4replicant-6.0-0004-rc3replicant-6.0-0004-rc2replicant-6.0-0004-rc1replicant-6.0-0004replicant-6.0-0003replicant-6.0-0002cm-13.0
When unloading library make sure the soinfo_link to parent
from linked external libraries is removed as well.
Bug: 36104177
Bug: http://b/37433850
Test: manual
AOSP-Change-Id: I601b54144acecac54744805b38313c46045c54cb
(cherry picked from commit ee398f820700de30941fd82e38bd917e1513cbc6)
(cherry picked from commit b37d10cc8017c102530c096537890b7c6215ad2b)
(cherry picked from commit b928447d6ecda0e4c4c2b23092a3af0c65547826)
CVE-2017-0670
Change-Id: I459ec08a93a697a118c233c510f379e9100d401a
-rw-r--r-- | linker/linker.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp index 99c02d810..2573c8906 100644 --- a/linker/linker.cpp +++ b/linker/linker.cpp @@ -1666,6 +1666,9 @@ static void soinfo_unload(soinfo* root) { if (local_unload_list.contains(child)) { continue; } else if (child->is_linked() && child->get_local_group_root() != root) { + child->get_parents().remove_if([&] (const soinfo* parent) { + return parent == si; + }); external_unload_list.push_back(child); } else { depth_first_list.push_front(child); |