Commit Graph

746 Commits

Author SHA1 Message Date
Micah Lee
4ce1438a4d
Merge branch 'sedrubal-feature-use-octal-numbers' 2018-01-27 15:41:36 -08:00
Micah Lee
001e1ee4e4
Merge branch 'feature-use-octal-numbers' of https://github.com/sedrubal/torbrowser-launcher into sedrubal-feature-use-octal-numbers 2018-01-27 13:54:28 -08:00
Micah Lee
202d166e98
Merge branch 'cyphar-force-python2' 2018-01-27 13:53:38 -08:00
Micah Lee
24ffca2f31
Merge branch 'force-python2' of https://github.com/cyphar/torbrowser-launcher into cyphar-force-python2 2018-01-27 13:46:35 -08:00
Micah Lee
295d35909e
Merge branch 'kraai-version-number' 2018-01-27 13:42:46 -08:00
Matt Kraai
1425d79f88 Read the version number from ChangeLog.txt
Fixes #306
2018-01-24 18:45:29 -08:00
Roger Shimizu
60120aa261 Update AppStream metadata
Upgrade to the new spec of AppStream metadata:
 - https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html

And rename to share/metainfo/torbrowser.appdata.xml
2017-12-24 23:18:09 +09:00
Karl-Johan Karlsson
469331e569
Split print calls on newlines
If torbrowser-launcher cannot write to stdout, e.g. because it was
started in the background and the controlling terminal has been closed
or because it was started from a desktop environment launcher whose
stdout has been closed, it crashes after updating the GnuPG key.

This is due to print() crashing the program if stdout isn't writeable
and the string to print contains a newline.

To work around the problem, split the strings containing newlines into
several calls to print().

See also the upstream bug at https://bugs.python.org/issue32345

Closes #298
2017-12-16 12:52:00 +01:00
intrigeri
bc5f78f8d3 AppArmor: drop the usr.bin.torbrowser-launcher profile.
It's been broken since years and shipped in complain mode since 26 months.
It's now obvious that nobody cares enough about this profile to maintain it,
so let's drop it to avoid polluting system logs with tons of AppArmor messages:
with Linux 4.14, starting Tor Browser once triggers 27k+ such messages.
2017-10-26 11:16:58 +00:00
intrigeri
68f502c3fb AppArmor: grant access to mostly innocuous stuff Firefox tries to read.
I did not check in details why it needs that nowadays but this does not
increase the attack surface significantly, so let's allow it and don't
take the risk of breaking security critical stuff by denying it blindly.

If someone does the research and shows that it's safe to deny such access,
then we can do so.
2017-10-26 11:12:52 +00:00
intrigeri
d043788f59 AppArmor: add rules needed with new mediation support added in Linux 4.14. 2017-10-26 11:12:05 +00:00
intrigeri
0c74b866b4 AppArmor: allow the tor process to modify its data directory.
It's unclear to me why this is not needed _all the time_, but it does make sense
that at least in some circumstances, it needs to do that, e.g. to create
that directory.

Originally reported by Chris Lamb <lamby@debian.org> on
https://bugs.debian.org/876484.
2017-09-24 05:33:35 +00:00
Roger Shimizu
e732a8aa05 Update mirror list
Except the official site, there're only 3 working mirror in current
mirror list. So it's really necessary to update the list now.

Got the latest list from:
 - https://www.torproject.org/getinvolved/mirrors.html.en
And only keeps https links for security sake.
2017-09-24 11:55:15 +09:00
anonym
cf9f591fd8 Silence the AppArmor logs a bit more.
Tor Browser will always check for these directories and fail,
meanwhile needlessly spamming the journal with audit log entries.
2017-09-22 17:27:12 +02:00
intrigeri
72d385fb95 AppArmor: support sysvinit systems.
With systemd (at least on current Debian sid), /run/shm is a symlink to
/dev/shm, so "owner /dev/shm/org.chromium.* rw," is enough. With sysvinit,
apparently things are set up differently (perhaps the symlinks are in the
opposite direction?) so Firefox tries to access /run/shm/org.chromium.*,
which was rejected.

Let's support both!

Thanks to gregor herrmann <gregoa@debian.org> for the bug report:
https://bugs.debian.org/874383

