diff options
author | Owen Anderson <oanderso@google.com> | 2021-07-01 22:12:55 +0000 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2021-07-12 21:54:46 +0200 |
commit | c093364f4d911c1d59949b122f2d4c290986fff9 (patch) | |
tree | 2f936418ccc6218017e4623641241eb7809fa97c /linux-user/fd-trans.c | |
parent | 4f6a9f84f1d29b61e3ebd3bfd774d9fd5afe60c6 (diff) |
fd-trans: Fix race condition on reallocation of the translation table.
The mapping from file-descriptors to translator functions is not guarded
on realloc which may cause invalid function pointers to be read from a
previously deallocated mapping.
Signed-off-by: Owen Anderson <oanderso@google.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20210701221255.107976-1-oanderso@google.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/fd-trans.c')
-rw-r--r-- | linux-user/fd-trans.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/linux-user/fd-trans.c b/linux-user/fd-trans.c index 23adaca836..86b6f484d3 100644 --- a/linux-user/fd-trans.c +++ b/linux-user/fd-trans.c @@ -267,6 +267,7 @@ enum { }; TargetFdTrans **target_fd_trans; +QemuMutex target_fd_trans_lock; unsigned int target_fd_max; static void tswap_nlmsghdr(struct nlmsghdr *nlh) |