Skip to content

Security: amarbarosys/corewait

Security

SECURITY.md

Security

corewait runs perf or a device's simpleperf on a program you name, reads the samples, and shells out to objdump, adb and ssh. A security bug in how it handles a recording, a path or a device argument matters.

Report a vulnerability

Do not open a public issue. Use GitHub's private reporting: the Report a vulnerability button on the Security advisories page. Include the version, the command, and how to reproduce it.

You will get a reply within 7 days. A fix ships as a patch release with a note that credits you, unless you ask not to be named.

What corewait touches

  • record runs BINARY with the privileges of the user who ran corewait. On a phone it pushes BINARY to /data/local/tmp/corewait over adb; on the laptop device it uses the ssh target in CW_LAPTOP_SSH.
  • show, diff, budget, merge and jit read samples.tsv, stat.tsv, objdump.txt and meta.txt as untrusted input: bad lines fail with the line number, long instruction lines are cut at 4096 bytes.
  • record takes a lock file under CW_LOCK_DIR (default ~/.cache/corewait) for each phone.
  • A local recording reads the RAPL energy counters under /sys/class/powercap when they are readable.

Supported versions

Only the latest release gets fixes.

There aren't any published security advisories