OSDN Git Service

DO NOT MERGE: IOMX: work against metadata buffer spoofing
authorLajos Molnar <lajos@google.com>
Tue, 2 Aug 2016 14:07:05 +0000 (07:07 -0700)
committerLajos Molnar <lajos@google.com>
Thu, 18 Aug 2016 21:29:49 +0000 (14:29 -0700)
commit9a4768f7bfcd4654f93ad9b22eff87df493a9d5e
tree6ce64deb9302b71b954bd076210592384598f082
parent0e2cc67785e417da3df72b3e7d8fcb792582b076
DO NOT MERGE: IOMX: work against metadata buffer spoofing

- Prohibit direct set/getParam/Settings for extensions meant for
  OMXNodeInstance alone. This disallows enabling metadata mode
  without the knowledge of OMXNodeInstance.
- Do not share metadata mode buffers cross process.
- Disallow setting up metadata mode/tunneling/input surface
  after first sendCommand. (Except to Idle for OMXCodec quirk.)
- Disallow store-meta for input cross process.
- Disallow emptyBuffer for surface input (via IOMX).
- Fix checking for input surface.

[backported from M]

Bug: 29422020
Change-Id: I801c77b80e703903f62e42d76fd2e76a34e4bc8e
include/media/IOMX.h
media/libmedia/IOMX.cpp
media/libstagefright/ACodec.cpp
media/libstagefright/OMXClient.cpp
media/libstagefright/include/OMX.h
media/libstagefright/include/OMXNodeInstance.h
media/libstagefright/omx/OMX.cpp
media/libstagefright/omx/OMXNodeInstance.cpp