commit | b9a10a82912cb33f05d44f0d0d2744edf5bc2d25 | [log] [tgz] |
---|---|---|
author | Luke Huang <huangluke@google.com> | Thu May 28 10:40:22 2020 +0000 |
committer | Luke Huang <huangluke@google.com> | Fri May 29 16:44:46 2020 +0000 |
tree | bcb4c9061e235a0f77712ad52b5edcabda5ce527 | |
parent | 638d7e4e02367ba25eecefb9f7fc05b4d740e459 [diff] |
Fix the side channel attack by using aysnc DnsResolver API with FLAG_NO_CACHE_STORE Before this CL, FLAG_NO_CACHE_STORE could be used to perform side channel attack. Because this flag ensures the result is never added to the cache, but will return a cached response if one exists. So make FLAG_NO_CACHE_STORE imply FLAG_NO_CACHE_LOOKUP to block the possibility of side channel attacking. Bug: 150371903 Test: atest Merged-In: I37391ffe315b90c0cdfd86888c6bf68b2b89f601 Change-Id: I94d8544d85c615ee985d70e9aeb8f368f100cf9b (cherry picked from commit 9931b28c98218dac4fa50288b4deb10da85073f1)
This code uses LOG(X) for logging. Log levels are VERBOSE,DEBUG,INFO,WARNING and ERROR. The default setting is WARNING and logs relate to WARNING and ERROR will be shown. If you want to enable the DEBUG level logs, using following command. adb shell service call dnsresolver 10 i32 1 VERBOSE 0 DEBUG 1 INFO 2 WARNING 3 ERROR 4 Verbose resolver logs could contain PII -- do NOT enable in production builds.