Firefox · Core
CVE-2026-100808
Logic Error in Core
Overview
Moderate
Severity
—
CVSS
No
Exploited ITW
Fixed
Fix Status
Files Changed
docshell/base/BrowsingContext.cppdocshell/base/BrowsingContext.h
Patch
diff --git a/docshell/base/BrowsingContext.cpp b/docshell/base/BrowsingContext.cpp
index a42152a8696..e515fdd9d2e 100644
--- a/docshell/base/BrowsingContext.cpp
+++ b/docshell/base/BrowsingContext.cpp
@@ -895,6 +895,10 @@ const char* BrowsingContext::BrowsingContextCoherencyChecks(
return "Content cannot create chrome BCs";
}
+ if (aOriginProcess && GetServiceWorkersTestingEnabled()) {
+ return "Content cannot enable ServiceWorkersTestingEnabled";
+ }
+
// LoadContext should generally match our opener or parent.
if (IsContent()) {
if (RefPtr<BrowsingContext> opener = GetOpener()) {
diff --git a/docshell/base/BrowsingContext.h b/docshell/base/BrowsingContext.h
index bc790db9f60..e910da61612 100644
--- a/docshell/base/BrowsingContext.h
+++ b/docshell/base/BrowsingContext.h
@@ -1309,13 +1309,13 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache {
nsILoadInfo::CrossOriginOpenerPolicy, ContentParent*);
bool CanSet(FieldIndex<IDX_ServiceWorkersTestingEnabled>, bool,
- ContentParent*) {
- return IsTop();
+ ContentParent* aSource) {
+ return XRE_IsParentProcess() && !aSource && IsTop();
}
bool CanSet(FieldIndex<IDX_ServiceWorkersDisabledByPolicy>, bool,
- ContentParent*) {
- return IsTop();
+ ContentParent* aSource) {
+ return XRE_IsParentProcess() && !aSource && IsTop();
}
bool CanSet(FieldIndex<IDX_LanguageOverride>, const nsCString&,
Loading diff…
References
On This Page