Opened 9 months ago

Closed 8 months ago

Last modified 3 months ago

#32405 closed defect (fixed)

Crash immediately after bootstrap on Android

Reported by: sysrqb Owned by: sisbell
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-crash, tbb-9.0-issues, TorBrowserTeam201911R, tbb-backported
Cc: tbb-team Actual Points:
Parent ID: Points: .25
Reviewer: Sponsor:

Description

On Android, when bootstrapping completes we call an onFinish method. Unfortunately, in this method we assume a tab was already created. Apparently this is a bad assumption and the app crashes.

java.lang.NullPointerException:
  at org.mozilla.gecko.BrowserApp$34.onFinish (BrowserApp.java:3021)
  at org.mozilla.gecko.torbootstrap.TorBootstrapAnimationContainer.hide (TorBootstrapAnimationContainer.java:61)
  at org.mozilla.gecko.torbootstrap.TorBootstrapAnimationContainer$1.onFinish (TorBootstrapAnimationContainer.java:53)
  at org.mozilla.gecko.torbootstrap.TorBootstrapPager$1.finish (TorBootstrapPager.java:64)
  at org.mozilla.gecko.firstrun.FirstrunPanel.close (FirstrunPanel.java:83)
  at org.mozilla.gecko.torbootstrap.TorBootstrapPanel.updateStatus (TorBootstrapPanel.java:365)
  at org.mozilla.gecko.torbootstrap.TorLogEventListener$2.handleMessage (TorLogEventListener.java:123)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loop (Looper.java:216)
  at android.app.ActivityThread.main (ActivityThread.java:7188)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:494)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:975)

Child Tickets

Change History (11)

comment:1 Changed 9 months ago by gk

Keywords: tbb-crash added

comment:2 Changed 9 months ago by sysrqb

Cc: tbb-team added
Owner: changed from tbb-team to sisbell
Status: newassigned

comment:3 Changed 9 months ago by sisbell

I'm thinking we just put a null check around

    Tabs.getInstance().getSelectedTab().doReload(true);

If this code is skipped due to a null tab (race condition), then worst case is it won't reload the view, leaving the tab content improperly formatted.

comment:4 Changed 9 months ago by sisbell

Keywords: TorBrowserTeam201911R added; TorBrowserTeam201911 removed
Points: .25
Status: assignedneeds_review

I wasn't able to do a full clone of the tor-browser repo on github due to 2GB repo size limitation on github. I took the branch tor-browser-68.2.0esr-9.5-1 (without history) and made the following commit.

https://github.com/sisbell/tor-browser/commit/170876b6516539fef0580eeec9ae7ac252863eaf

comment:5 Changed 9 months ago by sisbell

As a note, when I imported to github it flagged 4 security vulnerabilities in the tor-browser libraries. Github automatically created pull requests for them.

https://github.com/sisbell/tor-browser/pulls

Security Issues
https://github.com/advisories/GHSA-rprw-h62v-c2w7
https://github.com/advisories/GHSA-3gx7-xhv7-5mx3
https://github.com/advisories/GHSA-x84v-xcm2-53pg
https://github.com/advisories/GHSA-mh33-7rrq-662w

comment:6 in reply to:  4 Changed 8 months ago by sysrqb

Resolution: fixed
Status: needs_reviewclosed

Replying to sisbell:

I wasn't able to do a full clone of the tor-browser repo on github due to 2GB repo size limitation on github. I took the branch tor-browser-68.2.0esr-9.5-1 (without history) and made the following commit.

https://github.com/sisbell/tor-browser/commit/170876b6516539fef0580eeec9ae7ac252863eaf

Thanks! Looks good to me. Picked as eb11dea87f544caa551c67530975c8765f598acd.

comment:7 Changed 8 months ago by sysrqb

Keywords: tbb-backport added

Backported this to tor-browser-68.3.0esr-9.0-1 as commit 4eb56ec0936e03dcc5d7e83322961c986065dc5d.

comment:8 Changed 8 months ago by sysrqb

Keywords: tbb-backported added

Tag as backported, too.

comment:9 Changed 8 months ago by cypherpunks

The logic is to replace tbb-backport with tbb-backported.

comment:10 Changed 8 months ago by ilf

+1 to follow (submitted this as dupe: https://trac.torproject.org/projects/tor/ticket/32693)

comment:11 Changed 3 months ago by gk

Keywords: tbb-backport removed
Note: See TracTickets for help on using tickets.