[PATCH v3 0/5] remoteproc: Misc. RSC table changes

Mukesh Ojha posted 5 patches 1 month, 4 weeks ago
MAINTAINERS                |  1 +
include/linux/remoteproc.h | 38 +++++--------------------------
include/linux/rsc_table.h  | 46 ++++++++++----------------------------
3 files changed, 18 insertions(+), 67 deletions(-)
[PATCH v3 0/5] remoteproc: Misc. RSC table changes
Posted by Mukesh Ojha 1 month, 4 weeks ago
This series contains a mix of header hygiene and a security fix for
rsc_table_for_each_entry().

Patch 1 adds rsc_table.h to the REMOTEPROC MAINTAINERS entry, which was
missing since the header was split out from remoteproc.h.

Patches 2-4 clean up remoteproc.h and rsc_table.h: a checkpatch style
fix for function pointer alignment and two SPDX-License-Identifier
conversions replacing the verbose BSD-3-Clause blurb.

Patch 5 fixes an out-of-bounds read in rsc_table_for_each_entry().
table->offset[i] is a u32 from firmware, but was stored as a signed int.
A crafted offset like 0xFFFFFFF0 interpreted as -16 placed hdr 16 bytes
before the table, and the subsequent avail check was silently bypassed
because the negative int promoted to a large size_t.  The fix stores the
offset as u32 and validates it with unsigned comparisons before any
pointer arithmetic.

Changes in v3:
- Patches 3, 4: Per Bjorn's review, replace the BSD blurb
  entirely rather than adding the SPDX tag alongside it; preserve the
  copyright lines in a separate comment block.
- Patches 1, 2, 5: unchanged from v2.
- Link to v2: https://lore.kernel.org/lkml/20260724184132.1878077-1-mukesh.ojha@oss.qualcomm.com/

Changes in v2:
 - Rebased it on next-20260723
 - Integrated multiple singleton into this series.
    1/5 was part of https://lore.kernel.org/lkml/20260506050107.1985033-6-mukesh.ojha@oss.qualcomm.com/
    2/5 to 4/5 was here https://lore.kernel.org/lkml/20260611180550.2442641-1-mukesh.ojha@oss.qualcomm.com/
    5/5 was reported as a part of https://lore.kernel.org/lkml/tencent_53F3322FDEB2E45D6412C427B8D1C6081407@qq.com/


Mukesh Ojha (5):
  MAINTAINERS: add rsc_table.h to remoteproc entry
  remoteproc: fix coding style issues in remoteproc.h
  remoteproc: replace BSD blurb with SPDX identifier in remoteproc.h
  remoteproc: replace BSD blurb with SPDX identifier in rsc_table.h
  remoteproc: fix OOB read via signed offset in
    rsc_table_for_each_entry()

 MAINTAINERS                |  1 +
 include/linux/remoteproc.h | 38 +++++--------------------------
 include/linux/rsc_table.h  | 46 ++++++++++----------------------------
 3 files changed, 18 insertions(+), 67 deletions(-)

-- 
2.53.0
Re: [PATCH v3 0/5] remoteproc: Misc. RSC table changes
Posted by Bjorn Andersson 1 month, 4 weeks ago
On Mon, 03 Aug 2026 17:13:26 +0530, Mukesh Ojha wrote:
> This series contains a mix of header hygiene and a security fix for
> rsc_table_for_each_entry().
> 
> Patch 1 adds rsc_table.h to the REMOTEPROC MAINTAINERS entry, which was
> missing since the header was split out from remoteproc.h.
> 
> Patches 2-4 clean up remoteproc.h and rsc_table.h: a checkpatch style
> fix for function pointer alignment and two SPDX-License-Identifier
> conversions replacing the verbose BSD-3-Clause blurb.
> 
> [...]

Applied, thanks!

[1/5] MAINTAINERS: add rsc_table.h to remoteproc entry
      commit: b08aeb36957e7a6bd1afc3802a82c3be52066aba
[2/5] remoteproc: fix coding style issues in remoteproc.h
      commit: bcacae90e8c1a2be0716895dda663fb5fdf9f85e
[3/5] remoteproc: replace BSD blurb with SPDX identifier in remoteproc.h
      commit: 7c1f35380d22971572856be8642fb46de6229d94
[4/5] remoteproc: replace BSD blurb with SPDX identifier in rsc_table.h
      commit: bf9053b22ccbb4d481135d0000fac7302d060af0
[5/5] remoteproc: fix OOB read via signed offset in rsc_table_for_each_entry()
      commit: bb840ea69347aff7bde5a208e7b5b180669a7656

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>