blob: e592d0f37845012f1dc38e3ce8bea29c0a564e74 [file] [log] [blame]
Andres Celisd1927e82017-10-05 15:49:07 -07001/**
Christopher Dombroski1e577702020-02-26 14:03:23 -08002 * Copyright (C) 2020 The Android Open Source Project
Andres Celisd1927e82017-10-05 15:49:07 -07003 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.security.cts;
18
19import android.platform.test.annotations.SecurityTest;
Christopher Dombroski1e577702020-02-26 14:03:23 -080020import org.junit.Test;
21import org.junit.runner.RunWith;
22import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
Andres Celisd1927e82017-10-05 15:49:07 -070023
Christopher Dombroski1e577702020-02-26 14:03:23 -080024import static org.junit.Assert.*;
25
26@RunWith(DeviceJUnit4ClassRunner.class)
Andres Celisd1927e82017-10-05 15:49:07 -070027public class Poc17_11 extends SecurityTestCase {
28
29 /**
Andres Celis52a8b0a2017-10-18 09:19:25 -070030 * b/36075131
31 */
Christopher Dombroski1e577702020-02-26 14:03:23 -080032 @Test
Max Spector6962ed72018-11-06 20:41:57 -080033 @SecurityTest(minPatchLevel = "2017-11")
Andres Celis52a8b0a2017-10-18 09:19:25 -070034 public void testPocCVE_2017_0859() throws Exception {
35 AdbUtils.runCommandLine("logcat -c", getDevice());
36 AdbUtils.pushResource("/cve_2017_0859.mp4", "/sdcard/cve_2017_0859.mp4", getDevice());
37 AdbUtils.runCommandLine("am start -a android.intent.action.VIEW " +
38 "-d file:///sdcard/cve_2017_0859.mp4" +
39 " -t audio/amr", getDevice());
40 // Wait for intent to be processed before checking logcat
41 Thread.sleep(5000);
Christopher Dombroski0b5e86a2019-07-25 16:48:56 -070042 AdbUtils.assertNoCrashes(getDevice(), "mediaserver");
Andres Celis52a8b0a2017-10-18 09:19:25 -070043 }
Andres Celisd1927e82017-10-05 15:49:07 -070044}