summaryrefslogtreecommitdiff
path: root/include/linux/soc/qcom
diff options
context:
space:
mode:
authorMukesh Ojha <mukesh.ojha@oss.qualcomm.com>2026-08-03 17:13:31 +0530
committerBjorn Andersson <andersson@kernel.org>2026-08-04 17:32:02 -0500
commitbb840ea69347aff7bde5a208e7b5b180669a7656 (patch)
tree6625c1cf5f69dbcc3cdd0d2c09ed2a4018aeee81 /include/linux/soc/qcom
parentbf9053b22ccbb4d481135d0000fac7302d060af0 (diff)
downloadlinux-next-bb840ea69347aff7bde5a208e7b5b180669a7656.tar.gz
linux-next-bb840ea69347aff7bde5a208e7b5b180669a7656.zip
remoteproc: fix OOB read via signed offset in rsc_table_for_each_entry()
table->offset[i] is a u32 from firmware, but was stored into a signed int. A crafted offset like 0xFFFFFFF0 becomes -16, placing hdr 16 bytes before the table buffer. The subsequent avail check was bypassed because the negative int was promoted to a large size_t in the expression "table_sz - offset - sizeof(*hdr)", yielding a large positive avail and letting the out-of-bounds hdr->type read proceed undetected. Store the offset as u32 and validate it with unsigned comparisons before any pointer arithmetic. Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com> Fixes: fd2c15ec1dd3 ("remoteproc: resource table overhaul") Link: https://lore.kernel.org/r/20260803114331.3277263-6-mukesh.ojha@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Diffstat (limited to 'include/linux/soc/qcom')
0 files changed, 0 insertions, 0 deletions