aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/codeql-analysis.yml6
-rw-r--r--src/firejail/join.c2
-rw-r--r--src/firejail/main.c11
-rw-r--r--src/fnettrace/static-ip-map75
4 files changed, 88 insertions, 6 deletions
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 7f00fdea5..822c9b09f 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -53,7 +53,7 @@ jobs:
53 53
54 # Initializes the CodeQL tools for scanning. 54 # Initializes the CodeQL tools for scanning.
55 - name: Initialize CodeQL 55 - name: Initialize CodeQL
56 uses: github/codeql-action/init@b398f525a5587552e573b247ac661067fafa920b 56 uses: github/codeql-action/init@904260d7d935dff982205cbdb42025ce30b7a34f
57 with: 57 with:
58 languages: ${{ matrix.language }} 58 languages: ${{ matrix.language }}
59 # If you wish to specify custom queries, you can do so here or in a config file. 59 # If you wish to specify custom queries, you can do so here or in a config file.
@@ -64,7 +64,7 @@ jobs:
64 # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 64 # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
65 # If this step fails, then you should remove it and run the build manually (see below) 65 # If this step fails, then you should remove it and run the build manually (see below)
66 - name: Autobuild 66 - name: Autobuild
67 uses: github/codeql-action/autobuild@b398f525a5587552e573b247ac661067fafa920b 67 uses: github/codeql-action/autobuild@904260d7d935dff982205cbdb42025ce30b7a34f
68 68
69 # ℹī¸ Command-line programs to run using the OS shell. 69 # ℹī¸ Command-line programs to run using the OS shell.
70 # 📚 https://git.io/JvXDl 70 # 📚 https://git.io/JvXDl
@@ -78,4 +78,4 @@ jobs:
78 # make release 78 # make release
79 79
80 - name: Perform CodeQL Analysis 80 - name: Perform CodeQL Analysis
81 uses: github/codeql-action/analyze@b398f525a5587552e573b247ac661067fafa920b 81 uses: github/codeql-action/analyze@904260d7d935dff982205cbdb42025ce30b7a34f
diff --git a/src/firejail/join.c b/src/firejail/join.c
index 96d891a49..01fd6c41d 100644
--- a/src/firejail/join.c
+++ b/src/firejail/join.c
@@ -545,7 +545,7 @@ void join(pid_t pid, int argc, char **argv, int index) {
545 dbus_set_system_bus_env(); 545 dbus_set_system_bus_env();
546#endif 546#endif
547 547
548 start_application(0, shfd, NULL); 548 start_application(arg_join_network || arg_join_filesystem, shfd, NULL);
549 549
550 __builtin_unreachable(); 550 __builtin_unreachable();
551 } 551 }
diff --git a/src/firejail/main.c b/src/firejail/main.c
index c7da3c95c..12c2cf02b 100644
--- a/src/firejail/main.c
+++ b/src/firejail/main.c
@@ -824,7 +824,6 @@ static void run_cmd_and_exit(int i, int argc, char **argv) {
824 // try to join by name only 824 // try to join by name only
825 pid_t pid; 825 pid_t pid;
826 if (!read_pid(argv[i] + 16, &pid)) { 826 if (!read_pid(argv[i] + 16, &pid)) {
827
828 join(pid, argc, argv, i + 1); 827 join(pid, argc, argv, i + 1);
829 exit(0); 828 exit(0);
830 } 829 }
@@ -843,6 +842,10 @@ static void run_cmd_and_exit(int i, int argc, char **argv) {
843 exit(1); 842 exit(1);
844 } 843 }
845 844
845 if (argc <= (i+1))
846 just_run_the_shell = 1;
847 cfg.original_program_index = i + 1;
848
846 // join sandbox by pid or by name 849 // join sandbox by pid or by name
847 pid_t pid = require_pid(argv[i] + 15); 850 pid_t pid = require_pid(argv[i] + 15);
848 join(pid, argc, argv, i + 1); 851 join(pid, argc, argv, i + 1);
@@ -860,6 +863,10 @@ static void run_cmd_and_exit(int i, int argc, char **argv) {
860 exit(1); 863 exit(1);
861 } 864 }
862 865
866 if (argc <= (i+1))
867 just_run_the_shell = 1;
868 cfg.original_program_index = i + 1;
869
863 // join sandbox by pid or by name 870 // join sandbox by pid or by name
864 pid_t pid = require_pid(argv[i] + 18); 871 pid_t pid = require_pid(argv[i] + 18);
865 join(pid, argc, argv, i + 1); 872 join(pid, argc, argv, i + 1);
@@ -3220,7 +3227,7 @@ int main(int argc, char **argv, char **envp) {
3220 errExit("setresuid"); 3227 errExit("setresuid");
3221 3228
3222 char arg[64]; 3229 char arg[64];
3223 snprintf(arg, sizeof(arg), "--netlock=%d", getpid()); 3230 snprintf(arg, sizeof(arg), "--netlock=%d", sandbox_pid);
3224 3231
3225 char *cmd[3]; 3232 char *cmd[3];
3226 cmd[0] = BINDIR "/firejail"; 3233 cmd[0] = BINDIR "/firejail";
diff --git a/src/fnettrace/static-ip-map b/src/fnettrace/static-ip-map
index 97bed7a1f..d1ce29dac 100644
--- a/src/fnettrace/static-ip-map
+++ b/src/fnettrace/static-ip-map
@@ -33,6 +33,11 @@
33# 33#
34# 34#
35 35
36#
37# The following list of addresses was compiled from various public sources.
38#
39
40
36# local network addresses 41# local network addresses
37192.168.0.0/16 local network 42192.168.0.0/16 local network
3810.0.0.0/8 local network 4310.0.0.0/8 local network
@@ -81,19 +86,89 @@
81201.159.220.0/22 whois.lacnic.net Ecuador 86201.159.220.0/22 whois.lacnic.net Ecuador
82 87
83# some popular websites 88# some popular websites
8923.160.0.0/24 Twitch
9023.246.0.0/18, Netflix
8431.13.24.0/21 Facebook 9131.13.24.0/21 Facebook
8531.13.64.0/18 Facebook 9231.13.64.0/18 Facebook
9337.77.184.0/21 Netflix
9445.57.0.0/17 Netflix
9545.58.64.0/20 Dropbox
9645.113.128.0/22 Twitch
9752.223.192.0/18 Twitch
9863.245.208.0/23 Mozilla
8664.63.0.0/18 Twitter 9964.63.0.0/18 Twitter
10064.112.13.0/24 Dropbox
10164.120.128.0/17 Netflix
10266.197.128.0/17 Netflix
10369.53.224.0/19 Netflix
8769.171.224.0/19 Facebook 10469.171.224.0/19 Facebook
10591.105.192.0/23 Telegram
10691.108.4.0/22 Telegram
10791.108.8.0/21 Telegram
10891.108.16.0/21 Telegram
10991.108.56.0/22 Telegram
11091.189.88.0/24 Ubuntu One
11191.189.90.0/23 Ubuntu One
11291.189.92.0/23 Ubuntu One
11391.189.94.0/24 Ubuntu One
11495.161.64.0/20 Telegram
11599.181.64.0/18 Twitch
116103.53.48.0/23 Twitch
88104.244.40.0/21 Twitter 117104.244.40.0/21 Twitter
89129.134.0.0/16 Facebook 118129.134.0.0/16 Facebook
90140.82.112.0/20 GitHub 119140.82.112.0/20 GitHub
120103.10.124.0/23 Steam
121103.28.54.0/24 Steam
122108.160.160.0/20 Dropbox
123108.175.32.0/20 Netflix
124143.55.64.0/20 Github
125146.66.152.0/24 Steam
126146.66.155.0/24 Steam
127149.154.160.0/20 Telegram
128153.254.86.0/24 Steam
129155.133.224.0/22 Steam
130155.133.230.0/24 Steam
131155.133.232.0/23 Steam
132155.133.234.0/24 Steam
133155.133.236.0/22 Steam
134155.133.240.0/23 Steam
135155.133.245.0/24 Steam
136155.133.246.0/24 Steam
137155.133.248.0/21 Steam
91157.240.0.0/16 Facebook 138157.240.0.0/16 Facebook
139162.125.0.0/16 Dropbox
140162.213.32.0/22 Ubuntu One
141162.254.192.0/21 Steam
142185.2.220.0/22 Netflix
143185.9.188.0/22 Netflix
144185.25.182.0/23 Steam
145185.42.204.0/22 Twitch
146185.45.8.0/22 Dropbox
147185.76.151.0/24 Telegram
148185.105.164.0/24 Dropbox
149185.125.188.0/22 Ubuntu One
92185.199.108.0/22 GitHub 150185.199.108.0/22 GitHub
93188.64.224.0/21 Twitter 151188.64.224.0/21 Twitter
152190.217.33.0/24 Steam
94192.0.64.0/18 Wordpress 153192.0.64.0/18 Wordpress
154192.16.64.0/21 Twitch
155192.30.252.0/22 GitHub
156192.69.96.0/22 Steam
157192.108.239.0/24 Twitch
158192.173.64.0/18 Netflix
159192.189.200.0/23 Dropbox
160194.169.254.0/24 Ubuntu One
161198.38.96.0/19 Netflix
162198.45.48.0/20 Netflix
163199.9.248.0/21 Twitch
95199.16.156.0/22 Twitter 164199.16.156.0/22 Twitter
96199.59.148.0/22 Twitter 165199.59.148.0/22 Twitter
166205.185.194.0/24 Steam
167205.196.6.0/24 Steam
168207.45.72.0/22 Netflix
169208.64.200.0/22 Steam
170208.75.76.0/22 Netflix
171208.78.164.0/22 Steam
97208.80.152.0/22 Wikipedia 172208.80.152.0/22 Wikipedia
98 173
99# StackPath 174# StackPath