On 3/31/26 7:12 PM, Mukesh Ojha wrote:
> MAX_NUM_OF_SS was hardcoded to 10 in the minidump_global_toc struct,
> which is a direct overlay on an SMEM item allocated by the firmware.
> Newer Qualcomm SoC firmware allocates space for more subsystems, while
> older firmware only allocates space for 10. Bumping the constant would
> cause Linux to read/write beyond the SMEM item boundary on older
> platforms.
> 
> Fix this by converting subsystems[] to a flexible array member and
> deriving the actual number of subsystems at runtime from the size
> returned by qcom_smem_get(). Add a bounds check on minidump_id against
> the derived count before indexing into the array.
> 
> Signed-off-by: Mukesh Ojha <[email protected]>
> ---

Acked-by: Konrad Dybcio <[email protected]>

Konrad

Reply via email to