Page MenuHomePhabricator

Reduce the amount of information leaked into stack traces
ClosedPublic

Authored by epriestley on Jun 15 2014, 2:17 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 18, 10:28 AM
Unknown Object (File)
Fri, Dec 13, 10:40 AM
Unknown Object (File)
Sun, Dec 8, 6:36 PM
Unknown Object (File)
Sun, Dec 8, 6:30 PM
Unknown Object (File)
Wed, Dec 4, 11:46 PM
Unknown Object (File)
Wed, Dec 4, 12:49 AM
Unknown Object (File)
Tue, Dec 3, 6:27 PM
Unknown Object (File)
Tue, Dec 3, 6:27 PM
Subscribers

Details

Summary

Via HackerOne. We currently expose the daemon log in the web UI. The utility of doing this is large, but stack traces may occasionally contain too much information.

Instead of printing out function arguments in stack traces, just print out the types. This is at least as useful in most cases, and can't leak anything sensitive.

Also, when possible, canonicalize paths in stack traces relative to a known library. This makes them slightly more readable, and may reduce the number of researchers reporting full path disclosure via HackerOne.

Test Plan

Ran something like this:

function f() {
  throw new Exception("ABCDEF");
}

f("a", 1, null, false, (object)array(), array(), new PhutilJSON());

...and got this stack trace:

>>> orbital ~/devtools/libphutil $ ./scripts/test/prompt.php 
[2014-06-14 19:14:45] EXCEPTION: (Exception) ABCDEF at [<phutil>/scripts/test/prompt.php:8]
  #0 f(string, integer, NULL, boolean, stdClass, array, PhutilJSON) called at [<phutil>/scripts/test/prompt.php:11]

Diff Detail

Repository
rPHU libphutil
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

epriestley retitled this revision from to Reduce the amount of information leaked into stack traces.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added reviewers: chad, btrahan.
chad edited edge metadata.
This revision is now accepted and ready to land.Jun 15 2014, 2:41 AM
epriestley updated this revision to Diff 22892.

Closed by commit rPHUe57d872cbe61 (authored by @epriestley).