New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 855275 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 807838
Owner:
Last visit > 30 days ago
Closed: Jun 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

blink::ContentSecurityPolicy is thread hostile, yet is used from multiple threads

Project Member Reported by mek@chromium.org, Jun 21 2018

Issue description

In particular calling AddPolicyFromHeaderValue is not something that is safe to do from multiple threads, even if different ContentSecurityPolicy instances are used, because:
- it uses blink::CSPDirectiveList to parse the header
- blink::CSPDirectiveList uses blink::SpaceSplitString to parse the string
- blink::SpaceSplitString uses a DEFINE_STATIC_LOCAL singleton DataMap (to cache things I think?) with no consideration for multiple threads


 

Comment 1 by mek@chromium.org, Jun 21 2018

(and the multi-threaded usage comes from blink::WorkerOrWorkletGlobalScope::InitContentSecurityPolicyFromVector, which is called on worker threads)
Mergedinto: 807838
Status: Duplicate (was: Untriaged)
I think this is the same with issue 807838.

Sign in to add a comment