Last modified: 2013-09-05 17:02:07 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T54338, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 52338 - CentralAuth can allow logging in as any user, no password needed
CentralAuth can allow logging in as any user, no password needed
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
CentralAuth (Other open bugs)
master
All All
: Unprioritized blocker (vote)
: MW 1.22 version
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-31 19:27 UTC by Brad Jorsch
Modified: 2013-09-05 17:02 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Patch to fix both bugs (3.03 KB, patch)
2013-07-31 19:28 UTC, Brad Jorsch
Details
Patch to fix both bugs (3.08 KB, patch)
2013-07-31 20:26 UTC, Brad Jorsch
Details

Description Brad Jorsch 2013-07-31 19:27:33 UTC
I was testing change 76829, and I noticed that the JS check was firing on Special:UserLogout and logging me right back in. I investigated to see why, and discovered two bugs, that individually seem like nothing to worry about but combined allow someone to log in on any SUL wiki except loginwiki as any attached SUL user without having to supply a password.

#1 is that CentralAuthHooks::onUserLoadFromSession leaves a valid CentralAuthUser object for the user named in the centralauth_User cookie cached on the User object, even when the centralauth_Token doesn't match.

#2 is that Special:CentralAutoLogin assumes that CentralAuthUser::getInstance doesn't return a valid CentralAuthUser when the User isn't logged in. Which would normally be the case, except for bug #1.

Fixing either bug prevents the security hole. I'll attach a patch momentarily to fix both of them.
Comment 1 Brad Jorsch 2013-07-31 19:28:05 UTC
Created attachment 13033 [details]
Patch to fix both bugs
Comment 2 Brad Jorsch 2013-07-31 20:26:54 UTC
Created attachment 13038 [details]
Patch to fix both bugs

Add another small fix requested by Chris.
Comment 3 Chris Steipp 2013-07-31 22:18:03 UTC
Fix deployed (along with an unrelated change)
22:14 logmsgbot: csteipp synchronized php-1.22wmf12/extensions/CentralAuth 'eventlogging patch'

We'll release publicly as part of the next security release.
Comment 4 Chris Steipp 2013-09-05 17:02:07 UTC
This was assigned CVE-2013-4304

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links