Re: [PATCH 2/6] block/mirror: fix use after free of local_err

2020-03-31 Thread Markus Armbruster
Max Reitz writes: > On 25.03.20 12:47, Vladimir Sementsov-Ogievskiy wrote: >> 25.03.2020 14:11, Max Reitz wrote: >>> On 24.03.20 16:36, Vladimir Sementsov-Ogievskiy wrote: local_err is used again in mirror_exit_common() after bdrv_set_backing_hd(), so we must zero it. Otherwise try to

Re: [PATCH 2/6] block/mirror: fix use after free of local_err

2020-03-25 Thread Eric Blake
On 3/25/20 6:11 AM, Max Reitz wrote: On 24.03.20 16:36, Vladimir Sementsov-Ogievskiy wrote: local_err is used again in mirror_exit_common() after bdrv_set_backing_hd(), so we must zero it. Otherwise try to set non-NULL local_err will crash. OK, but wouldn’t it be better hygiene to set it to

Re: [PATCH 2/6] block/mirror: fix use after free of local_err

2020-03-25 Thread Max Reitz
On 24.03.20 16:36, Vladimir Sementsov-Ogievskiy wrote: > local_err is used again in mirror_exit_common() after > bdrv_set_backing_hd(), so we must zero it. Otherwise try to set > non-NULL local_err will crash. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/mirror.c | 1 + > 1

Re: [PATCH 2/6] block/mirror: fix use after free of local_err

2020-03-25 Thread Max Reitz
On 25.03.20 12:47, Vladimir Sementsov-Ogievskiy wrote: > 25.03.2020 14:11, Max Reitz wrote: >> On 24.03.20 16:36, Vladimir Sementsov-Ogievskiy wrote: >>> local_err is used again in mirror_exit_common() after >>> bdrv_set_backing_hd(), so we must zero it. Otherwise try to set >>> non-NULL local_err

Re: [PATCH 2/6] block/mirror: fix use after free of local_err

2020-03-25 Thread Vladimir Sementsov-Ogievskiy
25.03.2020 14:11, Max Reitz wrote: On 24.03.20 16:36, Vladimir Sementsov-Ogievskiy wrote: local_err is used again in mirror_exit_common() after bdrv_set_backing_hd(), so we must zero it. Otherwise try to set non-NULL local_err will crash. OK, but wouldn’t it be better hygiene to set it to

Re: [PATCH 2/6] block/mirror: fix use after free of local_err

2020-03-25 Thread Max Reitz
On 25.03.20 12:11, Max Reitz wrote: > On 24.03.20 16:36, Vladimir Sementsov-Ogievskiy wrote: >> local_err is used again in mirror_exit_common() after >> bdrv_set_backing_hd(), so we must zero it. Otherwise try to set >> non-NULL local_err will crash. > > OK, but wouldn’t it be better hygiene to

Re: [PATCH 2/6] block/mirror: fix use after free of local_err

2020-03-25 Thread Max Reitz
On 24.03.20 16:36, Vladimir Sementsov-Ogievskiy wrote: > local_err is used again in mirror_exit_common() after > bdrv_set_backing_hd(), so we must zero it. Otherwise try to set > non-NULL local_err will crash. OK, but wouldn’t it be better hygiene to set it to NULL every time it is freed? (There

Re: [PATCH 2/6] block/mirror: fix use after free of local_err

2020-03-24 Thread John Snow
On 3/24/20 11:36 AM, Vladimir Sementsov-Ogievskiy wrote: > local_err is used again in mirror_exit_common() after > bdrv_set_backing_hd(), so we must zero it. Otherwise try to set > non-NULL local_err will crash. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/mirror.c | 1 + >

Re: [PATCH 2/6] block/mirror: 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 again in mirror_exit_common() after bdrv_set_backing_hd(), so we must zero it. Otherwise try to set non-NULL local_err will crash. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/mirror.c | 1 + 1 file changed,

[PATCH 2/6] block/mirror: fix use after free of local_err

2020-03-24 Thread Vladimir Sementsov-Ogievskiy
local_err is used again in mirror_exit_common() after bdrv_set_backing_hd(), so we must zero it. Otherwise try to set non-NULL local_err will crash. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/mirror.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/mirror.c b/block/mirror.c