Page MenuHomePhabricator
Feed Advanced Search

Feb 27 2018

epriestley added a comment to T4340: Implement Content-Security-Policy and Strict-Transport-Security headers.

(Offhand, it's actually not immediately clear to me whether unsafe-eval applies to style attributes or not. Presumably, it should. This is easy to test.)

Feb 27 2018, 1:47 PM · Phacility, Security
epriestley added a comment to T4340: Implement Content-Security-Policy and Strict-Transport-Security headers.

We use data: URIs to inline small images into CSS. For now, I'm going to allow these unconditionally. It's possible we could be more strict in the future, and allow data: as an img-src only in CSS files.

Feb 27 2018, 1:45 PM · Phacility, Security
epriestley added a comment to T4340: Implement Content-Security-Policy and Strict-Transport-Security headers.

We use inline style="..." attributes and can't realistically get rid of these in the short term. Although some of these are just laziness in obscure interfaces, quite a few are legitimate (for example, inline background-image for profile images, and inline computed width or position values for elements which can be moved or resized in Javascript). We could move more rendering to Javascript, but Phabricator "mostly sort of" works with Javascript disabled and I generally think this is desirable, so I think this would be a tradeoff, not a strict improvement.

Feb 27 2018, 1:34 PM · Phacility, Security
epriestley added a comment to T4340: Implement Content-Security-Policy and Strict-Transport-Security headers.

From PHI399:

Feb 27 2018, 1:33 PM · Phacility, Security

Feb 16 2018

epriestley added a comment to T13084: Phriction page links using URL encoding can be retargeted without editing.

A similar "attack" is to send a link to two destinations based on the viewer:

Feb 16 2018, 2:41 PM · Phriction, Security
epriestley closed T13084: Phriction page links using URL encoding can be retargeted without editing as Wontfix.
Feb 16 2018, 2:23 PM · Phriction, Security

Feb 14 2018

epriestley removed a project from T6960: Support %P in qsprintf(): Phacility.
Feb 14 2018, 1:09 PM · Security, Infrastructure

Feb 1 2018

epriestley closed T13037: An attacker gained staff access to Mailgun and was able to read customer API keys as Resolved.

My call with Mailgun was generally reassuring. Based on an uncharitable reading of the January 5th disclosure, my major concern was that they might be starting from a cultural position which was blind to internal actors as threats and everyone just used root / hunter2 written on a sticky note to log in to everything or something like that.

Feb 1 2018, 9:42 PM · Phacility, Security, Mail

Jan 31 2018

epriestley closed T12800: When Excel opens a CSV file, it just runs whatever arbitrary code might be in the file as Resolved by committing rPf9336e56940f: Mangle cells that look a little bit like formulas in CSV files.
Jan 31 2018, 11:33 PM · Security
epriestley added a comment to T13055: Maybe "translation.override" should be locked.

One attack is that you can override the content of email and then send invite or welcome mail that says whatever you want, whether the victim has a Phabricator account (welcome) or not (invite).

Jan 31 2018, 12:33 PM · Config, Security
epriestley triaged T13055: Maybe "translation.override" should be locked as Low priority.
Jan 31 2018, 4:20 AM · Config, Security
epriestley added a revision to T12800: When Excel opens a CSV file, it just runs whatever arbitrary code might be in the file: D18974: Mangle cells that look a little bit like formulas in CSV files.
Jan 31 2018, 12:25 AM · Security

Jan 30 2018

epriestley added a comment to T12800: When Excel opens a CSV file, it just runs whatever arbitrary code might be in the file.

This is relevant now that work related to T13049 has added CSV support.

Jan 30 2018, 11:54 PM · Security
epriestley added a comment to T13037: An attacker gained staff access to Mailgun and was able to read customer API keys.

(They got back to me and we're scheduling a call.)

Jan 30 2018, 7:01 PM · Phacility, Security, Mail
epriestley added a comment to T13037: An attacker gained staff access to Mailgun and was able to read customer API keys.

Mailgun has yet to respond to me after about three weeks, so I send them a followup.

Jan 30 2018, 3:25 PM · Phacility, Security, Mail

Jan 27 2018

epriestley moved T12046: PHPMailer RCE [CVE-2016-10033 and CVE-2016-10045] from Backlog to Future on the Mail board.
Jan 27 2018, 9:54 PM · Mail, Security
epriestley moved T13037: An attacker gained staff access to Mailgun and was able to read customer API keys from Backlog to Stamps/Failover on the Mail board.
Jan 27 2018, 9:54 PM · Phacility, Security, Mail

Jan 25 2018

epriestley added a revision to T13043: Improve authentication revocation behaviors: D18929: Add test coverage for SSH key revocation.
Jan 25 2018, 2:56 PM · Phacility, Auth, Security
epriestley added a revision to T13043: Improve authentication revocation behaviors: D18928: Make SSH key revocation actually prevent adding the same key back.
Jan 25 2018, 2:44 PM · Phacility, Auth, Security

Jan 23 2018

epriestley closed T13043: Improve authentication revocation behaviors as Resolved.

Add a temporary token revoker.
Add a session revoker.
Add an SSH key revoker.
Add a password revoker.
Add a VCS password revoker.

Jan 23 2018, 11:43 PM · Phacility, Auth, Security
epriestley added a comment to T13038: Meltdown and Spectre Speculative Branch Prediction Attacks.

The other thought I had was that using a cooperating subprocess and emitting signals to tell it to click a nanosecond-precision stopwatch might also make the attack more practical (or use pipes or domain sockets -- however you can get out of PHP with the lowest cost). They're probably all somewhat slow but likely better than microsecond-precision. Then you "just" need to get a cooperating binary onto the target host.

Jan 23 2018, 6:49 PM · Security
jboning added a comment to T13038: Meltdown and Spectre Speculative Branch Prediction Attacks.

Wow, I didn't mean for my two cents' worth of snark to cause such a stir! I do buy the argument that Phabricator isn't impacted by Meltdown/Spectre ("At least today, Herald rules are insufficiently expressive to allow an attacker to encode a speculative execution cache timing side channel attack.").

Jan 23 2018, 6:45 PM · Security
epriestley added a revision to T13043: Improve authentication revocation behaviors: D18916: Rename "PhabricatorPasswordHashInterface" to "PhabricatorAuthPasswordHashInterface".
Jan 23 2018, 4:12 PM · Phacility, Auth, Security
epriestley closed T4842: Log when a user's SSH keys are used and what IP accessed them as Resolved.

I believe this has been supported since D11543, in 2015. Specifically, log.ssh.format supports %k, and it appears to work as expected.

Jan 23 2018, 12:17 AM · Security, Auth, Diffusion

Jan 22 2018

epriestley added a revision to T13043: Improve authentication revocation behaviors: D18911: Document the "bin/auth revoke" tool.
Jan 22 2018, 6:15 PM · Phacility, Auth, Security
epriestley added a revision to T13043: Improve authentication revocation behaviors: D18910: Add "bin/auth revoke --list" to explain what can be revoked.
Jan 22 2018, 5:50 PM · Phacility, Auth, Security
epriestley added a revision to T12509: Plan the path forward from HMAC-SHA1: D18908: Mark all existing password hashes as "legacy" and start upgrading digest formats.
Jan 22 2018, 2:16 AM · Infrastructure, Security
epriestley added a revision to T13043: Improve authentication revocation behaviors: D18908: Mark all existing password hashes as "legacy" and start upgrading digest formats.
Jan 22 2018, 2:16 AM · Phacility, Auth, Security
epriestley added a revision to T13043: Improve authentication revocation behaviors: D18907: When administrators revoke SSH keys, don't include a "security warning" in the mail.
Jan 22 2018, 2:00 AM · Phacility, Auth, Security
epriestley updated the task description for T13043: Improve authentication revocation behaviors.
Jan 22 2018, 1:59 AM · Phacility, Auth, Security
epriestley added a revision to T13043: Improve authentication revocation behaviors: D18906: Add a rate limit for guessing old passwords when changing passwords.
Jan 22 2018, 1:52 AM · Phacility, Auth, Security
epriestley added a revision to T13043: Improve authentication revocation behaviors: Restricted Differential Revision.
Jan 22 2018, 1:34 AM · Phacility, Auth, Security
epriestley updated the task description for T13043: Improve authentication revocation behaviors.
Jan 22 2018, 1:20 AM · Phacility, Auth, Security
epriestley added a revision to T13043: Improve authentication revocation behaviors: D18904: Remove "passwordHash" and "passwordSalt" from User objects.
Jan 22 2018, 1:20 AM · Phacility, Auth, Security
epriestley added a revision to T13043: Improve authentication revocation behaviors: D18903: Move account passwords to shared infrastructure.
Jan 22 2018, 1:12 AM · Phacility, Auth, Security
epriestley updated the task description for T13043: Improve authentication revocation behaviors.
Jan 22 2018, 12:53 AM · Phacility, Auth, Security
epriestley updated the task description for T13043: Improve authentication revocation behaviors.
Jan 22 2018, 12:50 AM · Phacility, Auth, Security
epriestley added a revision to T13043: Improve authentication revocation behaviors: D18902: Bring new password validation into AuthPasswordEngine.
Jan 22 2018, 12:35 AM · Phacility, Auth, Security
epriestley added a revision to T13043: Improve authentication revocation behaviors: D18901: Remove "set password" from `bin/accountadmin` and let `bin/auth recover` recover anyone.
Jan 22 2018, 12:08 AM · Phacility, Auth, Security

Jan 21 2018

epriestley updated the task description for T13043: Improve authentication revocation behaviors.
Jan 21 2018, 11:16 PM · Phacility, Auth, Security
epriestley added a revision to T13043: Improve authentication revocation behaviors: D18900: Prepare the new AuthPassword infrastructure for storing account passwords.
Jan 21 2018, 11:15 PM · Phacility, Auth, Security
epriestley added a revision to T13043: Improve authentication revocation behaviors: D18899: Remove the "PhabricatorRepositoryVCSPassword" class and table.
Jan 21 2018, 4:12 PM · Phacility, Auth, Security
epriestley added a revision to T13043: Improve authentication revocation behaviors: D18898: Migrate VCS passwords to new shared password infrastructure.
Jan 21 2018, 4:02 PM · Phacility, Auth, Security
epriestley added a revision to T13043: Improve authentication revocation behaviors: D18897: Add test coverage to the PasswordEngine upgrade workflow and fix a few bugs.
Jan 21 2018, 3:44 PM · Phacility, Auth, Security
epriestley added a revision to T13043: Improve authentication revocation behaviors: D18896: Consolidate password verification/revocation logic in a new PhabricatorAuthPasswordEngine.
Jan 21 2018, 3:27 AM · Phacility, Auth, Security
epriestley added a revision to T13043: Improve authentication revocation behaviors: D18895: Add a "--force" flag to `bin/auth revoke`.
Jan 21 2018, 1:45 AM · Phacility, Auth, Security
epriestley added a revision to T13043: Improve authentication revocation behaviors: D18894: Add a more modern object for storing password hashes.
Jan 21 2018, 1:23 AM · Phacility, Auth, Security

Jan 20 2018

epriestley added a revision to T13043: Improve authentication revocation behaviors: D18893: Add a `bin/auth revoke` revoker for SSH keys.
Jan 20 2018, 5:19 PM · Phacility, Auth, Security
epriestley added a revision to T13043: Improve authentication revocation behaviors: D18892: Add a `bin/auth revoke` revoker for sessions.
Jan 20 2018, 5:01 PM · Phacility, Auth, Security
epriestley added a revision to T13043: Improve authentication revocation behaviors: D18891: Add a `bin/auth revoke` revoker for temporary tokens.
Jan 20 2018, 4:57 PM · Phacility, Auth, Security
epriestley updated the task description for T13043: Improve authentication revocation behaviors.
Jan 20 2018, 4:52 PM · Phacility, Auth, Security
epriestley added a comment to T13043: Improve authentication revocation behaviors.

See D17458 for the previous, narrower case of token revocation in response to Heartbleed (T12313).

Jan 20 2018, 4:45 PM · Phacility, Auth, Security
epriestley triaged T13043: Improve authentication revocation behaviors as Normal priority.
Jan 20 2018, 4:42 PM · Phacility, Auth, Security

Jan 18 2018

epriestley added a comment to T13038: Meltdown and Spectre Speculative Branch Prediction Attacks.

In theory, yes. But I suspect the actual required sample size may be on the scale of "heat death of the universe", potentially making this attack less practical than just brute forcing whatever secret you're trying to extract.

Jan 18 2018, 2:10 AM · Security
jboning added a comment to T13038: Meltdown and Spectre Speculative Branch Prediction Attacks.

Among other advanced capabilities, PHP instructions execute too slowly to allow a runtime program to distinguish between L1 cache access and main memory access.

Jan 18 2018, 12:05 AM · Security

Jan 6 2018

epriestley updated the task description for T13037: An attacker gained staff access to Mailgun and was able to read customer API keys.
Jan 6 2018, 3:26 PM · Phacility, Security, Mail
alexmv added a watcher for Security: alexmv.
Jan 6 2018, 1:02 AM

Jan 5 2018

epriestley closed T13038: Meltdown and Spectre Speculative Branch Prediction Attacks as Resolved.

Another quality Security update from Phabricator! 🐕

Jan 5 2018, 9:24 PM · Security
epriestley updated the task description for T13038: Meltdown and Spectre Speculative Branch Prediction Attacks.
Jan 5 2018, 9:13 PM · Security
epriestley triaged T13038: Meltdown and Spectre Speculative Branch Prediction Attacks as Normal priority.
Jan 5 2018, 9:13 PM · Security
epriestley added a comment to T13037: An attacker gained staff access to Mailgun and was able to read customer API keys.

Mostly from the HN thread, other possible providers we haven't tried yet include Mandrill, Postmark, and Sparkpost.

Jan 5 2018, 8:55 PM · Phacility, Security, Mail
epriestley added a comment to T13037: An attacker gained staff access to Mailgun and was able to read customer API keys.

T12677 documents previous general issues with mail providers. Mailgun gets the worst of it there, but just because we've been with them for a while without anything too awful happening.

Jan 5 2018, 8:20 PM · Phacility, Security, Mail
epriestley triaged T13037: An attacker gained staff access to Mailgun and was able to read customer API keys as Normal priority.
Jan 5 2018, 8:14 PM · Phacility, Security, Mail

Jan 4 2018

epriestley closed T13031: Prevent "enormous" commits from being pushed to hosted repositories in Diffusion by default as Resolved by committing rP53b25db91856: Prevent enormous changes from being pushed to repositoires by default.
Jan 4 2018, 6:02 PM · Herald, Security, Diffusion

Dec 26 2017

epriestley added a revision to T13031: Prevent "enormous" commits from being pushed to hosted repositories in Diffusion by default: D18850: Prevent enormous changes from being pushed to repositoires by default.
Dec 26 2017, 7:10 PM · Herald, Security, Diffusion

Dec 18 2017

epriestley added a comment to T13031: Prevent "enormous" commits from being pushed to hosted repositories in Diffusion by default.

Adjacently, some other parts of the UI currently use the word "enormous" (see https://discourse.phabricator-community.org/t/herald-enormous-check/822). They should be rewritten to use different language (like "Very Large"). We should use the term "Enormous" to mean only "too large to process completely", while the other UI uses it to mean "large enough to partially collapse for viewer convenience".

Dec 18 2017, 4:48 PM · Herald, Security, Diffusion
epriestley triaged T13031: Prevent "enormous" commits from being pushed to hosted repositories in Diffusion by default as Normal priority.
Dec 18 2017, 4:45 PM · Herald, Security, Diffusion

Nov 28 2017

ox added a comment to T8918: Header shows number of notifications and various other controls on the 2FA auth screen.

Thank you very much!

Nov 28 2017, 6:11 PM · Security, Auth
epriestley closed T8918: Header shows number of notifications and various other controls on the 2FA auth screen as Resolved.

I fumbled the task ID in D18793, but this should be resolved by that change.

Nov 28 2017, 6:05 PM · Security, Auth
epriestley added a revision to T8918: Header shows number of notifications and various other controls on the 2FA auth screen: D18793: Don't show personalized menu items until users establish a full session.
Nov 28 2017, 6:05 PM · Security, Auth

Nov 21 2017

quark.zju added a comment to T13012: Mercurial "--config" and "--debugger" command injection vulnerability.

That's a good point! I wish it was designed like that since the beginning. I guess it won't happen with the current compatibility rules since it is likely to break automation.

Nov 21 2017, 11:03 PM · Mercurial, Security
epriestley added a comment to T13012: Mercurial "--config" and "--debugger" command injection vulnerability.

In theory, you could require --config appear between hg and foo in hg foo .... This is already a valid position for --config (for example, hg --config x=y foo is valid), and already not a valid position for foo flags (for example, hg --branch default log is not valid).

Nov 21 2017, 9:26 PM · Mercurial, Security
quark.zju added a comment to T13012: Mercurial "--config" and "--debugger" command injection vulnerability.

https://phab.mercurial-scm.org/D1483 should make it possible to use -- to defend against non-flag user input. For inputs that are flags, use the form --flag=X and avoid --flag X.

Nov 21 2017, 9:09 PM · Mercurial, Security

Nov 13 2017

epriestley closed T13012: Mercurial "--config" and "--debugger" command injection vulnerability as Resolved.

We'll use the hardened mode once it's available, but I don't think we expect to take any further action here until then.

Nov 13 2017, 9:01 PM · Mercurial, Security

Nov 10 2017

epriestley updated the task description for T13012: Mercurial "--config" and "--debugger" command injection vulnerability.
Nov 10 2017, 5:04 PM · Mercurial, Security
epriestley updated the task description for T13012: Mercurial "--config" and "--debugger" command injection vulnerability.
Nov 10 2017, 5:03 PM · Mercurial, Security
epriestley updated the task description for T13012: Mercurial "--config" and "--debugger" command injection vulnerability.
Nov 10 2017, 4:58 PM · Mercurial, Security
epriestley updated the task description for T13012: Mercurial "--config" and "--debugger" command injection vulnerability.
Nov 10 2017, 4:46 PM · Mercurial, Security
epriestley added a comment to T13012: Mercurial "--config" and "--debugger" command injection vulnerability.

This is now in master so I've made the task public.

Nov 10 2017, 4:42 PM · Mercurial, Security
epriestley changed the visibility for T13012: Mercurial "--config" and "--debugger" command injection vulnerability.
Nov 10 2017, 4:42 PM · Mercurial, Security
epriestley added a revision to T13012: Mercurial "--config" and "--debugger" command injection vulnerability: D18769: Filter and reject "--config" and "--debugger" flags to Mercurial in any position.
Nov 10 2017, 4:22 PM · Mercurial, Security
epriestley added a comment to T13012: Mercurial "--config" and "--debugger" command injection vulnerability.

I don't want to leave RCE in Phabricator for 3 weeks, so I'm planning to land, deploy and disclose some version of the patch above today.

Nov 10 2017, 4:05 PM · Mercurial, Security
epriestley added a comment to T13012: Mercurial "--config" and "--debugger" command injection vulnerability.

(I change visibility for this to @epriestley, @amckinley and @durin42 for now -- note that I intend to eventually make this issue public once the fix hits the commit log, so don't stockpile all your 0-days here.)

Nov 10 2017, 3:50 PM · Mercurial, Security
epriestley shifted T13012: Mercurial "--config" and "--debugger" command injection vulnerability from the Restricted Space space to the S1 Core space.
Nov 10 2017, 3:48 PM · Mercurial, Security

Oct 3 2017

bcooksley added a comment to T12526: parse_url() behavior has changed with PHP7, causing libphutil unit tests to fail and possibly creating security concerns.

Not a problem - thanks for fixing that so quickly.
I can confirm that fixed the issue for us.

Oct 3 2017, 8:40 AM · libphutil, Security

Oct 2 2017

epriestley added a revision to T12526: parse_url() behavior has changed with PHP7, causing libphutil unit tests to fail and possibly creating security concerns: D18666: Fix an exception in the hyperlink remarkup rule for unparseable URIs.
Oct 2 2017, 2:14 PM · libphutil, Security

Sep 30 2017

epriestley added a comment to T12526: parse_url() behavior has changed with PHP7, causing libphutil unit tests to fail and possibly creating security concerns.

(I'll fix this if you don't get there first, but have used up all my brain energy for today. And thanks for the report!)

Sep 30 2017, 10:35 PM · libphutil, Security
epriestley added a comment to T12526: parse_url() behavior has changed with PHP7, causing libphutil unit tests to fail and possibly creating security concerns.

Would it be acceptable to change PhutilRemarkupHyperlinkRule to catch this exception and behave as if it were a non-whitelisted protocol? (Happy to draft the patch, just want to check before I do so)

Sep 30 2017, 10:32 PM · libphutil, Security
bcooksley added a comment to T12526: parse_url() behavior has changed with PHP7, causing libphutil unit tests to fail and possibly creating security concerns.

This change creates a slight problem for us at KDE as we have some historical commits in our Subversion repository which have URLs in them which are invalid. This exception means that:

  • Herald spins forever trying to process these commits, failing every single time (currently up to 855 failures).
  • The commit can't be viewed in the browser (See https://phabricator.kde.org/R883:271607)
Sep 30 2017, 9:27 PM · libphutil, Security

Sep 29 2017

bgamari added a watcher for Security: bgamari.
Sep 29 2017, 4:07 PM

Aug 22 2017

pouyana added a watcher for Security: pouyana.
Aug 22 2017, 12:26 PM

Aug 14 2017

epriestley closed T12961: [CVE-2017-1000117, et al] Git, Mercurial and Subversion could all execute arbitrary commands when interacting with malicious SSH URIs (`ssh://-...`) as Resolved.

There doesn't seem to be anything actionable remaining on our end.

Aug 14 2017, 8:07 PM · Subversion, Mercurial, Git, Security

Aug 12 2017

epriestley added a comment to T9408: Upgrading: `dot` (Graphviz) support removed, changes to `figlet` and `cowsay`.

In https://hackerone.com/reports/259246 (not currently disclosed) a researcher found an actual issue with figlet. Although it would probably be hard to develop into a practical attack, it does make me feel better about the decision to pull all this stuff into PHP (not just dot) when the dot issue was originally identified.

Aug 12 2017, 11:02 PM · Remarkup, Security, Installing & Upgrading

Aug 11 2017

epriestley added a comment to T12961: [CVE-2017-1000117, et al] Git, Mercurial and Subversion could all execute arbitrary commands when interacting with malicious SSH URIs (`ssh://-...`).

This cropped up in the HN thread -- works in my browsers (although Phabricator does not recognize it as a valid link):

Aug 11 2017, 8:07 PM · Subversion, Mercurial, Git, Security
avivey added a comment to T12961: [CVE-2017-1000117, et al] Git, Mercurial and Subversion could all execute arbitrary commands when interacting with malicious SSH URIs (`ssh://-...`).

Thanks for the writeup :)

Aug 11 2017, 7:04 PM · Subversion, Mercurial, Git, Security
indygreg added a comment to T12961: [CVE-2017-1000117, et al] Git, Mercurial and Subversion could all execute arbitrary commands when interacting with malicious SSH URIs (`ssh://-...`).

The reason the upstream projects aren't using -- is that it isn't portable. For example, Putty's ssh doesn't support it.

Aug 11 2017, 3:45 PM · Subversion, Mercurial, Git, Security
epriestley updated the task description for T12961: [CVE-2017-1000117, et al] Git, Mercurial and Subversion could all execute arbitrary commands when interacting with malicious SSH URIs (`ssh://-...`).
Aug 11 2017, 1:41 PM · Subversion, Mercurial, Git, Security
epriestley added a comment to T12961: [CVE-2017-1000117, et al] Git, Mercurial and Subversion could all execute arbitrary commands when interacting with malicious SSH URIs (`ssh://-...`).

The full set of mitigations is now available in stable, and I've promoted 2017 Week 32 (Mid August).

Aug 11 2017, 1:36 PM · Subversion, Mercurial, Git, Security
epriestley renamed T12961: [CVE-2017-1000117, et al] Git, Mercurial and Subversion could all execute arbitrary commands when interacting with malicious SSH URIs (`ssh://-...`) from Assess Impact of CVE-2017-1000117 et al (`ssh://-...` executing code) to [CVE-2017-1000117, et al] Git, Mercurial and Subversion could all execute arbitrary commands when interacting with malicious SSH URIs (`ssh://-...`).
Aug 11 2017, 1:31 PM · Subversion, Mercurial, Git, Security
epriestley added a comment to T12961: [CVE-2017-1000117, et al] Git, Mercurial and Subversion could all execute arbitrary commands when interacting with malicious SSH URIs (`ssh://-...`).

See also this enormously valuable contribution I made to the Git LFS upstream in connection with T7789 some time ago:

Aug 11 2017, 1:19 PM · Subversion, Mercurial, Git, Security