mardi 10 mars 2015

After reboot, a android SQLite file locksettings.db-shm was found unlabeled

I'm developing on Android 5.0 now, and I get these logs several times just after the device rebooted in low-power state(I'm not sure if low-power is relevant here).


I don't familiar with SQLite, but I have gone through the flow of ext4 file create, read, and how does selinux label the inode, and I don't see how can a ext4 file inode's xattr be corrupted.


In normal, it should appear like this:



u:object_r:system_data_file:s0 locksettings.db-shm
u:object_r:system_data_file:s0 locksettings.db-wal


I'll paste logs later.


Any help is appreciated..Thank you


---Scenario 1:--



**kmsg:**
<12>[ 26.034851s][pid:2758,cpu3,logd.auditd]type=1400 audit(1425430396.379:7):
avc: denied { write } for pid=3244 comm="system_server" name="locksettings.db- shm" dev="mmcblk0p40" ino=430823 scontext=u:r:system_server:s0 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0

**logcat:**
08:53:16.369 3244 3244 E SQLiteLog: (14) cannot open file at line 28606 of [9491ba7d73]
E SQLiteLog: (14) os_unix.c:28606: (13) open(/data/system/locksettings.db-shm) -
E SQLiteLog: (14) unable to open database file
E SQLiteLog: (14) cannot open file at line 28606 of [9491ba7d73]
E SQLiteLog: (14) os_unix.c:28606: (13) open(/data/system/locksettings.db-shm) -
E SQLiteDatabase: Failed to open database '/data/system/locksettings.db'.
E SQLiteDatabase: android.database.sqlite.SQLiteCantOpenDatabaseException: unable to open database file(Sqlite code 14): , while compiling: PRAGMA journal_mode,(OS error - 13:Permission denied)
E SQLiteDatabase: at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
E SQLiteDatabase: at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889)
E SQLiteDatabase: at android.database.sqlite.SQLiteConnection.executeForString(SQLiteConnection.java:634)
E SQLiteDatabase: at android.database.sqlite.SQLiteConnection.setJournalMode(SQLiteConnection.java:320)
E SQLiteDatabase: at android.database.sqlite.SQLiteConnection.setWalModeFromConfiguration(SQLiteConnection.java:291)
E SQLiteDatabase: at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:215)

Aucun commentaire:

Enregistrer un commentaire