Fix asan path translation loading a library twice.
An ASan binary may load a non-ASan library from /system if /data is not mounted yet. A dlopen() call for the same library later, when /data/ is available, will translate the path and attempt to load an ASan copy of the library from /data/asan/system. This way we may end up loading both ASan and non-ASan copies of the library in the same process, which is a very bad thing. This change adds a check for a loaded library with the non-translated real path before applying path translation. Bug: 63622872 Test: hide/rename a library in /data/asan; dlopen; restore the library; dlopen; check that the library from /data/asan is NOT loaded. Change-Id: I17060837f08dc3c665cab803dd89979d88f0a019
Loading
Please sign in to comment