]> git.ipfire.org Git - thirdparty/qemu.git/commit
async: avoid use-after-free on re-entrancy guard
authorAlexander Bulekov <alxndr@bu.edu>
Mon, 1 May 2023 14:19:56 +0000 (10:19 -0400)
committerMichael Tokarev <mjt@tls.msk.ru>
Sun, 10 Sep 2023 16:38:01 +0000 (19:38 +0300)
commit6a33d4b3453b46ee3fd432d80374f45919985b00
tree9fe60845c2d14ab1f49447880c8764f23c7c4f6f
parent932cf49f0620544d1fb37f1d8dd02219a3636ee9
async: avoid use-after-free on re-entrancy guard

A BH callback can free the BH, causing a use-after-free in aio_bh_call.
Fix that by keeping a local copy of the re-entrancy guard pointer.

Buglink: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=58513
Fixes: 9c86c97f12 ("async: Add an optional reentrancy guard to the BH API")
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Message-Id: <20230501141956.3444868-1-alxndr@bu.edu>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit 7915bd06f25e1803778081161bf6fa10c42dc7cd)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
util/async.c