Thank you for your reponse.
I've added some preload apps and add some SELinux policies too.
I guess this issue came from PackageManagerService in the boot time.
 
I understand that it's hard to look without reproducing, I couldn't reproduce 
as I said though. 
So, I want to check my codes deeply, but I have no idea which part should I 
check..
 
Thanks. 
 
 
#06  pc = 0x744d3a68  JNI Stub method CODE OFFSET = 0292a9bc
               CODE SIZE = 292, FRAME SIZE = 128, METHOD_START = 0x744d39bc, 
c=1, add_stack=0
#07  pc = 0x7559b008  boolean android.os.SELinux.restorecon(java.io.File)
               CODE OFFSET = 039f1fac, CODE SIZE = 440, FRAME SIZE = 112, 
METHOD_START = 0x7559afac, c=1, add_stack=0
#08  pc = 0x75c7d2e4  void 
com.android.internal.content.NativeLibraryHelper.createNativeLibrarySubdir(java.io.File)
               CODE OFFSET = 040d3fac, CODE SIZE = 1280, FRAME SIZE = 96, 
METHOD_START = 0x75c7cfac, c=1, add_stack=0
#09  pc = 0x75c7c698  int 
com.android.internal.content.NativeLibraryHelper.copyNativeBinariesForSupportedAbi(com.android.internal.content.NativeLibraryHelper$Handle,
 java.io.File, java.lang.String[], boolean)
               CODE OFFSET = 040d364c, CODE SIZE = 496, FRAME SIZE = 144, 
METHOD_START = 0x75c7c64c, c=1, add_stack=0
#10  pc = 0x7f93de1d4c  android.content.pm.PackageParser$Package 
com.android.server.pm.PackageManagerService.scanPackageDirtyLI(android.content.pm.PackageParser$Package,
 int, int, long, android.os.UserHandle)
               CODE OFFSET = 00e3ebdc, CODE SIZE = 41632, FRAME SIZE = 512, 
METHOD_START = 0x7f93ddabdc, c=0, add_stack=0
#11  pc = 0x7f93de4f20  android.content.pm.PackageParser$Package 
com.android.server.pm.PackageManagerService.scanPackageLI(android.content.pm.PackageParser$Package,
 int, int, long, android.os.UserHandle)
               CODE OFFSET = 00e48e9c, CODE SIZE = 336, FRAME SIZE = 144, 
METHOD_START = 0x7f93de4e9c, c=0, add_stack=0
#12  pc = 0x7f93de6004  android.content.pm.PackageParser$Package 
com.android.server.pm.PackageManagerService.scanPackageLI(java.io.File, int, 
int, long, android.os.UserHandle)
               CODE OFFSET = 00e4900c, CODE SIZE = 9368, FRAME SIZE = 256, 
METHOD_START = 0x7f93de500c, c=0, add_stack=0
#13  pc = 0x7f93db7284  android.content.pm.PackageParser$Package 
com.android.server.pm.PackageManagerService.access$2300(com.android.server.pm.PackageManagerService,
 java.io.File, int, int, long, android.os.UserHandle)
               CODE OFFSET = 00e1b20c, CODE SIZE = 176, FRAME SIZE = 128, 
METHOD_START = 0x7f93db720c, c=0, add_stack=0
#14  pc = 0x7f93d99a7c  void com.android.server.pm.PackageManagerService$4.run()
               CODE OFFSET = 00dfd9fc, CODE SIZE = 976, FRAME SIZE = 144, 
METHOD_START = 0x7f93d999fc, c=0, add_stack=0
 
 
-----Original Message-----
From: "Stephen Smalley"<s...@tycho.nsa.gov> 
To: "HAN"<kk...@naver.com>; <seandroid-list@tycho.nsa.gov>; 
Cc: 
Sent: 2015-04-23 (목) 04:32:13
Subject: Re: [SELinux Question] I got an issue at libselinux.so and libpcre.so.
 
On 04/22/2015 10:41 AM, HAN wrote:
> Hello, 
> 
> Since I'm not good at english, so I can make some mistakes.
> 
> This is HAN who studies Android Lollipop developing.
> When my custom Lollipop image is downloaded and boot firstly, I got an
> issue at libselinux.so and libpcre.so.
> 
> I've got segmentation fault as below.
> I guess this segfault came from when SELinux was labelling some packages.
> 
> I've done debug as below backtrace.
> It says the segfault was started from pcre_exec.c(line 6844).
> 
> *#Debug Info
> *0000000000012ae0  : android/external/pcre/dist/pcre_exec.c:6844
> Link ->
> http://androidxref.com/5.1.0_r1/xref/external/pcre/dist/pcre_exec.c#6844
> 000000000000ba20  : android/external/libselinux/src/label_file.c:636
> Link ->
> 
http://androidxref.com/5.1.0_r1/xref/external/libselinux/src/label_file.c#636
> 000000000000ae48  : android/external/libselinux/src/label.c:102
> Link ->
> http://androidxref.com/5.1.0_r1/xref/external/libselinux/src/label.c#102
> 000000000000e440  : android/external/libselinux/src/android.c:1134
> Link ->
> http://androidxref.com/5.1.0_r1/xref/external/libselinux/src/android.c#1134
> 000000000000ebcc  : android/external/libselinux/src/android.c:1213
> Link ->
> http://androidxref.com/5.1.0_r1/xref/external/libselinux/src/android.c#1213
> 
> This issue appeared only one time and I wanted to add some debug logs.
> so I've tried to reproduce over 20 times,it doesn't appear though.
> 
> Is there any idea which part should I look at?

I don't see any way we could have triggered that without memory corruption.

You mentioned that you are using a custom Lollipop image; what have you
modified?

If you can reproduce it, then it would be interesting to get more
information about the arguments to pcre_exec().


_______________________________________________
Seandroid-list mailing list
Seandroid-list@tycho.nsa.gov
To unsubscribe, send email to seandroid-list-le...@tycho.nsa.gov.
To get help, send an email containing "help" to 
seandroid-list-requ...@tycho.nsa.gov.

Reply via email to