Opened 20 months ago

Closed 20 months ago

Last modified 20 months ago

#29559 closed defect (fixed)

meek-client-torbrowser should exit on stdin close, even while waiting on browser output

Reported by: dcf Owned by: dcf
Priority: Medium Milestone:
Component: Circumvention/meek Version:
Severity: Minor Keywords: network-team-roadmap-2019-Q1Q2
Cc: cohosh Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


Edit the browser extension not to output the meek-http-helper: listen line, or hack meek-client-torbrowser to break grepHelperAddress. Start Tor Launcher, select meek, and Connect. Now Cancel and exit Tor Browser. The bug is that meek-client-torbrowser and its child process firefox will continue running.

It happens because meek-client-torbrowser's TOR_PT_EXIT_ON_STDIN_CLOSE and SIGTERM logic happen only after grepHelperAddr. meek-client-torbrowser should pay attention to its stdin the whole time so that it can exit correctly in this case.

Child Tickets

Attachments (1)

0001-Look-for-EOF-on-stdin-while-grepping-for-the-helper-.patch (1.4 KB) - added by dcf 20 months ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 20 months ago by dcf

Status: newneeds_review

Here is a patch. It looks for the helper address in a background goroutine in order to simultaneously wait on sigChan.

This is the patch I used to test, breaking the grep pattern so that grepHelperAddress would not return.

  • meek-client-torbrowser/meek-client-torbrowser.go

    diff --git a/meek-client-torbrowser/meek-client-torbrowser.go b/meek-client-torbrowser/meek-client-torbrowser.go
    index 16f0ebc..2341cbc 100644
    a b import ( 
    4040// This magic string is emitted by meek-http-helper.
    41 var helperAddrPattern = regexp.MustCompile(`^meek-http-helper: listen (127\.0\.0\.1:\d+)$`)
     41var helperAddrPattern = regexp.MustCompile(`^meek-http-helper: listenXXX (127\.0\.0\.1:\d+)$`)
    4343func usage() {
    4444        fmt.Fprintf(os.Stderr, "Usage: %s [meek-client-torbrowser args] -- meek-client [meek-client args]\n", os.Args[0])

comment:2 Changed 20 months ago by dcf

Resolution: fixed
Status: needs_reviewclosed

comment:3 Changed 20 months ago by gaba

Keywords: network-team-roadmap-2019-Q1Q2 added
Note: See TracTickets for help on using tickets.