OSDN Git Service

Validate all AVRCP packets before use to prevent out of bounds reads.
authorAjay Panicker <apanicke@google.com>
Tue, 5 Mar 2019 21:07:09 +0000 (13:07 -0800)
committerAjay Panicker <apanicke@google.com>
Wed, 13 Mar 2019 21:12:34 +0000 (14:12 -0700)
commit246808870db4eef63480314904ce558a24a27e0b
treea08c23c59b2573fc4412b233397fc9a8313cebfc
parent65a745526bef0991672240fbfed3f30b3ebb8ccc
Validate all AVRCP packets before use to prevent out of bounds reads.

If a packet arrives that is too short to read all the fields from, then
an out of bounds read occurs. This patch validates all recieved packets
before use.

Bug: 119562595
Test: run net_test_avrcp
Change-Id: Ifc1c0def1b411664facbbeb7e4d6e9c56ecc31c1
packet/avrcp/general_reject_packet.cc
packet/avrcp/general_reject_packet.h
packet/avrcp/register_notification_packet.cc
packet/tests/avrcp/avrcp_test_packets.h
packet/tests/avrcp/general_reject_packet_test.cc
profile/avrcp/device.cc
profile/avrcp/tests/avrcp_device_test.cc