Skip to content

Harden untrusted input remoteproc - #703

Merged
arnopo merged 2 commits into
OpenAMP:mainfrom
bentheredonethat:Harden-untrusted-input-remoteproc
Sep 22, 2026
Merged

arnopo merged 2 commits into
OpenAMP:mainfrom
bentheredonethat:Harden-untrusted-input-remoteproc

Conversation

@bentheredonethat

Copy link
Copy Markdown
Contributor

No description provided.

@arnopo

arnopo commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

Hi @bentheredonethat
could you rebase this one please ? There is a merge conflict

The remote resource table controls the vring alignment, which is used
for pointer rounding without validation. vring_init() rounds the used
ring address with a ~(align - 1) mask, so a zero alignment leaves a
NULL used ring that is dereferenced later.

Reject a zero alignment before calculating the vring size and before
storing the vring metadata taken from the resource table.

Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
Assisted-by: Codex:GPT-5
Resource offsets from a copied firmware table are dereferenced without
bounds checks when no I/O region is present. Handlers can then access
memory beyond the table through a VDEV's flexible vring array.

Reject a NULL table, validate offset-array arithmetic, and require
every entry to remain inside the table before dispatch. Check fixed
sizes, VDEV vrings and config data, and vendor lengths using
overflow-safe subtraction.

Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
Assisted-by: Codex:GPT-5
@bentheredonethat
bentheredonethat force-pushed the Harden-untrusted-input-remoteproc branch from 9e393a9 to 43a7a0d Compare September 21, 2026 14:20
@bentheredonethat

Copy link
Copy Markdown
Contributor Author

@arnopo rebased

@arnopo
arnopo merged commit 22ddff1 into OpenAMP:main Sep 22, 2026
5 checks passed
@arnopo arnopo added this to the Release V2026.10 milestone Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants