Closed
Bug 1188716
Opened 9 years ago
Closed 9 years ago
Lockscreen can be bypassed with swiping while the device is booting (having the SIM pin lock facilitates it)
Categories
(Firefox OS Graveyard :: Gaia::System::Lockscreen, defect)
Tracking
(b2g-v2.0 wontfix, b2g-v2.0M wontfix, b2g-v2.1 fixed, b2g-v2.1S fixed, b2g-v2.2 fixed, b2g-v2.5 unaffected, b2g-v2.2r fixed, b2g-master unaffected)
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
b2g-v2.0 | --- | wontfix |
b2g-v2.0M | --- | wontfix |
b2g-v2.1 | --- | fixed |
b2g-v2.1S | --- | fixed |
b2g-v2.2 | --- | fixed |
b2g-v2.5 | --- | unaffected |
b2g-v2.2r | --- | fixed |
b2g-master | --- | unaffected |
People
(Reporter: nhirata, Assigned: gweng)
References
Details
(Keywords: sec-high, Whiteboard: [patch-b2g-main2.0+][patch-b2g-main2.1+])
Attachments
(4 files)
7.48 MB,
video/quicktime
|
Details | |
46 bytes,
text/x-github-pull-request
|
timdream
:
review+
fabrice
:
approval-gaia-v2.2+
cr
:
sec-approval+
|
Details | Review |
46 bytes,
text/x-github-pull-request
|
cr
:
sec-approval+
|
Details | Review |
46 bytes,
text/x-github-pull-request
|
cr
:
sec-approval+
|
Details | Review |
1. turn Sim pin on
2. set up lockscreen
3. reboot the device
4. while the device is booting swipe where the lockscreen swipe should be located
Expected: lockscreen appears
Actual: lockscreen is by passed and sim pin is requested.
Serial: 351dd0f2 (State: device)
Build ID 20150724001207
Gaia Revision 9dba58d18006e921546cec62c76074ce81e16518
Gaia Date 2015-07-23 12:36:57
Gecko Revision https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/41e10c6740be
Gecko Version 34.0
Device Name flame
Firmware(Release) 4.4.2
Firmware(Incremental) eng.cltbld.20150724.035246
Firmware Date Fri Jul 24 03:52:57 EDT 2015
Bootloader L1TC000118D0
Attached video shows issue. And yes, lockscreen was turned on.
Reporter | ||
Comment 1•9 years ago
|
||
Affected are master, 2.2, 2.1, 2.0 for the latest builds. 1.3 is not affected.
status-b2g-v2.2:
--- → affected
status-b2g-master:
--- → affected
Reporter | ||
Updated•9 years ago
|
Flags: needinfo?(ptheriault)
Flags: needinfo?(gweng)
Flags: needinfo?(cr)
Reporter | ||
Comment 2•9 years ago
|
||
I thought this bug is related to bug 1173284; decided to branch it out separately to avoid the confusion.
Assignee | ||
Comment 3•9 years ago
|
||
Thanks Naoki. I'll check this after landing the patch of Bug 1173284.
Assignee | ||
Comment 4•9 years ago
|
||
I've tested this bug and I think there is a more simple solution for these branches: since it's unlike Bug 1173284, at the moment users see the slider, the value usually has been read. So we could delay the slider to initialize itself until the value get read, which means the slider would be disabled until the value is read, thus no by-passing bugs anymore.
In Bug 1173284 we can't do that since user will have 3 seconds couldn't do anything even though the screen already shows the panel, but in this case there is no such long pending time.
Flags: needinfo?(gweng)
Assignee | ||
Comment 5•9 years ago
|
||
Tim: as I said, this is the quick and effective solution. If you think it's good, I will start to write tests and set approval (for other branches, too).
Attachment #8640403 -
Flags: feedback?(timdream)
Updated•9 years ago
|
Flags: needinfo?(cr)
Assignee | ||
Comment 6•9 years ago
|
||
Comment on attachment 8640403 [details] [review]
Patch for v2.2
It works well and passed all test on CI. And I also added a new unit test. So set the review flag.
Attachment #8640403 -
Attachment description: WIP patch for v2.2 → Patch for v2.2
Attachment #8640403 -
Flags: feedback?(timdream) → review?(timdream)
Updated•9 years ago
|
Assignee: nobody → gweng
Status: NEW → ASSIGNED
Updated•9 years ago
|
Attachment #8640403 -
Flags: review?(timdream) → review+
Assignee | ||
Comment 7•9 years ago
|
||
Comment on attachment 8640403 [details] [review]
Patch for v2.2
[Approval Request Comment]
[Bug caused by] (feature/regressing bug #): old regression; traceback to v1.3
[User impact] if declined: Secure flaw in occasional cases (see how QA reproduce it)
[Testing completed]: CI result:
https://treeherder.mozilla.org/#/jobs?repo=gaia&revision=ed424195d3c14bf7d0d48b9c74d00645df51166b
[Risk to taking this patch] (and alternatives if risky): No
[String changes made]: No
---
By the way, I don't know if this needs to be uplifted to 2.1 and 2.0. But if so, the solution remains the same. And there is no approval-gaia flag for 2.1 and 2.0 for this patch, so I don't know how to do that. Another issue is I don't know if uplift to old branches with a security needs a sec-approval or any other unusual requirements, so I ask here.
Attachment #8640403 -
Flags: approval-gaia-v2.2?(fabrice)
Comment 8•9 years ago
|
||
SIM PIN unlock happens after pass code unlock, so what's your theory of the mechanism that makes SIM PIN request affect unlocking? All I can think of is increasing system load during bootstrapping, enlarging the race window.
Marking as blocking bug 1189314.
Updated•9 years ago
|
Attachment #8640403 -
Flags: approval-gaia-v2.2?(fabrice) → approval-gaia-v2.2+
Assignee | ||
Comment 9•9 years ago
|
||
(In reply to Christiane Ruetten [:cr] from comment #8)
> SIM PIN unlock happens after pass code unlock, so what's your theory of the
> mechanism that makes SIM PIN request affect unlocking? All I can think of is
> increasing system load during bootstrapping, enlarging the race window.
>
> Marking as blocking bug 1189314.
I can easily reproduce it without a SIM card. But I agree that facilitates reproducing it.
Comment 10•9 years ago
|
||
Assignee | ||
Comment 11•9 years ago
|
||
Paul: I will try to get approval for v2.1, but I don't know what's about v2.0? Shall I uplift the patch for it?
Assignee | ||
Comment 12•9 years ago
|
||
Assignee | ||
Comment 13•9 years ago
|
||
I've found there is no approval flag for 2.1, too. I now don't know how to uplift that...
Assignee | ||
Comment 14•9 years ago
|
||
Assignee | ||
Comment 15•9 years ago
|
||
Change the title to make it matches the symptom.
Summary: Lockscreen can be bypassed with having the SIM pin lock and swiping while the device is booting → Lockscreen can be bypassed with swiping while the device is booting (having the SIM pin lock facilitates it)
Assignee | ||
Comment 16•9 years ago
|
||
I've test patches on v2.1 and v2.0. And they could guarantee that
Respect passcode timeout after rebooting: Yes
Respect timeout after setting it and before rebooting: Yes
With passcode, no bypassing while booting: Yes
Without passcode, no bypassing while booting: Yes
Secure app works without bypassing passcode: Yes
Unlocking to ordinary app works after passcode expired: Yes
Of course QA and sec-team need to verify them But if they don't cause any test failures I think they indeed fix the bug.
Comment 17•9 years ago
|
||
We still have CI coverage for the 2.1s branch, so we can merge the 2.1 PR and then merge 2.1->2.1s to get test results (under the assumption that the two branches are close enough to trust the results). However, we have no infra for testing 2.0 at this point, so we'd be flying blind if we land the patch on 2.0/2.0m.
Could we get additional QA help verifying these fixes (and probably basic smoketests still passing) if need-be? Note that we don't run Flame-KK builds on 2.1s, so we'd probably need to resort to manually building & flashing after the fix lands.
Comment 18•9 years ago
|
||
Greg also confirmed on IRC that this bug only pertains to fixing the older branches. Bug 1173284 was sufficient to fix master.
Comment 19•9 years ago
|
||
Naoki,
Please assign a QA resource to test this patch. Will request Ryan to uplift this to 2.0.
Thanks
Flags: needinfo?(nhirata.bugzilla)
Reporter | ||
Comment 20•9 years ago
|
||
Peter, Kevin, here is the patch for 2.0/2.1/2.2 uplift. Can you please have someone test these?
Updated•9 years ago
|
Attachment #8640403 -
Flags: sec-approval+
Updated•9 years ago
|
Attachment #8642284 -
Flags: sec-approval+
Updated•9 years ago
|
Attachment #8642293 -
Flags: sec-approval+
Comment 21•9 years ago
|
||
Vance,
in the attachments you find pull requests for backported patches for the lockscreen issue (main bug 1173284), but they may not be suitable for partners. Ask :gweng for a diff patch that's distributable to them. Feel free to send the following preliminary advisory along:
-----8<----------------
(Mozilla partner confidential, not for publication)
Mozilla has identified and fixed a vulnerability in Firefox OS that allows unauthorized access to devices locked with a pass code. If the user swipes right to unlock the device immediately when the lock screen appears after reboot, the pass code query would be skipped. Usually, this time window is too brief to be exploitable. However, it can be artificially elongated by stressing the event queue with premature, highly-frequent swiping, resulting in higher system load during boot-up. The time window is also elongated, for example, when the device is booking into an encrypted wireless network.
The technical reason for this behavior is a race condition in LockScreen which would rely on unsafe defaults until the actual user settings have been read back asynchronously. Our patch adds a safeguard to LockScreen that would not allow unlock attempts until the settings have been read back.
Flags: needinfo?(vchen)
Comment 22•9 years ago
|
||
I'm adding [patch-b2g-main*+] tags so we can keep track of patches for partners and community editions when they can't land in our repos.
Whiteboard: [patch-b2g-main2.0+][patch-b2g-main2.1+]
Comment 23•9 years ago
|
||
Updated•9 years ago
|
QA Contact: pcheng
Comment 24•9 years ago
|
||
The patch has already landed on v2.2 and v2.1. However on PVT website we stopped getting new builds on v2.1 for Flame since last month, so I tested the patch for v2.0 and v2.1 on Flame, as well as tested latest build on v2.2 Flame.
Confirmed that on all tested branches the original bug has been fixed.
Also tested the scenarios listed on comment 16 as best as I can since those descriptions are short and seem ambiguous.
Further tested the lockscreen particularly in the area of bypassing passcode and was unsuccessful.
Nothing else seemed broken by this patch. All tests look good.
Updated•9 years ago
|
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker)
Updated•9 years ago
|
Flags: needinfo?(ptheriault)
Reporter | ||
Updated•9 years ago
|
Flags: needinfo?(nhirata.bugzilla)
Updated•9 years ago
|
Group: core-security → b2g-core-security
Comment 25•9 years ago
|
||
Do we know what prevents this bug from closing? What's the action item here?
Flags: needinfo?(cr)
Comment 26•9 years ago
|
||
AFAICS there hasn't been a decision on the 2.0 backport from product and dev, yet. From our view it's a "nice to have". Once this bug is set to wontfix, fixed or unaffected, this bug can be closed. If you prefer we can close this bug and block tracking bug 1189314 with a dedicated 2.0 backport bug.
status-b2g-v2.5:
--- → unaffected
Flags: needinfo?(cr)
Comment 27•9 years ago
|
||
It looks like this was fixed in the trunk versions of b2g, so I'm going to mark this fixed. I'll leave the affected flags for the older versions of B2G.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Comment 28•9 years ago
|
||
Christiane, can you go ahead and file that dedicated 2.0 backport bug? Thanks.
Flags: needinfo?(cr)
Updated•9 years ago
|
Group: b2g-core-security → core-security-release
Comment 29•9 years ago
|
||
The tracking bug is bug 1189314. The decision was to not provide a backport for 2.0. Setting to wontfix.
Flags: needinfo?(vchen)
Updated•6 years ago
|
Group: core-security-release
You need to log in
before you can comment on or make changes to this bug.
Description
•