mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
To: Bjorn Andersson <andersson@kernel.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org,
	Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
Subject: [PATCH v3 0/5] remoteproc: Misc. RSC table changes
Date: Mon,  3 Aug 2026 17:13:26 +0530	[thread overview]
Message-ID: <20260803114331.3277263-1-mukesh.ojha@oss.qualcomm.com> (raw)

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


             reply	other threads:[~2026-08-03 11:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-03 11:43 Mukesh Ojha [this message]
2026-08-03 11:43 ` [PATCH v3 1/5] MAINTAINERS: add rsc_table.h to remoteproc entry Mukesh Ojha
2026-08-03 11:43 ` [PATCH v3 2/5] remoteproc: fix coding style issues in remoteproc.h Mukesh Ojha
2026-08-03 11:43 ` [PATCH v3 3/5] remoteproc: replace BSD blurb with SPDX identifier " Mukesh Ojha
2026-08-03 11:43 ` [PATCH v3 4/5] remoteproc: replace BSD blurb with SPDX identifier in rsc_table.h Mukesh Ojha
2026-08-03 11:43 ` [PATCH v3 5/5] remoteproc: fix OOB read via signed offset in rsc_table_for_each_entry() Mukesh Ojha
2026-08-04 22:12   ` Bjorn Andersson
2026-08-05  3:34 ` [PATCH v3 0/5] remoteproc: Misc. RSC table changes Bjorn Andersson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260803114331.3277263-1-mukesh.ojha@oss.qualcomm.com \
    --to=mukesh.ojha@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®