Revert "[RESTRICT AUTOMERGE] CTS test for Android Security b/62133227"
Bug: 62133227
Bug: 72443087
Bug: 157267059
Test: sts-tradefed
This reverts commit 62b9a5240830a91939e1c9fa1d7bb92c36ab6fe8.
Change-Id: I4e4a1e56e878ad969a843b8551d6d8172d716c9d
diff --git a/hostsidetests/securitybulletin/AndroidTest.xml b/hostsidetests/securitybulletin/AndroidTest.xml
index 13ffb8a..60b7df4 100644
--- a/hostsidetests/securitybulletin/AndroidTest.xml
+++ b/hostsidetests/securitybulletin/AndroidTest.xml
@@ -144,8 +144,7 @@
<!-- Bulletin 2017-09 -->
<!-- Please add tests solely from this bulletin below to avoid merge conflict -->
<option name="push" value="Bug-38195738->/data/local/tmp/Bug-38195738" />
- <option name="push" value="CVE-2017-0778->/data/local/tmp/CVE-2017-0778" />
-
+
<!--__________________-->
<!-- Bulletin 2017-10 -->
<!-- Please add tests solely from this bulletin below to avoid merge conflict -->
@@ -223,6 +222,8 @@
<!-- Please add 64-bit binary tests below to avoid merge conflict -->
+
+
<option name="append-bitness" value="false" />
</target_preparer>
diff --git a/hostsidetests/securitybulletin/res/cve_2017_0778.mp4 b/hostsidetests/securitybulletin/res/cve_2017_0778.mp4
deleted file mode 100644
index 84caa5a..0000000
--- a/hostsidetests/securitybulletin/res/cve_2017_0778.mp4
+++ /dev/null
Binary files differ
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0778/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0778/Android.bp
deleted file mode 100644
index 47f7187..0000000
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0778/Android.bp
+++ /dev/null
@@ -1,39 +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.
-
-cc_test {
- name: "CVE-2017-0778",
- defaults: ["cts_hostsidetests_securitybulletin_defaults"],
- srcs: [
- "poc.cpp",
- ":cts_hostsidetests_securitybulletin_memutils",
- ],
- include_dirs: [
- "frameworks/av/media/libstagefright/include",
- "frameworks/av/media/libmedia/include/",
- ],
- shared_libs: [
- "libstagefright",
- "libutils",
- "libstagefright_foundation",
- ],
- cflags: [
- "-Wall",
- "-Werror",
- "-Wno-unused-parameter",
- "-DCHECK_OVERFLOW",
- "-DFORCE_UNALIGN",
- "-DENABLE_SELECTIVE_OVERLOADING",
- ],
-}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0778/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0778/poc.cpp
deleted file mode 100644
index 41844d8..0000000
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0778/poc.cpp
+++ /dev/null
@@ -1,93 +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 <dlfcn.h>
-#include <media/DataSource.h>
-#include <media/stagefright/FileSource.h>
-#include <media/stagefright/MediaExtractor.h>
-#include <media/IMediaExtractor.h>
-#include <media/stagefright/MetaData.h>
-#include "../includes/memutils.h"
-#include "../includes/common.h"
-#define LIBNAME "/system/lib64/extractors/libmp4extractor.so"
-#define LIBNAME_APEX "/apex/com.android.media/lib64/extractors/libmp4extractor.so"
-
-using namespace android;
-char enable_selective_overload = ENABLE_NONE;
-
-int main(int argc, char **argv) {
- #if _32_BIT
- GetExtractorDef getDef = nullptr;
- if (argc < 2) {
- return EXIT_SUCCESS;
- }
-
- void *libHandle = dlopen(LIBNAME, RTLD_NOW | RTLD_LOCAL);
- if (!libHandle) {
- libHandle = dlopen(LIBNAME_APEX, RTLD_NOW | RTLD_LOCAL);
- if (!libHandle) {
- return EXIT_SUCCESS;
- }
- }
-
- getDef = (GetExtractorDef) dlsym(libHandle, "GETEXTRACTORDEF");
- if (!getDef) {
- dlclose(libHandle);
- return EXIT_SUCCESS;
- }
-
- sp < DataSource > dataSource = new FileSource(argv[1]);
- if (dataSource == nullptr) {
- dlclose(libHandle);
- return EXIT_SUCCESS;
- }
-
- void *meta = nullptr;
- void* creator = nullptr;
- FreeMetaFunc freeMeta = nullptr;
- float confidence;
- if (getDef().def_version == EXTRACTORDEF_VERSION_NDK_V1) {
- creator = (void*) getDef().u.v2.sniff(dataSource->wrap(), &confidence,
- &meta, &freeMeta);
- } else if (getDef().def_version == EXTRACTORDEF_VERSION_NDK_V2) {
- creator = (void*) getDef().u.v3.sniff(dataSource->wrap(), &confidence,
- &meta, &freeMeta);
- }
- if (!creator) {
- dlclose(libHandle);
- return EXIT_SUCCESS;
- }
-
- CMediaExtractor *ret = ((CreatorFunc) creator)(dataSource->wrap(), meta);
- if (ret == nullptr) {
- dlclose(libHandle);
- return EXIT_SUCCESS;
- }
-
- if (meta != nullptr && freeMeta != nullptr) {
- freeMeta(meta);
- }
-
- MediaExtractorCUnwrapper *mediaExtractorCUnwrapper =
- new MediaExtractorCUnwrapper(ret);
- MetaDataBase metaData;
- enable_selective_overload = ENABLE_MEMALIGN_CHECK | ENABLE_MALLOC_CHECK
- | ENABLE_REALLOC_CHECK;
- mediaExtractorCUnwrapper->getMetaData(metaData);
- enable_selective_overload = ENABLE_NONE;
- dlclose(libHandle);
- #endif /* _32_BIT */
- return EXIT_SUCCESS;
-}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/TestMedia.java b/hostsidetests/securitybulletin/src/android/security/cts/TestMedia.java
index e5f44fb..9dc30b4 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/TestMedia.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/TestMedia.java
@@ -41,18 +41,6 @@
******************************************************************************/
/**
- * b/62133227
- * Vulnerability Behaviour: SIGSEGV in self
- **/
- @SecurityTest(minPatchLevel = "2017-09")
- @Test
- public void testPocCVE_2017_0778() throws Exception {
- String inputFiles[] = {"cve_2017_0778.mp4"};
- AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2017-0778",
- AdbUtils.TMP_PATH + inputFiles[0], inputFiles, AdbUtils.TMP_PATH, getDevice());
- }
-
- /**
* b/112005441
* Vulnerability Behaviour: EXIT_VULNERABLE (113)
*/