brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.66k stars 2.3k forks source link

hardening causes traps and crash with Brave Browser 94.1.30.86 #19613

Open commandline-be opened 2 years ago

commandline-be commented 2 years ago

Description

Having enabled a few hardening options in sysctl i now find not few chromium related application to crash, among which also Brave Browser 94.1.30.86

Steps to Reproduce

  1. start brave

Actual result:

here is an output of repatedly starting brave

[14655.534848] traps: brave[123147] trap invalid opcode ip:55e18bb7167d sp:7ffc01d75100 error:0 in brave[55e1878d2000+9a7c000] [14656.589711] traps: brave[123159] trap invalid opcode ip:55e18bb7167d sp:7ffc01d75020 error:0 in brave[55e1878d2000+9a7c000] [14659.446670] traps: brave[123383] trap invalid opcode ip:55e18f0cd59d sp:7ffc01d76890 error:0 in brave[55e1878d2000+9a7c000] [14664.454641] traps: ThreadPoolForeg[123363] trap invalid opcode ip:55e18bb7167d sp:7f6b93dcabe0 error:0 in brave[55e1878d2000+9a7c000] [14669.973946] traps: brave[123640] trap invalid opcode ip:55a959cf067d sp:7ffe77bcbde0 error:0 in brave[55a955a51000+9a7c000] [14671.004425] traps: brave[123652] trap invalid opcode ip:55a959cf067d sp:7ffe77bcbaf0 error:0 in brave[55a955a51000+9a7c000] [14671.009907] traps: brave[123578] trap invalid opcode ip:55a959cf067d sp:7ffe77bc2e10 error:0 in brave[55a955a51000+9a7c000] [37647.951593] traps: brave[305364] trap invalid opcode ip:55a3f3fa767d sp:7f92532dd5c0 error:0 in brave[55a3efd08000+9a7c000] [37682.766144] traps: brave[305846] trap int3 ip:55e12f90867d sp:7fffc73aab50 error:0 in brave[55e12b669000+9a7c000] [37704.045189] traps: ThreadPoolForeg[306004] trap invalid opcode ip:55e12f90867d sp:7f92d03f9cc0 error:0 in brave[55e12b669000+9a7c000] [37704.049833] traps: brave[305765] trap invalid opcode ip:55e12e9985e2 sp:7fffc73aa220 error:0 in brave[55e12b669000+9a7c000] [37810.790902] traps: ThreadPoolForeg[306996] trap invalid opcode ip:55add9f6567d sp:7fcbfd546e10 error:0 in brave[55add5cc6000+9a7c000] [37811.981975] traps: Chrome_ChildIOT[307854] trap invalid opcode ip:55add9f6567d sp:7fcbfed49650 error:0 in brave[55add5cc6000+9a7c000] [37856.847881] traps: brave[308349] trap invalid opcode ip:55add9f6567d sp:7ffd55d39410 error:0 in brave[55add5cc6000+9a7c000] [37856.851035] traps: brave[309185] trap invalid opcode ip:55add8ff55e2 sp:7ffd55d39320 error:0 in brave[55add5cc6000+9a7c000]

Expected result:

brave works without crashing

Reproduces how often:

100%

Brave version (brave://version info)

Brave Browser 94.1.30.86 on Ubuntu Linux 21.04

Version/Channel Information:

Other Additional Information:

Miscellaneous Information:

likely candidate to cause these crashes

sysctl setting kernel.yama.ptrace_scope = 2

commandline-be commented 2 years ago

Clicked on 'send now' for roughly 10 crash reports but there is no sign of progress these are actually sent. The setting is to automatically send crash reports to Brave, not sure what this implies.

Crash from Monday, September 27, 2021 at 12:09:31 PM Status: Not uploaded
Local Crash Context: d79cb3fe-5151-4f31-bb5b-6a3be59d6c75

oh! some time later:

Status: Upload requested by user
commandline-be commented 2 years ago

the root cause is still somewhat uncertain

the changes made were for user.max_*_namespaces which were to all appearances at an excess value of 119431 and for user.max_user_namespaces lowered to 16000

after clearing the user.max_user_namespaces setting and letting the system decide this is now back at 119431 but brave appears to function without exit or crash.

it does appear possible there are one or two url which instigate the unexpected stop for brave-browser but these have yet to be identified, possibly correlation not causation

commandline-be commented 2 years ago
Status: Uploaded
Uploaded Crash Report ID: 95690900-955d-4b07-0000-000000000000
Upload Time: Sunday, November 21, 2021 at 5:58:51 PM
commandline-be commented 2 years ago

backtraces can be generated on request

commandline-be commented 2 years ago

crashes have not reoccurred in more recent versions of Brave