[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20221103163312.GO5824@twin.jikos.cz>
Date: Thu, 3 Nov 2022 17:33:12 +0100
From: David Sterba <dsterba@...e.cz>
To: Liu Shixin <liushixin2@...wei.com>
Cc: Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
David Sterba <dsterba@...e.com>, linux-btrfs@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] btrfs: fix match incorrectly in dev_args_match_device
On Thu, Nov 03, 2022 at 04:33:01PM +0800, Liu Shixin wrote:
> syzkaller found an assert failed:
>
> assertion failed: (args->devid != (u64)-1) || args->missing, in fs/btrfs/volumes.c:6921
>
> This can be trigger when we set devid to (u64)-1) by ioctl. In this case,
> the match of devid will be skipped and the match of device may be succeed
> incorrectly.
>
> Patch 562d7b1512f7 introduced this function which is used to match device.
> This function contaions two matching scenarios, we can distinguish them by
> checking the value of args->missing rather than check whether args->devid
> and args->uuid is default value.
>
> Reported-by: syzbot+031687116258450f9853@...kaller.appspotmail.com
> Fixes: 562d7b1512f7 ("btrfs: handle device lookup with btrfs_dev_lookup_args")
> Signed-off-by: Liu Shixin <liushixin2@...wei.com>
Added to misc-next, thanks.
Powered by blists - more mailing lists