Closed Bug 1612147 Opened 5 years ago Closed 4 years ago

RefPtr<FeaturePolicy> is stored in BrowsingContext

Categories

(Core :: DOM: Security, defect, P1)

defect

Tracking

()

RESOLVED FIXED
86 Branch
Fission Milestone M6c
Tracking Status
firefox86 --- fixed

People

(Reporter: farre, Assigned: farre)

References

Details

(Whiteboard: [domsecurity-backlog1])

Attachments

(1 file)

Mutable datatypes cannot be stored in BrowsingContext since that won't be synced.

Also, FeaturePolicy in BrowsingContext syncs principals, which is not correct.

Assignee: nobody → afarre

It's not possible to stora a value with mutable data in a
BrowsingContext synced field (in this case a RefPtr<T>), since this
will bypass syncing when written to. Instead store FeaturePolicyInfo
as a value.

We also wish to avoid storing nsIPrincipals in the ContentChild, since
we might be leaking information about a document from another domain
and process in the fission case. Instead initialize FeaturePolicy with
NullPrincipals when creating them from a BrowsingContext representing
an oop document.

Priority: -- → P2
Fission Milestone: --- → M6
Status: NEW → ASSIGNED
Fission Milestone: M6 → M6b

Andreas said this needs to be owned by someone who knows Feature Policy better and Andreas will be available for Fission questions and help.

Assignee: afarre → nobody
Status: ASSIGNED → NEW
Component: DOM: Navigation → DOM: Security
Flags: needinfo?(amarchesini)

Putting in the backlog for now till baku answers.

Priority: P2 → P3
Whiteboard: [domsecurity-backlog1]
Assignee: nobody → afarre
Status: NEW → ASSIGNED

Sorry for the delay. I just accepted the Farre's patch.

Flags: needinfo?(amarchesini)

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:farre, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(afarre)

I've rebased it, but I also changed the call to FeaturePolicy::SetDeclaredPolicy in FeaturePolicyUtils::FromBrowsingContext to pass a nullptr for src. I think that's more correct. Does that sound reasonable Baku?

Flags: needinfo?(afarre) → needinfo?(amarchesini)
Whiteboard: [domsecurity-backlog1] → waiting on baku's confirmation [domsecurity-backlog1]
Flags: needinfo?(amarchesini) → needinfo?(ckerschb)

Setting the blocking review flag for baku in phab and following up on slack.

Flags: needinfo?(ckerschb)

This doesn't need to block M6b but needs to be done very soon in M6c.

Fission Milestone: M6b → M6c
Whiteboard: waiting on baku's confirmation [domsecurity-backlog1] → [domsecurity-backlog1]
Priority: P3 → P1
Attachment #9124088 - Attachment description: Bug 1612147 - Store FeaturePolicyInfo in BrowsingContext. r=baku → Bug 1612147 - Don't store FeaturePolicy in BrowsingContext. r=smaug
Depends on: 1686234
Pushed by afarre@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/376c2ff62872 Don't store FeaturePolicy in BrowsingContext. r=smaug
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
Regressions: 1688127
See Also: → 1887856
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: