summaryrefslogtreecommitdiffstats
path: root/services/appwidget
diff options
context:
space:
mode:
authorHugo Benichi <hugobenichi@google.com>2016-03-02 13:31:52 +0900
committerAbhisek Devkota <ciwrl@lineageos.org>2017-02-03 23:17:31 +0000
commitef8dca814466776553100c5c51d16f7026eb8c88 (patch)
tree3b31b557b5d2e771e5c9ddd2efb16b7b5b74f2e6 /services/appwidget
parent012f0762275df7125358e8db352834af60495b43 (diff)
downloadframeworks_base-ef8dca814466776553100c5c51d16f7026eb8c88.zip
frameworks_base-ef8dca814466776553100c5c51d16f7026eb8c88.tar.gz
frameworks_base-ef8dca814466776553100c5c51d16f7026eb8c88.tar.bz2
Do not crash on malformed DHCP packets.
This fixes possible crashes with malformed DHCP packets. It is part of Android Security Bulletin of January 2017 and mitigates CVE CVE-2017-0389. Squash of: Author: Lorenzo Colitti <lorenzo@google.com> Date: Wed Mar 02 13:31:52 2016 +0900 Don't crash if we get a DHCP packet with the wrong port. This should only happen if we get a packet in the small time window between binding the packet socket and programming the BPF filter on it. Bug: 26696823 Change-Id: I481f1bc74bbaeb9646d96e1841d2a69acdb47d62 Author: Hugo Benichi <hugobenichi@google.com> Date: Wed Oct 05 18:33:21 2016 +0900 Catch runtime exceptions when parsing DHCP packets This patch adds a try catch all to DHCP packet parsing so that DhcpClient does not choke on malformed packets, brinding down with it the whole framework. Test: added new unit tests catching the issue fixed in this patch. Bug: 31850211 Change-Id: I3c50a149fed6b2cbc4f40bb4f0e5bb2b56859b44 Author: Hugo Benichi <hugobenichi@google.com> Date: Wed Oct 05 21:07:19 2016 +0900 Reject DHCP packets with no magic cookie This patch adds an explicit check in the DHCP packet parser for rejecting packets without a magic cookie, instead of relying on the top-level try-catch-all in the parser. This allows to add to DHCP error metrics this specific error. It also allows to add two poor man's fuzzing tests that tries to find additional gaps in the DHCP packet parser by - trying to parse all subslices of a valid offer packet. - trying to parse random byte arrays. Test: covered by previously introduced malformed DHCP packet unit tests + additional fuzzing tests. Bug: 31850211 Change-Id: If53c9ba9df78d7604ec018c9d67c237ae59c4833 Change-Id: Ic5a8fa4feb46cca325cb5c47616ee63b22d2e7c8 mh0rst: Backported to cm-13.0.
Diffstat (limited to 'services/appwidget')
0 files changed, 0 insertions, 0 deletions