OSDN Git Service

libgui: Add test for OOB slot number in dequeue
authorDan Stoza <stoza@google.com>
Tue, 16 May 2017 22:12:48 +0000 (15:12 -0700)
committerDan Stoza <stoza@google.com>
Wed, 17 May 2017 20:32:35 +0000 (13:32 -0700)
commit47730d67169a3c12c50c1561f75cd0f619acc0f0
treefb0cd9f55a622195a0a9c2291f6f423b36a9108f
parent4820c841973f18ef81f3c0b8e186e8220dc80ed6
libgui: Add test for OOB slot number in dequeue

Adds a unit test that verifies that a malicious BnGraphicBufferProducer
cannot pass an invalid slot number to a Surface and thus cause the
Surface to segfault (or otherwise access out-of-bounds memory).

Bug: 36991414
Test: The new Malicious* tests pass after applying the security patch
Change-Id: I2083465a496cfcc8e8c3b3bc288f5f6904005ac3
libs/gui/tests/Android.bp
libs/gui/tests/Malicious.cpp [new file with mode: 0644]