[Top][All Lists]

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

[Qemu-commits] [qemu/qemu] 13e340: linux-user: NETLINK_LIST_MEMBERSHIPS:

From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 13e340: linux-user: NETLINK_LIST_MEMBERSHIPS: Allow bad pt...
Date: Wed, 31 Mar 2021 02:45:25 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 13e340c886679fb17df02a35e7d82cb8beb6e9f4
  Author: Frédéric Fortier <frf@ghgsat.com>
  Date:   2021-03-29 (Mon, 29 Mar 2021)

  Changed paths:
    M linux-user/syscall.c

  Log Message:
  linux-user: NETLINK_LIST_MEMBERSHIPS: Allow bad ptr if its length is 0

getsockopt(fd, SOL_NETLINK, NETLINK_LIST_MEMBERSHIPS, *optval, *optlen)
syscall allows optval to be NULL/invalid if optlen points to a size of
zero. This allows userspace to query the length of the array they should
use to get the full membership list before allocating memory for said
list, then re-calling getsockopt with proper optval/optlen arguments.

Notable users of this pattern include systemd-networkd, which in the
(albeit old) version 237 tested, cannot start without this fix.

Signed-off-by: Frédéric Fortier <frf@ghgsat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20210328180135.88449-1-frf@ghgsat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>

  Commit: 6d40ce00c1166c317e298ad82ecf10e650c4f87d
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-03-30 (Tue, 30 Mar 2021)

  Changed paths:

  Log Message:
  Update version for v6.0.0-rc1 release

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

  Commit: b307a3174ffc293d4af9a0f03d9f78ae63327157
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-03-31 (Wed, 31 Mar 2021)

  Changed paths:
    M linux-user/syscall.c

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

linux-user Pull request 20210330

Fix NETLINK_LIST_MEMBERSHIPS with NULL/invalid pointer and 0 length

# gpg: Signature made Tue 30 Mar 2021 15:38:35 BST
# 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>" 
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* remotes/vivier2/tags/linux-user-for-6.0-pull-request:
  linux-user: NETLINK_LIST_MEMBERSHIPS: Allow bad ptr if its length is 0

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

Compare: https://github.com/qemu/qemu/compare/b471d5549188...b307a3174ffc

reply via email to

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