Page MenuHomePhabricator

sysop access to ipinfo logs can leak IP addresses that sysops should not have access to
Closed, ResolvedPublicSecurity

Description

Currently, sysops have access to the IP info log (rOMWC9886463a1fba: Add IPInfo viewing rights for certain groups). This access can be exploited to determine IP addresses that a checkuser (or other users with access to account IP addresses) views, thus leaking checkuser data.

Example 1:

  1. A CheckUser reviews a SPI and notes that they will be making a check.
  2. The CU performs checks and views IP Info while doing so.
  3. The CU blocks or reports findings for the accounts in the SPI.
  4. A sysop can now correlate the IP info logs to determine IP contributions that the CU viewed.

Example 2:

  1. A account creation team member (confidentiality agreement required) views the IP Info for the IP associated with an account request.
  2. They then create the requested account.
  3. A sysop can now correlate the IP info logs with the account creation logs to determine IP for the created account.

These cases are exacerbated by the fact that users can unintentionally view IP info data since the infobox will remain uncollapsed once toggled to uncollapsed.

Details

Risk Rating
Low
Author Affiliation
Wikimedia Communities

Event Timeline

Maybe there should be some way to mark a certain view as being restricted? I.e. when a CU or an ACC looks at the ip info as part of being a CU or ACC, that log should only be visible to CU/stewards/Ombuds (and maybe??? also oversighters) but any other time they look at ip info it should be normal and auditable by admins

mmartorana triaged this task as Low priority.
mmartorana added a project: Vuln-Infoleak.
mmartorana changed Risk Rating from N/A to Low.

@mmartorana I disagree with the prioritisation. This has potential to leak NDA-only information to untrusted parties. In my opinion, that's High priority at least.

Unless someone else comes with a better solution, I plan to deploy the following as soon as possible (ie. on Monday morning):

urbanecm@notebook  ~/unsynced/gerrit/operations/mediawiki-config
$ git diff
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index d2e0c2823..2a51db051 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -3994,9 +3994,6 @@ if ( $wmgUseIPInfo ) {
        $wgGroupPermissions['autoconfirmed']['ipinfo'] = true;
        $wgGroupPermissions['autoconfirmed']['ipinfo-view-basic'] = true;

-       $wgGroupPermissions['sysop']['ipinfo-view-full'] = true;
-       $wgGroupPermissions['sysop']['ipinfo-view-log'] = true;
-
        $wgGroupPermissions['checkuser']['ipinfo-view-full'] = true;
        $wgGroupPermissions['checkuser']['ipinfo-view-log'] = true;
 }
urbanecm@notebook  ~/unsynced/gerrit/operations/mediawiki-config
$

Only ipinfo-view-log needs to be removed – sysops are intended to have ipinfo-view-full.

Only ipinfo-view-log needs to be removed – sysops are intended to have ipinfo-view-full.

Thanks for catching that. My brain read that as "view-full-log" for some reason. Updated patch:

urbanecm@notebook  ~/unsynced/gerrit/operations/mediawiki-config
$ git diff
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index d2e0c2823..36fc9c3fc 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -3995,7 +3995,6 @@ if ( $wmgUseIPInfo ) {
        $wgGroupPermissions['autoconfirmed']['ipinfo-view-basic'] = true;

        $wgGroupPermissions['sysop']['ipinfo-view-full'] = true;
-       $wgGroupPermissions['sysop']['ipinfo-view-log'] = true;

        $wgGroupPermissions['checkuser']['ipinfo-view-full'] = true;
        $wgGroupPermissions['checkuser']['ipinfo-view-log'] = true;
urbanecm@notebook  ~/unsynced/gerrit/operations/mediawiki-config
$

I was midway through collating things for T309928: Remove `ipinfo-view-log` from sysops as a centralisation task — entirely support @Urbanecm's proposal to remove access pending Legal's response (T307164#7963866)

n.b. consideration given to the fact that T309928 is public — I don't believe it reveals anything sensitive.
I also don't believe the above patch needs to be done outside of Gerrit (if that was your thinking @Urbanecm?)

+1 to removing ipinfo-view-log from sysop no later than Monday morning. I don't think this quite justifies an emergency Sunday change, but I also don't think we need to wait for Legal here.

AntiCompositeNumber raised the priority of this task from Low to Medium.Jun 5 2022, 3:02 AM

[...]
I also don't believe the above patch needs to be done outside of Gerrit (if that was your thinking @Urbanecm?)

It's actually not possible for config patches to not go into Gerrit :). I merely meant to give a heads-up "I am going to do this Monday morning" here, and I used the patch to indicate what I'm going to do exactly. Sorry if it confused you!

I did the revocation. I think discussion whether to re-enable it (and how) should happen in a follow-up task, since the info leak should be mitigated by the revocation.

SAL: urbanecm@deploy1002 Synchronized wmf-config/InitialiseSettings.php: b35c217163fc621bf68b982580dd68f317b08a55: Revoke ipinfo-view-log from sysop (T309411) (duration: 03m 04s)

sbassett changed Author Affiliation from N/A to Wikimedia Communities.
sbassett changed the visibility from "Custom Policy" to "Public (No Login Required)".
sbassett changed the edit policy from "Custom Policy" to "All Users".