Re: [PATCH 6/6] qga/commands-posix: fix use after free of local_err

2020-03-31 Thread Vladimir Sementsov-Ogievskiy
31.03.2020 14:46, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: [...] I agree that this is a strange function and its logic is weird. But I don't know what the logic should be. My patch is still valid to just fix obvious use-after-free and possible leak. It doesn't fix the logi

Re: [PATCH 6/6] qga/commands-posix: fix use after free of local_err

2020-03-31 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: [...] > I agree that this is a strange function and its logic is weird. But I > don't know what the logic should be. My patch is still valid to just > fix obvious use-after-free and possible leak. It doesn't fix the > logic. I sketched improved logic elsewher

Re: [PATCH 6/6] qga/commands-posix: fix use after free of local_err

2020-03-31 Thread Markus Armbruster
Eric Blake writes: > On 3/24/20 10:36 AM, Vladimir Sementsov-Ogievskiy wrote: >> local_err is used several times in guest_suspend(). Setting non-NULL >> local_err will crash, so let's zero it after freeing. Also fix possible >> leak of local_err in final if(). >> >> Signed-off-by: Vladimir Sement

Re: [PATCH 6/6] qga/commands-posix: fix use after free of local_err

2020-03-24 Thread Vladimir Sementsov-Ogievskiy
24.03.2020 23:03, Eric Blake wrote: On 3/24/20 10:36 AM, Vladimir Sementsov-Ogievskiy wrote: local_err is used several times in guest_suspend(). Setting non-NULL local_err will crash, so let's zero it after freeing. Also fix possible leak of local_err in final if(). Signed-off-by: Vladimir Seme

Re: [PATCH 6/6] qga/commands-posix: fix use after free of local_err

2020-03-24 Thread Eric Blake
On 3/24/20 10:36 AM, Vladimir Sementsov-Ogievskiy wrote: local_err is used several times in guest_suspend(). Setting non-NULL local_err will crash, so let's zero it after freeing. Also fix possible leak of local_err in final if(). Signed-off-by: Vladimir Sementsov-Ogievskiy --- qga/commands-p

[PATCH 6/6] qga/commands-posix: fix use after free of local_err

2020-03-24 Thread Vladimir Sementsov-Ogievskiy
local_err is used several times in guest_suspend(). Setting non-NULL local_err will crash, so let's zero it after freeing. Also fix possible leak of local_err in final if(). Signed-off-by: Vladimir Sementsov-Ogievskiy --- qga/commands-posix.c | 3 +++ 1 file changed, 3 insertions(+) diff --git