mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
remoteproc: qcom: mdt_loader: Use signed type for offset
In the transition from using rproc_da_to_va(), the type of the load offset became unsigned. This causes the subsequent check to let negative values less than p_memsz + mem_size through and we write outside of the buffer. Change the type back to a signed value to catch this. Fixes:7f0dd07a9b("remoteproc: qcom: mdt_loader: Refactor MDT loader") Fixes:e7fd252262("remoteproc: qcom: q6v5: Decouple driver from MDT loader") Reported-by: Dan Carpenter <[email protected]> Reported-by: Stanimir Varbanov <[email protected]> Acked-by: Andy Gross <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]>
This commit is contained in:
parent
231c8dfd1a
commit
01625cc5e6
2 changed files with 2 additions and 2 deletions
|
|
@ -502,7 +502,7 @@ static int q6v5_mpss_load(struct q6v5 *qproc)
|
|||
phys_addr_t max_addr = 0;
|
||||
bool relocate = false;
|
||||
char seg_name[10];
|
||||
size_t offset;
|
||||
ssize_t offset;
|
||||
size_t size;
|
||||
void *ptr;
|
||||
int ret;
|
||||
|
|
|
|||
Loading…
Reference in a new issue