Merge "[RESTRICT AUTOMERGE] CTS test for Android Security b/37761553" into pi-dev
diff --git a/hostsidetests/securitybulletin/AndroidTest.xml b/hostsidetests/securitybulletin/AndroidTest.xml
index 846eb4a..2d42961 100644
--- a/hostsidetests/securitybulletin/AndroidTest.xml
+++ b/hostsidetests/securitybulletin/AndroidTest.xml
@@ -190,7 +190,6 @@
<!--__________________-->
<!-- Bulletin 2018-11 -->
<!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="CVE-2018-9536->/data/local/tmp/CVE-2018-9536" />
<option name="push" value="CVE-2018-9539->/data/local/tmp/CVE-2018-9539" />
<!--__________________-->
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9536/Android.mk b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9536/Android.mk
deleted file mode 100644
index 38f35ea..0000000
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9536/Android.mk
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright (C) 2020 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := CVE-2018-9536
-LOCAL_MULTILIB := both
-LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
-LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
-LOCAL_SRC_FILES := poc.cpp
-LOCAL_C_INCLUDES := $(TOP)/external/aac/libFDK/include
-LOCAL_C_INCLUDES += $(TOP)/external/aac/libSYS/include
-LOCAL_C_INCLUDES += $(TOP)/cts/hostsidetests/securitybulletin/securityPatch/includes
-LOCAL_SHARED_LIBRARIES := libbluetooth
-
-# Tag this module as a cts test artifact
-LOCAL_COMPATIBILITY_SUITE := cts vts sts
-LOCAL_CTS_TEST_PACKAGE := android.security.cts
-
-LOCAL_ARM_MODE := arm
-LOCAL_CPPFLAGS += -Wall -Werror
-include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9536/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9536/poc.cpp
deleted file mode 100644
index 47d20e6..0000000
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9536/poc.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <dirent.h>
-#include <dlfcn.h>
-#include <signal.h>
-#include <string>
-#include <common.h>
-#include <FDK_bitbuffer.h>
-#define MAX_PATH_LENGTH 1035
-
-int main() {
- FILE *fp;
- char path[MAX_PATH_LENGTH];
- void *libHandle;
- static int (*real_FDK_getBitCnt)(HANDLE_FDK_BITBUF) = NULL;
- fp = popen("find / -name libbluetooth.so 2>/dev/null ", "r");
- if (fp == NULL) {
- return EXIT_SUCCESS;
- }
- while (fgets(path, sizeof(path) - 1, fp) != NULL) {
- path[strlen(path) - 1] = '\0'; /* remove \n */
-
- libHandle = dlopen(path, RTLD_LAZY);
- if (libHandle) {
- real_FDK_getBitCnt = (int (*)(
- HANDLE_FDK_BITBUF))dlsym(libHandle, "FDK_getBitCnt");
- dlclose(libHandle);
- if (real_FDK_getBitCnt) {
- pclose(fp);
- /* The symbol of function is present, it means there is no fix patch */
- return EXIT_VULNERABLE;
- }
- }
- }
- pclose(fp);
- return EXIT_SUCCESS;
-}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/TestMedia.java b/hostsidetests/securitybulletin/src/android/security/cts/TestMedia.java
index 5d3beac..0910f83 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/TestMedia.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/TestMedia.java
@@ -103,15 +103,6 @@
* existing test methods
******************************************************************************/
- /**
- * b/112662184
- * Vulnerability Behaviour: EXIT_VULNERABLE (113)
- **/
- @SecurityTest(minPatchLevel = "2018-11")
- @Test
- public void testPocCVE_2018_9536() throws Exception {
- AdbUtils.runPocAssertExitStatusNotVulnerable("CVE-2018-9536", getDevice(), 60);
- }
/******************************************************************************
* To prevent merge conflicts, add tests for Q below this comment, before any