5 bsc#1174284 - Firefox tab just crashed in FIPS mode |
5 bsc#1174284 - Firefox tab just crashed in FIPS mode |
6 |
6 |
7 diff --git a/security/sandbox/linux/Sandbox.cpp b/security/sandbox/linux/Sandbox.cpp |
7 diff --git a/security/sandbox/linux/Sandbox.cpp b/security/sandbox/linux/Sandbox.cpp |
8 --- a/security/sandbox/linux/Sandbox.cpp |
8 --- a/security/sandbox/linux/Sandbox.cpp |
9 +++ b/security/sandbox/linux/Sandbox.cpp |
9 +++ b/security/sandbox/linux/Sandbox.cpp |
10 @@ -647,16 +647,17 @@ void SetMediaPluginSandbox(const char* a |
10 @@ -650,16 +650,17 @@ void SetMediaPluginSandbox(const char* a |
11 SANDBOX_LOG_ERROR("failed to open plugin file %s: %s", aFilePath, |
11 SANDBOX_LOG_ERROR("failed to open plugin file %s: %s", aFilePath, |
12 strerror(errno)); |
12 strerror(errno)); |
13 MOZ_CRASH("failed while trying to open the plugin file "); |
13 MOZ_CRASH("failed while trying to open the plugin file "); |
14 } |
14 } |
15 |
15 |
16 auto files = new SandboxOpenedFiles(); |
16 auto files = new SandboxOpenedFiles(); |
17 files->Add(std::move(plugin)); |
17 files->Add(std::move(plugin)); |
18 files->Add("/dev/urandom", true); |
18 files->Add("/dev/urandom", SandboxOpenedFile::Dup::YES); |
19 + files->Add("/dev/random", true); |
19 + files->Add("/dev/random", SandboxOpenedFile::Dup::YES); |
20 files->Add("/etc/ld.so.cache"); // Needed for NSS in clearkey. |
20 files->Add("/etc/ld.so.cache"); // Needed for NSS in clearkey. |
21 files->Add("/sys/devices/system/cpu/cpu0/tsc_freq_khz"); |
21 files->Add("/sys/devices/system/cpu/cpu0/tsc_freq_khz"); |
22 files->Add("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq"); |
22 files->Add("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq"); |
23 files->Add("/proc/cpuinfo"); // Info also available via CPUID instruction. |
23 files->Add("/proc/cpuinfo"); // Info also available via CPUID instruction. |
24 files->Add("/proc/sys/crypto/fips_enabled"); // Needed for NSS in clearkey. |
24 files->Add("/proc/sys/crypto/fips_enabled"); // Needed for NSS in clearkey. |
26 files->Add("/proc/self/auxv"); // Info also in process's address space. |
26 files->Add("/proc/self/auxv"); // Info also in process's address space. |
27 #endif |
27 #endif |
28 diff --git a/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp b/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp |
28 diff --git a/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp b/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp |
29 --- a/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp |
29 --- a/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp |
30 +++ b/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp |
30 +++ b/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp |
31 @@ -308,16 +308,18 @@ void SandboxBrokerPolicyFactory::InitCon |
31 @@ -315,16 +315,18 @@ void SandboxBrokerPolicyFactory::InitCon |
32 policy->AddDir(rdwr, "/dev/dri"); |
32 policy->AddDir(rdwr, "/dev/dri"); |
33 } |
33 } |
34 |
34 |
35 // Bug 1575985: WASM library sandbox needs RW access to /dev/null |
35 // Bug 1575985: WASM library sandbox needs RW access to /dev/null |
36 policy->AddPath(rdwr, "/dev/null"); |
36 policy->AddPath(rdwr, "/dev/null"); |