diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2021-03-31 10:44:43 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2021-03-31 10:44:43 +0100 |
commit | b307a3174ffc293d4af9a0f03d9f78ae63327157 (patch) | |
tree | a2439d2cc30c6046e64d9bead0c2e8584329db1a | |
parent | 6d40ce00c1166c317e298ad82ecf10e650c4f87d (diff) | |
parent | 13e340c886679fb17df02a35e7d82cb8beb6e9f4 (diff) |
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>
-rw-r--r-- | linux-user/syscall.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 294779c86f..95d79ddc43 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -3025,7 +3025,7 @@ get_timeout: return -TARGET_EINVAL; } results = lock_user(VERIFY_WRITE, optval_addr, len, 1); - if (!results) { + if (!results && len > 0) { return -TARGET_EFAULT; } lv = len; |