Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editing update channel in Info.plist without first launching binary results in crash or permissions error #14648

Closed
stephendonner opened this issue Mar 11, 2021 · 1 comment

Comments

@stephendonner
Copy link

stephendonner commented Mar 11, 2021

Description

Editing update channel in Info.plist without first launching binary results in crash or permissions error

Steps to Reproduce

  1. download BraveBrowser.dmg from brave.com for Intel
  2. drag the binary to Applications
  3. don’t launch it yet <- this is key!
  4. Context-click on the .app file and choose “Show package contents”
  5. Expand Contents, and edit the Info.plist file to change /stable/ to /test/ in this line: <string>https://updates.bravesoftware.com/sparkle/Brave-Browser/test/appcast.xml</string>
  6. now launch the binary, and you’ll either crash[0] or get permissions errors

Actual result:

Screen Shot 2021-03-11 at 10 14 55 AM

This is likely because Apple hasn't yet verified the binary, since we've edited Info.plist without first launching the app, which also verifies it.

film-at-eleven

Expected result:

No crash, app starts successfully with no errors.

These two steps are missed, resulting in the errors:

Screen Shot 2021-03-11 at 10 20 29 AM

Screen Shot 2021-03-11 at 10 20 32 AM

Reproduces how often:

100% 👍

Brave version (brave://version info)

Brave 1.21.74 Chromium: 89.0.4389.72 (Official Build) (x86_64)
Revision 3f345f156bfd157bd1bea06310e55f3fb2490359-refs/branch-heads/4389@{#1393}
OS macOS Version 11.2.3 (Build 20D91)

[0]

Process:               Brave Browser [6480]
Path:                  /Applications/Brave Browser.app/Contents/MacOS/Brave Browser
Identifier:            Brave Browser
Version:               ???
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Brave Browser [6480]
User ID:               501
Date/Time:             2021-03-06 17:29:02.318 -0800
OS Version:            macOS 11.2.2 (20D80)
Report Version:        12
Bridge OS Version:     3.0 (14Y908)
Anonymous UUID:        FC7323A3-EB0A-EA93-041A-D179C439A01F
Time Awake Since Boot: 32000 seconds
System Integrity Protection: disabled
Crashed Thread:        0
Exception Type:        EXC_CRASH (Code Signature Invalid)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY
Termination Reason:    Namespace CODESIGNING, Code 0x1
kernel messages:
VM Regions Near 0 (cr2):
--> 
    __TEXT                      1033f3000-10341f000    [  176K] r-x/r-x SM=COW  
Thread 0 Crashed:
0   ???                           	0x000000010c324000 _dyld_start + 0
Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x0000000000000000  rcx: 0x0000000000000000  rdx: 0x0000000000000000
  rdi: 0x0000000000000000  rsi: 0x0000000000000000  rbp: 0x0000000000000000  rsp: 0x00007ffeec80cbc0
   r8: 0x0000000000000000   r9: 0x0000000000000000  r10: 0x0000000000000000  r11: 0x0000000000000000
  r12: 0x0000000000000000  r13: 0x0000000000000000  r14: 0x0000000000000000  r15: 0x0000000000000000
  rip: 0x000000010c324000  rfl: 0x0000000000000200  cr2: 0x0000000000000000
  
Logical CPU:     0
Error Code:      0x00000000
Trap Number:     0
Thread 0 instruction stream not available.
Thread 0 last branch register state not available.
Binary Images:
       0x1033f3000 -        0x10341efff +??? (0) <5BE82A01-77D8-33CA-9077-E821BB4D568E> (null)
       0x10c323000 -        0x10c3befff +??? (832.7.3) <0D4EA85F-7E30-338B-9215-314A5A5539B6> (null)
External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 23370
    thread_create: 0
    thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=1052K resident=0K(0%) swapped_out_or_unallocated=1052K(100%)
Writable regions: Total=8400K written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=8400K(100%)
 
                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
STACK GUARD                       56.0M        1 
Stack                             8192K        1 
VM_ALLOCATE                          8K        2 
__DATA                             240K        3 
__DATA_CONST                        32K        1 
__LINKEDIT                         272K        4 
__TEXT                             800K        2 
===========                     =======  ======= 
TOTAL                             65.3M       14 
Model: MacBookPro14,3, BootROM 429.80.1.0.0, 4 processors, Quad-Core Intel Core i7, 2.9 GHz, 16 GB, SMC 2.45f5
Graphics: kHW_IntelHDGraphics630Item, Intel HD Graphics 630, spdisplays_builtin
Graphics: kHW_AMDRadeonPro560Item, Radeon Pro 560, spdisplays_pcie_device, 4 GB
Memory Module: BANK 0/DIMM0, 8 GB, LPDDR3, 2133 MHz, 0x802C, 0x4D5435324C31473332443450472D30393320
Memory Module: BANK 1/DIMM0, 8 GB, LPDDR3, 2133 MHz, 0x802C, 0x4D5435324C31473332443450472D30393320
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x173), Broadcom BCM43xx 1.0 (7.77.111.1 AirPortDriverBrcmNIC-1675.1)
Bluetooth: Version 8.0.3d9, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB 3.0 Bus
USB Device: Apple T1 Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 41.4
Thunderbolt Bus: MacBook Pro, Apple Inc., 41.4
@iefremov
Copy link
Contributor

Notice the crash reason: EXC_CRASH (Code Signature Invalid) - OS kills the app on purpose. So I think it is something expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants