|author||Ken Chen <email@example.com>||Thu Jul 30 13:24:16 2020 +0800|
|committer||android-build-team Robot <firstname.lastname@example.org>||Wed Sep 16 23:29:15 2020 +0000|
Fix OOB read in DNS resolver The remote server specifies resplen, the length of the response it intends to send. anssiz represents the size of the destination buffer. If the reported resplen is larger than the anssiz, the code correctly only reads up to anssiz bytes, but returns resplen. so later functions will access far out of bounds. The fix ensures that the length of send_vc return does not exceed the buffer size. Bug: 161362564 Test: atest pass on HWAddressSanitizer build. Merged-In: Id4b5df1be4652e4623847b0b0bad0af65b80fdd5 Change-Id: Id4b5df1be4652e4623847b0b0bad0af65b80fdd5 (cherry picked from commit cf6ee247113426ef4e7365a86d00bb5430186802) (cherry picked from commit 5214c6bebaadfe307579ee930fc650235b157192)
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.