Branch: refs/heads/main Home: https://github.com/OpenAMP/open-amp Commit: 2ad0328fe688978b33c59251dff38de44739f6bd https://github.com/OpenAMP/open-amp/commit/2ad0328fe688978b33c59251dff38de44... Author: Ben Levinsky ben.levinsky@amd.com Date: 2026-09-21 (Mon, 21 Sep 2026)
Changed paths: M lib/include/internal/utilities.h M lib/remoteproc/elf_loader.c
Log Message: ----------- remoteproc: add checked arithmetic helpers
Add generic checked addition, subtraction, and multiplication helpers with consistent input validation across builtin and fallback implementations.
Add a generic range-containment helper which reports arithmetic overflow separately from non-containment. This lets the ELF loader distinguish malformed ranges from data absent from the current image chunk.
Signed-off-by: Ben Levinsky ben.levinsky@amd.com
Commit: f3b110faff3df0f36c0f5126b9d9ecdfca2575e5 https://github.com/OpenAMP/open-amp/commit/f3b110faff3df0f36c0f5126b9d9ecdfc... Author: Ben Levinsky ben.levinsky@amd.com Date: 2026-09-21 (Mon, 21 Sep 2026)
Changed paths: M lib/remoteproc/elf_loader.c
Log Message: ----------- remoteproc: validate ELF header shape before table loading
Reject malformed ELF headers before using program or section table metadata from the firmware image.
Validate the ELF class, ELF header size, program header entry size, section header entry size, and section string-table index. Release an image-info object allocated by this call if validation fails, while leaving caller-owned objects untouched.
Signed-off-by: Ben Levinsky ben.levinsky@amd.com
Commit: 8d245caca221297ff395bce00a2331430506b04e https://github.com/OpenAMP/open-amp/commit/8d245caca221297ff395bce00a2331430... Author: Ben Levinsky ben.levinsky@amd.com Date: 2026-09-21 (Mon, 21 Sep 2026)
Changed paths: M lib/remoteproc/elf_loader.c
Log Message: ----------- remoteproc: check ELF program and section table sizes
Use checked multiplication when computing ELF program and section header table sizes from e_phnum/e_phentsize and e_shnum/e_shentsize.
Also replace wrapping offset-plus-length range checks with overflow-safe image chunk validation before allocation and memcpy. Malformed firmware images with impossible table sizes now fail with -RPROC_EINVAL.
Signed-off-by: Ben Levinsky ben.levinsky@amd.com
Commit: 872a4fcae7e3a2ead1366a52dd8e044534043186 https://github.com/OpenAMP/open-amp/commit/872a4fcae7e3a2ead1366a52dd8e04453... Author: Ben Levinsky ben.levinsky@amd.com Date: 2026-09-21 (Mon, 21 Sep 2026)
Changed paths: M lib/remoteproc/elf_loader.c
Log Message: ----------- remoteproc: harden ELF section string-table range checks
Use overflow-safe range validation before copying the ELF section string table from the firmware image.
The section string-table offset and size are read from untrusted section headers. Validate that the full table is present in the current image chunk without relying on wrapping offset arithmetic.
Signed-off-by: Ben Levinsky ben.levinsky@amd.com
Commit: 08a45aca334d49133abdf89b21817af1217595fc https://github.com/OpenAMP/open-amp/commit/08a45aca334d49133abdf89b21817af12... Author: Ben Levinsky ben.levinsky@amd.com Date: 2026-09-21 (Mon, 21 Sep 2026)
Changed paths: M lib/include/openamp/elf_loader.h M lib/remoteproc/elf_loader.c
Log Message: ----------- remoteproc: track loaded ELF section string-table size
Store the loaded section string-table size in the ELF image information for both ELF32 and ELF64 images.
Keeping the size alongside the string-table pointer allows later section name lookups to validate sh_name offsets against the actual loaded table bounds.
Signed-off-by: Ben Levinsky ben.levinsky@amd.com
Commit: 28b0a020c633715d7b90341b3b9ec44277d030d4 https://github.com/OpenAMP/open-amp/commit/28b0a020c633715d7b90341b3b9ec4427... Author: Ben Levinsky ben.levinsky@amd.com Date: 2026-09-21 (Mon, 21 Sep 2026)
Changed paths: M lib/remoteproc/elf_loader.c
Log Message: ----------- remoteproc: bound ELF section name lookups
Make ELF section-name lookup validate sh_name before reading from the loaded section string table.
Skip malformed section names whose sh_name offset is outside the table or whose string is not NUL-terminated within the remaining table bytes. Use bounded comparison for valid candidates so .resource_table lookup cannot read past the loaded string table.
Signed-off-by: Ben Levinsky ben.levinsky@amd.com
Commit: 3ea751021e4f157c561b8bf2598d263ac072a8ef https://github.com/OpenAMP/open-amp/commit/3ea751021e4f157c561b8bf2598d263ac... Author: Ben Levinsky ben.levinsky@amd.com Date: 2026-09-21 (Mon, 21 Sep 2026)
Changed paths: M lib/remoteproc/remoteproc.c
Log Message: ----------- remoteproc: avoid wrapping loader offset comparison
Replace the non-seekable loader offset comparison that used offset + len with an overflow-safe equivalent.
This preserves existing behavior for normal ranges while avoiding a wraparound case when deciding whether required image data is contiguous with the current chunk.
Signed-off-by: Ben Levinsky ben.levinsky@amd.com
Compare: https://github.com/OpenAMP/open-amp/compare/1e2cae3a2edc...3ea751021e4f
To unsubscribe from these emails, change your notification settings at https://github.com/OpenAMP/open-amp/settings/notifications
openamp-rp@lists.openampproject.org