OSDN Git Service

Validate IpSecAlgorithm Length
authorNathan Harold <nharold@google.com>
Fri, 10 Nov 2017 00:49:33 +0000 (16:49 -0800)
committerNathan Harold <nharold@google.com>
Mon, 4 Dec 2017 23:12:14 +0000 (15:12 -0800)
commit3349b26630903dec820df3da84078fafc0bb8dbf
treecbff0d4a7d6d0d1771bf8539b39ef743e2f52b43
parentdb122f90d9e497b64f9e15dfb91fed98fbe18165
Validate IpSecAlgorithm Length

Improve the Validation of IpSecAlgorithm by
explicitly checking the length in addition to
the truncation length (previously an oversight).
In addition, we now check the lengths during
un-parceling, which will catch someone maliciously
manually building a parcel and passing it, bypassing
the checks in the constructor.

Bug: 68780091
Test: runtest -x IpSecAlgorithmTest.java
Change-Id: I8172762617264d34f47d5144336464510f07a701
core/java/android/net/IpSecAlgorithm.java
tests/net/java/android/net/IpSecAlgorithmTest.java [new file with mode: 0644]
tests/net/java/android/net/IpSecConfigTest.java