SyzyASan future |
|
Issue descriptionA few weeks ago, we discussed what to do with SyzyASan. It's not clear if we're going to prioritize it, but on the engineering side there was agreement what to do if we were to do anything, so let's write this down. SyzyASan is several things: 1. Using the syzygy framework to instrument chrome.dll in a post-build step 2. An alternate asan runtime that works better than the llvm asan runtime when running in the wild (crashkey integration, faster, filters out crashes due to bad injected third-party code, etc) General consensus is that we should use clang to write the right binary for 1 (this would mean we'd also end up with an instrumented chrome_child.dll, not just chrome.dll, which we'd then have to disable at runtime somehow, for perf reasons, and because chrome_child.dll crashes are redundant with crashes we get from clusterfuzz. rnk had ideas on how to do this.) General consensus for 2, including from llvm asan runtime folks (kcc) is that we should try and use the SyzyASan runtime with clang-compiler-instrumented code. Concretely, that'd mean extracting it from the syzygy repo, moving it into src.git, porting it over to chrome's base/ (it's currently written on top of an old clone of base), and then shipping. Hooking up clang instrumentation to the SyzyASan runtime is already done and passes "hello world". Intercepting calls to malloc etc could use help of the linker (llvm asan uses hotpatching which isn't very reliable); possibly with explicit support via lld-link, but maybe regular linker flags are enough. Seb also wrote an (internal-only) doc on this at https://docs.google.com/document/d/18qYwiaHzzzYy9e3w-qcaNNmjfkenJu9G2rACg6fjR40/edit?usp=gmail . Internal thread "Steps to shipping SyzyASan with Clang" on the internal syzygy list also has a bunch of information. If we do tackle this, we should make sure it's not Windows-specific but could be used on e.g. Android as well.
,
Mar 5 2018
It's not clear how we are going to ship an app that requires a kernel patch. Perhaps if Android made this kernel behavior mandatory starting with a certain API level, we could target that - but it would take at least 1.5 - 2 years to reach users.
,
Mar 28 2018
See issue 821764 for build config stuff that might need reinstating once we get around to this.
,
Apr 4 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/597be546a198483d3ce3316de6c86bec6d75043b commit 597be546a198483d3ce3316de6c86bec6d75043b Author: Sigurdur Asgeirsson <siggi@chromium.org> Date: Wed Apr 04 15:44:04 2018 Disable ASAN heap corruption unittests. The ASAN runtime doesn't detect heap corruption from uninstrumented code, and so the test fails to die. Bug: 818747, 827548 Change-Id: Ic8bd73c375887b3cf1de79b6fe5838cd31efa426 Reviewed-on: https://chromium-review.googlesource.com/992572 Commit-Queue: Sigurður Ásgeirsson <siggi@chromium.org> Reviewed-by: Nico Weber <thakis@chromium.org> Cr-Commit-Position: refs/heads/master@{#548074} [modify] https://crrev.com/597be546a198483d3ce3316de6c86bec6d75043b/base/tools_sanity_unittest.cc
,
Aug 2
Pam is collecting things an asan canary would've found at http://go/syzyasan-missed |
|
►
Sign in to add a comment |
|
Comment 1 by kcc@chromium.org
, Mar 5 2018