]> git.ipfire.org Git - thirdparty/libvirt.git/commit
remote: fix stream use-after-free
authorOleg Vasilev <oleg.vasilev@virtuozzo.com>
Tue, 4 Jul 2023 07:10:22 +0000 (13:10 +0600)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 24 Jul 2023 12:32:08 +0000 (14:32 +0200)
commit411cbe7199ce533ae5fa78f5558dddca6f88ef1a
tree426aa0202c16007cd2ad9d0d35d4a6d112ac90bd
parent54e59e9135cc3075e16347e09f91356991dcd3e4
remote: fix stream use-after-free

Inside daemonStreamHandleWrite on stream completion (status=OK) we
reuse msg object to send confirmation.

Only after that, msg is poped from the queue and checked for continue.
By that time, msg might've already been processed for the confirmation
and freed.

Signed-off-by: Oleg Vasilev <oleg.vasilev@virtuozzo.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/remote/remote_daemon_stream.c