Opened 2 years ago

Closed 2 years ago

#23590 closed defect (not a bug)

Tor Browser needs write access to /dev/shm

Reported by: cypherpunks Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

A user on the Tor IRC was having problems running Tor Browser, with the browser not starting up and outputting an error:

Crash Annotation GraphicsCriticalError: |[0][GFX1-]: Failed 2 buffer

Searching the error gave few results, but eventually I stumbled across a blog post suggesting that the problem was related to the filesystem permissions of /dev/shm: https://gkiseki.wordpress.com/2017/07/25/slackware-currentの不具合/

On my system (Gentoo GNU/Linux), Tor Browser works, and /dev/shm is mode 1777 (readable/writable by all, with sticky bit set). On his system (Debian GNU/Linux), it is mode 755 instead (readable/writable by root, readable by world). When he switched to mode 1777, the browser finally opened, and the error went away.

Many systems have this directory set to mode 755 or even 700 permissions, which would suggest that these systems will not be able to run Tor Browser. I didn't look into this in detail, but it appears to be related to Glib's graphics handling.

Child Tickets

Change History (4)

comment:1 Changed 2 years ago by gk

Interesting, thanks. But the Firefox on the user's system is working fine they said (if I parse the chat backlog correctly). I wonder why that's the case or what we are doing differently...

comment:2 Changed 2 years ago by gk

Looking around I am actually not convinced this is a Tor Browser bug. Chrome has even an own error message for that pointing to chmod 1777:

[4856:4856:0820/085005:ERROR:shared_memory_posix.cc(258)] Unable to access(W_OK|X_OK) /dev/shm: Permission denied
[4856:4856:0820/085005:FATAL:shared_memory_posix.cc(260)] This is frequently caused by incorrect permissions on /dev/shm.  Try 'sudo chmod 1777 /dev/shm' to fix.

comment:3 in reply to:  2 Changed 2 years ago by yawning

Replying to gk:

Looking around I am actually not convinced this is a Tor Browser bug. Chrome has even an own error message for that pointing to chmod 1777:

[4856:4856:0820/085005:ERROR:shared_memory_posix.cc(258)] Unable to access(W_OK|X_OK) /dev/shm: Permission denied
[4856:4856:0820/085005:FATAL:shared_memory_posix.cc(260)] This is frequently caused by incorrect permissions on /dev/shm.  Try 'sudo chmod 1777 /dev/shm' to fix.

Yeah it's not. Normal users should be able to (among other things) create POSIX shared memory objects via shm_open(), and it is reasonable to expect that this will succeed.

comment:4 Changed 2 years ago by gk

Resolution: not a bug
Status: newclosed
Note: See TracTickets for help on using tickets.