Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 6597fa6f authored by qqzhou's avatar qqzhou Committed by Linux Build Service Account
Browse files

base: fix native crash in system_server

Currently PackageManagerService uses multi-thread to scan
packages to speed up, when scan each package, it sometimes
will call SELinux's restorecon, then libselinux uses global
variable fc_sehandle to selabel_lookup and write in compile_regex,
so it's not thread-safe, so will cause invalid address with
possibility. From backtrace, the final crash happens in pcre_exec.

Add one lock in NativeLibraryHelper to make restorecon safe.

Change-Id: I2f00b4d66d968642f1726c28f4f6dc766c1cdad7
CRs-Fixed: 1002406, 1027381
parent 8da16915
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment