diff options
| author | Xixin Liu <liuxixin@kylinos.cn> | 2026-07-28 08:50:00 +0800 |
|---|---|---|
| committer | Sudeep Holla <sudeep.holla@kernel.org> | 2026-09-01 11:44:59 +0100 |
| commit | 32471d84a487c7fd74532bc96be56f8028cf4a3f (patch) | |
| tree | 4d3fd9cf3da839d247968d86abc39e0a93c3b6c6 /tools/perf/scripts/python | |
| parent | 65320b642025c53063372bd34a376bec7bf15598 (diff) | |
| download | linux-next-32471d84a487c7fd74532bc96be56f8028cf4a3f.tar.gz linux-next-32471d84a487c7fd74532bc96be56f8028cf4a3f.zip | |
firmware: arm_scpi: reject DVFS OPP count above MAX_DVFS_OPPS
scpi_dvfs_get_info() already rejected a zero opp_count, but still trusted
any larger value from the SCP firmware. The shared-memory reply only holds
MAX_DVFS_OPPS entries in buf.opps[]; a bigger count over-reads that array
and then sizes the allocated OPP table incorrectly (garbage OPPs / OOB).
The missing upper bound dates back to the original SCPI DVFS support.
Reject zero and out-of-range counts in one check and return -EINVAL.
Fixes: 8cb7cf56c9fe ("firmware: add support for ARM System Control and Power Interface(SCPI) protocol")
Signed-off-by: Xixin Liu <liuxixin@kylinos.cn>
Link: https://patch.msgid.link/022802f0b38f.v2.1785200642.git.liuxixin@kylinos.cn
Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
