summaryrefslogtreecommitdiff
path: root/libs/gui/BufferQueueThreadState.cpp
diff options
context:
space:
mode:
author Siarhei Vishniakou <svv@google.com> 2018-11-16 22:18:53 -0800
committer Siarhei Vishniakou <svv@google.com> 2018-11-21 10:52:39 -0800
commit1f7c0e47948127734714cc887356fce13d3c7538 (patch)
treec5b4331ff9a3a8c5cfb8a1a78035cc0ebdc29572 /libs/gui/BufferQueueThreadState.cpp
parent0f2f5c9327636d7bf7d8e342f7b561744ae604b1 (diff)
Sanitize InputMessage before sending
The struct InputMessage has many fields, and is force-aligned to 8-byte boundaries. There are also some padding fields that carry no information. This struct is typically allocated in the stack and populated with various values before being sent across as a stream of bytes through the socket. Therefore, the "unused" data portions of the struct could contain portions of the stack, since there aren't ever writes to those memory locations. To avoid this information leak, forcefully sanitize the struct. Create a new struct that is explicitly set to zero. Next, only fill the meaningful fields manually. Bug: 115739809 Test: atest Poc18_12, adb shell monkey 100000 Change-Id: I7e44dacf1e8fa3156c8e4d2f7784ef0c53dab507
Diffstat (limited to 'libs/gui/BufferQueueThreadState.cpp')
0 files changed, 0 insertions, 0 deletions