Closed Bug 2062180 Opened 3 months ago Closed 3 months ago

Null TimelineManager dereference in GetNamedProgressTimeline

Categories

(Core :: CSS Transitions and Animations, defect)

defect

Tracking

()

RESOLVED FIXED
155 Branch
Tracking Status
firefox-esr140 --- unaffected
firefox-esr153 --- unaffected
firefox153 --- unaffected
firefox154 --- unaffected
firefox155 --- fixed

People

(Reporter: Sylvestre, Assigned: Sylvestre)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(1 external file)

In layout/style/nsAnimationManager.cpp, timelineManager is set to presContext ? presContext->TimelineManager() : nullptr and correctly null-checked in the first operand of the condition, but the second operand e == aDocument->GetDocumentElement() can be true on its own, and the body then calls timelineManager->GetNamedTimelineInSubtree() unconditionally. A document with no pres context reaches the dereference.

Coverity CID 1699955 ("Dereference after null check").

timelineManager is null when the document has no pres context. It was
correctly null-checked in the first operand of the condition, but the
second operand, e == aDocument->GetDocumentElement(), can be true on its
own and the body then dereferenced it unconditionally.

Assignee: nobody → sledru
Status: NEW → ASSIGNED
Keywords: regression
Regressed by: 2024012

Set release status flags based on info from the regressing bug 2024012

Pushed by sledru@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/920fb6bb6f57 https://hg.mozilla.org/integration/autoland/rev/392a1ac714f4 Null-check TimelineManager before deref in GetNamedProgressTimeline (Coverity CID 1699955) r=firefox-style-system-reviewers,emilio
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 155 Branch
QA Whiteboard: [qa-triage-done-c156/b155]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: