Re: [PATCH] btrfs-progs: Fix null pointer deref in balance_level

2021-04-16 Thread David Sterba
On Tue, Apr 06, 2021 at 04:55:03PM +0300, Nikolay Borisov wrote: > In case the right buffer is emptied it's first set to null and > subsequently it's dereferenced to get its size to pass to root_sub_used. > This naturally leads to a null pointer dereference. The correct thing > to do is to pass the

Re: [PATCH] btrfs-progs: Fix null pointer deref in balance_level

2021-04-08 Thread Josef Bacik
On 4/6/21 9:55 AM, Nikolay Borisov wrote: In case the right buffer is emptied it's first set to null and subsequently it's dereferenced to get its size to pass to root_sub_used. This naturally leads to a null pointer dereference. The correct thing to do is to pass the stashed right->len in "block

[PATCH] btrfs-progs: Fix null pointer deref in balance_level

2021-04-06 Thread Nikolay Borisov
In case the right buffer is emptied it's first set to null and subsequently it's dereferenced to get its size to pass to root_sub_used. This naturally leads to a null pointer dereference. The correct thing to do is to pass the stashed right->len in "blocksize". Fixes #296 Signed-off-by: Nikolay B