qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] d9a5eb: Fix stack smashing when handling PR_G


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] d9a5eb: Fix stack smashing when handling PR_GET_PDEATHSIG
Date: Wed, 28 Oct 2020 09:25:22 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: d9a5eba477e7ed7183a6d417755790d6ecf22cad
      
https://github.com/qemu/qemu/commit/d9a5eba477e7ed7183a6d417755790d6ecf22cad
  Author: Stephen Long <steplong@quicinc.com>
  Date:   2020-10-23 (Fri, 23 Oct 2020)

  Changed paths:
    M linux-user/syscall.c

  Log Message:
  -----------
  Fix stack smashing when handling PR_GET_PDEATHSIG

The bug was triggered by the following code on aarch64-linux-user:

int main(void)
{
  int PDeathSig = 0;
  if (prctl(PR_GET_PDEATHSIG, &PDeathSig) == 0 && PDeathSig == SIGKILL)
    prctl(PR_GET_PDEATHSIG, 0);
  return (PDeathSig == SIGKILL);
}

Signed-off-by: Stephen Long <steplong@quicinc.com>
Signed-off-by: Ana Pazos <apazos@quicinc.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20200507130302.3684-1-steplong@quicinc.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>


  Commit: b94e2b4e34524c37b86f6acb8ad4a696969f2dd0
      
https://github.com/qemu/qemu/commit/b94e2b4e34524c37b86f6acb8ad4a696969f2dd0
  Author: Frajo <franz.haider@jolla.com>
  Date:   2020-10-23 (Fri, 23 Oct 2020)

  Changed paths:
    M linux-user/syscall.c

  Log Message:
  -----------
  linux-user: Support f_flags in statfs64 when available.

Same as d4247ec2d79ef2477cb886fa688706b068119736 but for statfs64
When running rpm within qemu-arm-dynamic this could cause rpm fail with
an error like
"installing package A needs B MB on the C filesystem" depending on what
is in memory in f_flags.
https://github.com/rpm-software-management/rpm/blob/af06db1d5558870f7fb8f5c502572c2d27af5c71/lib/transaction.c#L164

Signed-off-by: Franz-Josef Haider <franz.haider@jolla.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <2e405fe7-efab-dae5-93d6-02575773fd6e@jolla.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>


  Commit: 29fe5029a43f71cc6fbd2218fa5cc354d0b49d5a
      
https://github.com/qemu/qemu/commit/29fe5029a43f71cc6fbd2218fa5cc354d0b49d5a
  Author: Laurent Vivier <laurent@vivier.eu>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    M linux-user/aarch64/syscall_nr.h
    M linux-user/nios2/syscall_nr.h
    M linux-user/openrisc/syscall_nr.h
    M linux-user/riscv/syscall32_nr.h
    M linux-user/riscv/syscall64_nr.h
    M scripts/gensyscalls.sh

  Log Message:
  -----------
  linux-user: update syscall_nr.h to Linux 5.9-rc7

Update gensyscalls.sh not to generate an empty line at the end of the file

And then automatically update syscall_nr.h running scripts/gensyscalls.sh

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200930003033.554124-2-laurent@vivier.eu>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>


  Commit: b6bcab38deb2fad026f490651dfd38ed07528f4e
      
https://github.com/qemu/qemu/commit/b6bcab38deb2fad026f490651dfd38ed07528f4e
  Author: Laurent Vivier <laurent@vivier.eu>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    M linux-user/mips/syscall-args-o32.c.inc

  Log Message:
  -----------
  linux-user: update mips/syscall-args-o32.c.inc to Linux 5.9-rc7

Updated running scripts/update-mips-syscall-args.sh

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200930003033.554124-3-laurent@vivier.eu>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>


  Commit: 0cb113ad1aa94d09dce97c32eb1347016c18aa64
      
https://github.com/qemu/qemu/commit/0cb113ad1aa94d09dce97c32eb1347016c18aa64
  Author: Laurent Vivier <laurent@vivier.eu>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    M linux-user/alpha/syscall.tbl
    M linux-user/arm/syscall.tbl
    M linux-user/hppa/syscall.tbl
    M linux-user/i386/syscall_32.tbl
    M linux-user/m68k/syscall.tbl
    M linux-user/microblaze/syscall.tbl
    M linux-user/mips/syscall_o32.tbl
    M linux-user/mips64/syscall_n32.tbl
    M linux-user/mips64/syscall_n64.tbl
    M linux-user/ppc/syscall.tbl
    M linux-user/s390x/syscall.tbl
    M linux-user/sh4/syscall.tbl
    M linux-user/sparc/syscall.tbl
    M linux-user/sparc64/syscall.tbl
    M linux-user/x86_64/syscall_64.tbl
    M linux-user/xtensa/syscall.tbl

  Log Message:
  -----------
  linux-user: update syscall.tbl to Linux 5.9-rc7

