qemu-devel
[Top][All Lists]
Advanced

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

Re: ASan reports use-after-free when running munmap-pthread


From: Richard Henderson
Subject: Re: ASan reports use-after-free when running munmap-pthread
Date: Fri, 3 Feb 2023 11:18:39 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 2/2/23 09:06, Anton Johansson wrote:
Hi,

I was running check-tcg with ASan enabled on master, and ran into
the following use-after-free. There appears to be a race between
jump cache invalidation and thread destruction (?)

I thought I'd post here since I noticed some previous discussion on the
topic, and I'm not sure myself what a proper fix would look like.

Tested on arm/aarch64/x86_64-linux-user.

Here's a snippet of the ASan output:
=================================================================
==187529==ERROR: AddressSanitizer: heap-use-after-free on address 0x62d000f433b0 at pc 0x55cfefe00246 bp 0x7f4725f400b0 sp 0x7f4725f400a0

The fix for this was merged today:

4731f89b3b cpu: free cpu->tb_jmp_cache with RCU

I'd forgotten about this, since the pull request was pending for some time, while we waited for CI minutes to refresh.


r~



reply via email to

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