Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fs/binfmt_elf: fix PT_LOAD p_align values for loaders
Rui Salvaterra reported that Aisleroit solitaire crashes with "Wrong __data_start/_end pair" assertion from libgc after update to v5.17-rc1. Bisection pointed to commit 9630f0d ("fs/binfmt_elf: use PT_LOAD p_align values for static PIE") that fixed handling of static PIEs, but made the condition that guards load_bias calculation to exclude loader binaries. Restoring the check for presence of interpreter fixes the problem. Link: https://lkml.kernel.org/r/[email protected] Fixes: 9630f0d ("fs/binfmt_elf: use PT_LOAD p_align values for static PIE") Signed-off-by: Mike Rapoport <[email protected]> Reported-by: Rui Salvaterra <[email protected]> Tested-by: Rui Salvaterra <[email protected]> Cc: Alexander Viro <[email protected]> Cc: Eric Biederman <[email protected]> Cc: "H.J. Lu" <[email protected]> Cc: Kees Cook <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information