Back

HIGH

pmdomain: mediatek: mfg: initialize prev_o in mtk_mfg_attach_dev()

Published Sep 3, 2026

Description

mtk_mfg_attach_dev() reads prev_o on the first iteration of its loop, in "if (prev_o && prev_o->freq == o->freq)", before prev_o is assigned at the end of the loop body. On that first iteration, evaluating prev_o reads an indeterminate value. If it is non-NULL, the condition dereferences a stale or invalid pointer, potentially faulting or incorrectly skipping the first OPP.

Initialize prev_o to NULL. This matches the intent as well: there is no previous OPP to compare against on the first iteration.

Found with Clang's -Wconditional-uninitialized.

Affected products

Remediation

No remediation recorded yet.

Metrics

Weaknesses (0)

No CWE recorded.

References (2)

Change history (0)

No recorded changes yet.

Sources
CVE.org / MITRE
Status PUBLISHED
Assigner Linux
Published Sep 3, 2026
Updated Sep 4, 2026
Reserved Aug 26, 2026
NVD
Status Received
Modified Sep 4, 2026
Red Hat
Severity n/a
Public date n/a