Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1154684

Bug#1040981: klibc-utils: segfault executing armhf binaries under qemu-user

From Michael Tokarev <mjt@tls.msk.ru>
Newsgroups linux.debian.bugs.dist
Subject Bug#1040981: klibc-utils: segfault executing armhf binaries under qemu-user
Date 2023-07-17 22:30 +0200
Message-ID <GSD0Z-VKQ-1@gated-at.bofh.it> (permalink)
References (3 earlier) <GSBix-UDB-1@gated-at.bofh.it> <GSBse-UGY-5@gated-at.bofh.it> <GSCHD-VEa-7@gated-at.bofh.it> <GRdih-2QS-3@gated-at.bofh.it> <GSCHD-VEa-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


17.07.2023 22:58, Helge Deller wrote:
> This patch seems to work. Tested with qemu-arm and qemu-amd64.

Wow!

> diff --git a/linux-user/elfload.c b/linux-user/elfload.c
> index a26200d9f3..b583018591 100644
> --- a/linux-user/elfload.c
> +++ b/linux-user/elfload.c
> @@ -3615,6 +3631,13 @@ int load_elf_binary(struct linux_binprm *bprm, struct image_info *info)
> 
>       if (elf_interpreter) {
>           load_elf_interp(elf_interpreter, &interp_info, bprm->buf);
> +        /*
> +         * adjust brk address if the interpreter was loaded above the main
> +         * executable, e.g. happens with static binaries on armhf

Guess you mean dynamic binaries?  the klibc binaries we used are dynamic, no?


> +         */
> +        if (interp_info.brk > info->brk) {
> +            info->brk = interp_info.brk;
> +        }

Heh.  So it clashes with brk. Nice... ;)

You should ping upstream about this one before 8.1 is out, I think.

/mjt

Back to linux.debian.bugs.dist | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Bug#1040981: klibc-utils: segfault executing armhf binaries under qemu-user Helge Deller <deller@gmx.de> - 2023-07-17 15:00 +0200
  Bug#1040981: klibc-utils: segfault executing armhf binaries under qemu-user Michael Tokarev <mjt@tls.msk.ru> - 2023-07-17 15:30 +0200
    Bug#1040981: klibc-utils: segfault executing armhf binaries under qemu-user Helge Deller <deller@gmx.de> - 2023-07-17 20:40 +0200
      Bug#1040981: klibc-utils: segfault executing armhf binaries under qemu-user Helge Deller <deller@gmx.de> - 2023-07-17 20:50 +0200
        Bug#1040981: klibc-utils: segfault executing armhf binaries under qemu-user Helge Deller <deller@gmx.de> - 2023-07-17 22:10 +0200
          Bug#1040981: klibc-utils: segfault executing armhf binaries under qemu-user Michael Tokarev <mjt@tls.msk.ru> - 2023-07-17 22:30 +0200
            Bug#1040981: klibc-utils: segfault executing armhf binaries under qemu-user Helge Deller <deller@gmx.de> - 2023-07-17 22:40 +0200

csiph-web