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

Mukesh Ojha <[email protected]> Mon, 3 Aug 2026 17:13:26 +0530
Newsgroups org.kernel.vger.linux-remoteproc,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
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/[email protected]/

Changes in v2:
 - Rebased it on next-20260723
 - Integrated multiple singleton into this series.
    1/5 was part of https://lore.kernel.org/lkml/[email protected]/
    2/5 to 4/5 was here https://lore.kernel.org/lkml/[email protected]/
    5/5 was reported as a part of https://lore.kernel.org/lkml/[email protected]/


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