Updated running scripts/update-syscalltbl.sh

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200930003033.554124-4-laurent@vivier.eu>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>


  Commit: 0deb6556c35a78bb3384fd43c6a1ee2b47374c38
      
https://github.com/qemu/qemu/commit/0deb6556c35a78bb3384fd43c6a1ee2b47374c38
  Author: Laurent Vivier <laurent@vivier.eu>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    M linux-user/syscall.c

  Log Message:
  -----------
  linux-user: remove _sysctl

It has been removed from linux since

  61a47c1ad3a4 ("sysctl: Remove the sysctl system call")

It's a good news because it was not really supported by qemu.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200930003033.554124-5-laurent@vivier.eu>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>


  Commit: e554eb4bb56395b1e3b7042dc6974dc87de3f4d1
      
https://github.com/qemu/qemu/commit/e554eb4bb56395b1e3b7042dc6974dc87de3f4d1
  Author: Matus Kysel <mkysel@tachyum.com>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    M linux-user/syscall.c

  Log Message:
  -----------
  linux-user: correct errno returned from accept4() syscall

accept4() returned wrong errno, that did not match current linux

Signed-off-by: Matus Kysel <mkysel@tachyum.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20200930151616.3588165-1-mkysel@tachyum.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>


  Commit: ab97f0505bec6280c5455009b7678daf5c9278bc
      
https://github.com/qemu/qemu/commit/ab97f0505bec6280c5455009b7678daf5c9278bc
  Author: Max Filippov <jcmvbkbc@gmail.com>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    M target/xtensa/cpu.c

  Log Message:
  -----------
  target/xtensa: enable all coprocessors for linux-user

Linux userspace always sees coprocessors as enabled. CPENABLE register
and coprocessor exceptions are used internally by the kernel to manage
lazy coprocessor context switch. None of it is needed for linux-user.
Always enable all coprocessors for user emulation.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200829104758.22337-1-jcmvbkbc@gmail.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>


  Commit: 5c27a8551857e3e7ecac6f4b99ffb0dea73b2be6
      
https://github.com/qemu/qemu/commit/5c27a8551857e3e7ecac6f4b99ffb0dea73b2be6
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2020-10-28 (Wed, 28 Oct 2020)

  Changed paths:
    M linux-user/aarch64/syscall_nr.h
    M linux-user/alpha/syscall.tbl
    M linux-user/arm/syscall.tbl
    M linux-user/hppa/syscall.tbl
    M linux-user/i386/syscall_32.tbl
    M linux-user/m68k/syscall.tbl
    M linux-user/microblaze/syscall.tbl
    M linux-user/mips/syscall-args-o32.c.inc
    M linux-user/mips/syscall_o32.tbl
    M linux-user/mips64/syscall_n32.tbl
    M linux-user/mips64/syscall_n64.tbl
    M linux-user/nios2/syscall_nr.h
    M linux-user/openrisc/syscall_nr.h
    M linux-user/ppc/syscall.tbl
    M linux-user/riscv/syscall32_nr.h
    M linux-user/riscv/syscall64_nr.h
    M linux-user/s390x/syscall.tbl
    M linux-user/sh4/syscall.tbl
    M linux-user/sparc/syscall.tbl
    M linux-user/sparc64/syscall.tbl
    M linux-user/syscall.c
    M linux-user/x86_64/syscall_64.tbl
    M linux-user/xtensa/syscall.tbl
    M scripts/gensyscalls.sh
    M target/xtensa/cpu.c

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/vivier2/tags/linux-user-for-5.2-pull-request' into staging

Update syscall numbers to 5.9-rc7
Fixes for prctl(), accept4() and xtensa

# gpg: Signature made Mon 26 Oct 2020 22:02:56 GMT
# gpg:                using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg:                issuer "laurent@vivier.eu"
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
# gpg:                 aka "Laurent Vivier <laurent@vivier.eu>" [full]
# gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" 
[full]
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* remotes/vivier2/tags/linux-user-for-5.2-pull-request:
  target/xtensa: enable all coprocessors for linux-user
  linux-user: correct errno returned from accept4() syscall
  linux-user: remove _sysctl
  linux-user: update syscall.tbl to Linux 5.9-rc7
  linux-user: update mips/syscall-args-o32.c.inc to Linux 5.9-rc7
  linux-user: update syscall_nr.h to Linux 5.9-rc7
  linux-user: Support f_flags in statfs64 when available.
  Fix stack smashing when handling PR_GET_PDEATHSIG

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/33dc9914eac5...5c27a8551857



reply via email to

[Prev in Thread] Current Thread [Next in Thread]