Note that this problem happens with pristine 0.2.8 profiles,
without the changes brought by my apparmor-e10s branch.
2017-09-09 17:30:33 +00:00
intrigeri
6608523a5b AppArmor: grant plugin-container read-write access on the fontconfig cache.
Apparently it needs that to use & manage the cache.
2017-09-08 07:12:30 +00:00
intrigeri
c58b5afca4 AppArmor: improve comment about allowing sound. 2017-06-23 09:57:54 +00:00
intrigeri
da82f9ce12 AppArmor: merge lines to ease maintenance. 2017-06-23 09:46:33 +00:00
intrigeri
4a2501efd8 AppArmor: grant plugin-container write access to its temporary directory.
Otherwise e.g. printing to a PDF file fails.
2017-06-23 09:12:48 +00:00
intrigeri
3f8e6f93d7 AppArmor: move to plugin-container, and extend, the commented-out lines that help making sound work.
Apparently these permissions are now needed by plugin-container, not by the
master firefox process.
2017-06-23 08:56:51 +00:00
intrigeri
af8567e354 AppArmor: grant plugin-container write access to the Downloads directory.
Otherwise at least printing to a PDF file in that directory fails.
2017-06-23 08:06:51 +00:00
intrigeri
0fedf0d274 AppArmor: add missing library loading permissions.
Otherwise at least printing is broken.
2017-06-23 07:26:55 +00:00
intrigeri
0184abb400 Merge remote-tracking branch 'upstream-repo/master' into apparmor-e10s 2017-06-23 07:11:41 +00:00
Micah Lee
a20103c5d0
Version bump to 0.2.8, and updated changelog 2017-06-21 15:40:20 -07:00
Micah Lee
eb5ce69483
Merge branch 'dephekt-issue-271' 2017-06-20 17:45:11 -07:00
Micah Lee
062abe5bc4
Merge branch 'issue-271' of https://github.com/dephekt/torbrowser-launcher into dephekt-issue-271 2017-06-20 17:02:45 -07:00
Micah Lee
b4fbda449a
Merge branch 'intrigeri-apparmor-tb-7' 2017-06-20 15:36:13 -07:00
Micah Lee
e459d2e417
Merge branch 'apparmor-tb-7' of https://github.com/intrigeri/torbrowser-launcher into intrigeri-apparmor-tb-7 2017-06-20 15:36:03 -07:00
Micah Lee
68ad287b9a
Merge branch 'boklm-update_version_check_url' 2017-06-20 15:32:45 -07:00
Micah Lee
a11e699cd1
Merge branch 'update_version_check_url' of https://github.com/boklm/torbrowser-launcher into boklm-update_version_check_url 2017-06-20 15:24:52 -07:00
Micah Lee
b60187e497
Fix crash that happens if gpgme is not installed 2017-06-20 15:23:24 -07:00
intrigeri
33502fa036 AppArmor (refactoring): extract often used paths into variables. 2017-06-17 09:49:55 +00:00
intrigeri
c06722bafd AppArmor: add missing "owner" prefix, for consistency. 2017-06-17 09:39:09 +00:00
Nicolas Vigier
93e41c9e37
Update version_check_url
The Tor Browser update manifests have been moved from
dist.torproject.org to aus1.torproject.org:
https://trac.torproject.org/projects/tor/ticket/19481

The update_2 part of the URL has been changed to update_3:
https://trac.torproject.org/projects/tor/ticket/19316
2017-06-17 01:24:04 +02:00
intrigeri
76aca91a78 setup.py: install the new torbrowser.Browser.plugin-container profile. 2017-06-16 17:48:34 +00:00
intrigeri
b679ceee1b AppArmor: give plugin-container read-only access to the Tor Browser components it needs, and to user extensions. 2017-06-16 17:48:08 +00:00
intrigeri
6f6c8f995a AppArmor: remove lots of permissions the plugin-container process doesn't need. 2017-06-16 17:48:08 +00:00
intrigeri
9fee29d922 AppArmor: remove useless "Last modified" lines that don't convey any information. 2017-06-16 17:48:08 +00:00
intrigeri
3b0ef2a2b8 AppArmor: allow plugin-container to read/map/execute itself. 2017-06-16 17:48:08 +00:00
intrigeri
46ea9f3338 AppArmor: fully transition to plugin-container's own confinement when starting it, i.e. don't inherit Firefox' confinement.
We will later remove credentials plugin-container doesn't need, in order to
confine it more strictly. Such effort would be worthless if we kept inheriting
the permissions we grant the parent Firefox process.
2017-06-16 17:48:08 +00:00
intrigeri
a2bc002cbf AppArmor: create a new profile for Firefox' content rendering processes (plugin-container).
This profile was copied as-is from torbrowser.Browser.firefox, and I updated the
name of the profile and the corresponding local include only.
2017-06-16 17:48:08 +00:00
intrigeri
bf59f7efff AppArmor: allow access to /sys/devices/system/node/node[0-9]*/meminfo.
abstractions/base allows access to /proc/meminfo already, so this doesn't leak
much more information. I can't be sure by looking at the code, but I would
not be surprised if Firefox needed more info about available memory
to manage it pool of content rendering processes, when e10s is enabled.
2017-06-16 15:59:22 +00:00
intrigeri
dde0ffd5f9 AppArmor: allow access to /proc/PID/status.
This is consistent with how we handle similar files so far.
2017-06-16 15:52:43 +00:00
intrigeri
979b3d29a1 AppArmor: use the @{pid} tunable instead of hard-coding our own pattern. 2017-06-16 15:44:47 +00:00
intrigeri
88d862a382 AppArmor: silence denial logs about permissions we don't need.
As of Tor Browser 7.0.1:

 * /dev/dri/: we block access to the DRI nodes, so listing
   them would be useless
 * net/route: seems risky as it can leak information about IPs used on the LAN;
   Tor Browser seems to works perfectly without such access, so let's not
   grant it to be on the safe side
 * CPU maximum frequency:only used to optimize VP8/VP9 encoding
 * CPU cache size: seems unused
2017-06-16 15:43:35 +00:00
intrigeri
cdf52a6dc6 AppArmor: add permissions needed for multiprocess Firefox (e10s). 2017-06-16 15:19:52 +00:00
Dan Snider
452c99832e
Parse output of refresh_keys and display nicer output. 2017-04-23 18:41:24 -05:00
Dan Snider
445834e9c4
Use HKPS for GPG key refresh, add sks-keyservers' CA cert. 2017-04-22 10:17:33 -05:00
Dan Snider
87338d1c10
Only refresh the keyring, don't try to get new keys. 2017-04-21 17:01:49 -05:00
Dan Snider
6f77eb167c
common.py: Always call refresh_keyring prior to importing keys. 2017-04-13 17:35:01 -05:00