Repository navigation
fix(shell): no stack protector on the CEF subprocess entry path - #1854
noquierouser wants to merge 1 commit into
Conversation
CEF subprocesses (--type=utility etc.) are forked from Chromium's zygote, which then replaces the stack canary in the child. main(), intercept_command_line_args() and html::intercept_command_line() are live across that fork, so when the subprocess finishes and CefExecuteProcess() returns, their epilogues compare against the old canary and glibc aborts with "*** stack smashing detected ***" (SIGABRT and a core dump on every utility process exit: Unzipper, DataDecoderService, OnDeviceModelService). Builds using -fstack-protector-strong are affected, which is the default in distro packaging flags. Mark the three frames no_stack_protector, as Chromium and CEF's sample applications do for their entry points. This addresses the cause of CasparCG#1781. CasparCG#1773 worked around it by disabling the component updater and passing change-stack-guard-on-fork=disable.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
CEF subprocesses are forked from Chromium's zygote, which replaces the stack canary in the child.
main(),intercept_command_line_args()andhtml::intercept_command_line()are live across that fork, so whenCefExecuteProcess()returns they check the old canary and glibc aborts with "stack smashing detected".This marks those three frames
no_stack_protector, as Chromium and CEF's sample apps do for their entry points. It addresses the cause behind #1781, complementing the workaround in #1773.Tested as a downstream patch on v2.5.1 together with the #1773 backport, on Fedora 43/44/45 and EL10 (built with
-fstack-protector-strong): 15–33 aborts per 2-minute run before, none after. Not yet built against master.Summary by CodeRabbit