[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220107112005.gdvtvjvgqfs6umha@gmail.com>
Date: Fri, 7 Jan 2022 20:20:05 +0900
From: Akira Kawata <akirakawata1@...il.com>
To: Lukas Bulwahn <lukas.bulwahn@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Alexey Dobriyan <adobriyan@...il.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Kees Cook <keescook@...omium.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Eric Biederman <ebiederm@...ssion.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 RESEND 0/2] fs/binfmt_elf: Fix AT_PHDR for unusual ELF
files
On Fri, Jan 07, 2022 at 07:40:50AM +0100, Lukas Bulwahn wrote:
> On Fri, Jan 7, 2022 at 12:25 AM Akira Kawata <akirakawata1@...il.com> wrote:
> >
> > 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.
> >
>
> Thanks for removing the dead store with your refactoring as a small
> stylistic change, but I really think that Kees Cook's comment that you
> simply removed an important feature is much more important to address.
> There was no reply to that and it seems that Kees hypothesis that the
> feature has been removed, was not questioned by anyone.
>
> Lukas
>
Thank you for your comments.
I will try to understand Kees Cook's comment again although I couldn't
it the last year.
Akira
> > 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. *** SUBJECT HERE ***
> >
> > 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.25.1
> >
Powered by blists - more mailing lists