summaryrefslogtreecommitdiff
path: root/hostsidetests/security/src/android/security/cts/Poc17_03.java
diff options
context:
space:
mode:
Diffstat (limited to 'hostsidetests/security/src/android/security/cts/Poc17_03.java')
-rw-r--r--hostsidetests/security/src/android/security/cts/Poc17_03.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/hostsidetests/security/src/android/security/cts/Poc17_03.java b/hostsidetests/security/src/android/security/cts/Poc17_03.java
index 80c959c87ac..a6f1e042e62 100644
--- a/hostsidetests/security/src/android/security/cts/Poc17_03.java
+++ b/hostsidetests/security/src/android/security/cts/Poc17_03.java
@@ -82,4 +82,23 @@ public class Poc17_03 extends SecurityTestCase {
assertNotMatchesMultiLine(".*Fatal signal 11 \\(SIGSEGV\\).*>>> /system/bin/" +
"audioserver <<<.*", logcatOut);
}
+
+ /*
+ * b/33178389
+ */
+ @SecurityTest
+ public void testPocCVE_2017_0490() throws Exception {
+ String bootCountBefore =
+ AdbUtils.runCommandLine("settings get global boot_count", getDevice());
+ AdbUtils.runCommandLine("service call wifi 43 s16 content://settings/global/boot_count s16 "
+ + "\"application/x-wifi-config\"",
+ getDevice());
+ String bootCountAfter =
+ AdbUtils.runCommandLine("settings get global boot_count", getDevice());
+ // Poc nukes the boot_count setting, reboot to restore it to a sane value
+ AdbUtils.runCommandLine("reboot", getDevice());
+ getDevice().waitForDeviceOnline(60 * 1000);
+ updateKernelStartTime();
+ assertEquals(bootCountBefore, bootCountAfter);
+ }
}