qemu-commits
[Top][All Lists]
Advanced

[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 05:14:30 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 13e340c886679fb17df02a35e7d82cb8beb6e9f4
      
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: b307a3174ffc293d4af9a0f03d9f78ae63327157
      
https://github.com/qemu/qemu/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>" 
[full]
# 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/6d40ce00c116...b307a3174ffc



reply via email to

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