Skip to content

Conversation

DongSunchao
Copy link

On MIPS platforms, shared libraries may use EI_ABIVERSION = 5 to indicate
support for .MIPS.xhash sections. The previous ELF header check in
handle_binary() strictly compared e_ident against a hardcoded value,
causing legitimate shared objects to be rejected.

This patch replaces the memcmp-based check with a structured validation
of ELF magic and class, and allows EI_ABIVERSION values beside 0.
fixes: #2745

@avagin
Copy link
Member

avagin commented Sep 18, 2025

LGTM. Thanks!

@chenx97
Copy link

chenx97 commented Sep 19, 2025

The new file appears to be missing an LF at the end.

On MIPS platforms, shared libraries may use EI_ABIVERSION = 5 to indicate
support for .MIPS.xhash sections. The previous ELF header check in
handle_binary() strictly compared e_ident against a hardcoded value,
causing legitimate shared objects to be rejected.

This patch replaces the memcmp-based check with a structured validation
of ELF magic and class, and allows EI_ABIVERSION values beside 0.

fixes: checkpoint-restore#2745
Signed-off-by: dong sunchao <[email protected]>
@DongSunchao
Copy link
Author

The new file appears to be missing an LF at the end.

Thanks, I have fixed it.

@avagin avagin merged commit dcd9df7 into checkpoint-restore:criu-dev Sep 19, 2025
37 of 42 checks passed
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.

Unsupported Elf format on mips
3 participants