Closed Bug 1055768 Opened 12 years ago Closed 5 years ago

TemporaryTypeSet::isDOMClass should return false if the set contains primitive types

Categories

(Core :: JavaScript Engine: JIT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jandem, Unassigned)

Details

(Keywords: sec-audit)

isDOMClass() currently ignores primitive types and this can be error prone, see bug 1054359. We can change isDOMClass() to return false if primitives are possible and add isDOMClassOrPrimitive (or something) for places where we want the current behavior. getKnownClass, getTypedArrayType etc probably need the same treatment...
(Filing s-s for now until we know there are no similar bugs elsewhere.)
> for places where we want the current behavior There aren't any, imo. The only callers of isDOMClass() are makeCallHelper, getPropTryCommonGetter, setPropTryCommonSetter in IonBuilder. All of these only want it to return true when we know we have an object.
Yeah, there are places where we are "probably already safe", but the cost of looking for other things is a flag check, and the risk is leaving it a footgun. Let's just make it undeniably safe.
Sounds like there are no actual bad places, so let's mark this as audit for now.
Keywords: sec-audit
We don't need to use the more restrictive component-specific security groups unless a bug is sec-high or sec-critical
Group: javascript-core-security
Group: core-security → javascript-core-security

TemporaryTypeSet was removed.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Group: javascript-core-security → core-security-release
Group: core-security-release
You need to log in before you can comment on or make changes to this bug.