All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/2] [PATCH v4 0/2] fs/binfmt_elf: Fix AT_PHDR for unusual ELF files
@ 2021-12-12 23:24 Akira Kawata
  2021-12-12 23:24 ` [PATCH v4 1/2] " Akira Kawata
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Akira Kawata @ 2021-12-12 23:24 UTC (permalink / raw)
  To: akpm, adobriyan, viro, keescook, linux-fsdevel, lukas.bulwahn
  Cc: akirakawata1, Eric Biederman, linux-kernel

 These patches fix a bug in AT_PHDR calculation. 
 
 We cannot calculate AT_PHDR as the sum of load_addr and exec->e_phoff.
 This is because exec->e_phoff is the offset of PHDRs in the file and the
 address of PHDRs in the memory may differ from it. These patches fix the
 bug by calculating the address of program headers from PT_LOADs
 directly.
 
 Sorry for my latency.
 
 Changes in v4
 - Reflecting comments from Lukas, add a refactoring commit.
 
 Changes in v3:
 - Fix a reported bug from kernel test robot.
 
 Changes in v2:
 - Remove unused load_addr from create_elf_tables.
 - Improve the commit message.

Akira Kawata (2):
  fs/binfmt_elf: Fix AT_PHDR for unusual ELF files
  fs/binfmt_elf: Refactor load_elf_binary function

 fs/binfmt_elf.c | 36 +++++++++++++++++++++---------------
 1 file changed, 21 insertions(+), 15 deletions(-)


base-commit: 4eee8d0b64ecc3231040fa68ba750317ffca5c52
-- 
2.34.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-01-28 19:56 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-12 23:24 [PATCH v4 0/2] [PATCH v4 0/2] fs/binfmt_elf: Fix AT_PHDR for unusual ELF files Akira Kawata
2021-12-12 23:24 ` [PATCH v4 1/2] " Akira Kawata
2022-01-27  5:01   ` Kees Cook
2022-01-27 12:56     ` Akira Kawata
2022-01-27 16:23       ` Kees Cook
2022-01-28 11:10         ` Akira Kawata
2022-01-28 19:56           ` Kees Cook
2021-12-12 23:24 ` [PATCH v4 2/2] fs/binfmt_elf: Refactor load_elf_binary function Akira Kawata
2022-01-27  5:11   ` Kees Cook
2021-12-12 23:24 ` [PATCH v4 0/2] [PATCH v4 0/2] fs/binfmt_elf: Fix AT_PHDR for unusual ELF files Akira Kawata
2021-12-12 23:35   ` Akira Kawata
2021-12-12 23:24 ` [PATCH v4 1/2] " Akira Kawata
2021-12-12 23:24 ` [PATCH v4 2/2] fs/binfmt_elf: Refactor load_elf_binary function Akira Kawata

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.