lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAOi1vP_dYP05Wj1fpH-U2WLGhOBp3RmFXPvjYmjorx_MLZW6Zg@mail.gmail.com>
Date:   Mon, 16 Dec 2019 11:18:30 +0100
From:   Ilya Dryomov <idryomov@...il.com>
To:     Aditya Pakki <pakki001@....edu>
Cc:     kjlu@....edu, Sage Weil <sage@...hat.com>,
        Dongsheng Yang <dongsheng.yang@...ystack.cn>,
        Jens Axboe <axboe@...nel.dk>,
        Ceph Development <ceph-devel@...r.kernel.org>,
        linux-block <linux-block@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] rbd: Avoid calling BUG() when object_map is not empty

On Sun, Dec 15, 2019 at 5:35 PM Aditya Pakki <pakki001@....edu> wrote:
>
> In __rbd_object_map_load, if object_map contains data, return
> error -EINVAL upstream, instead of crashing, via BUG. The patch
> fixes this issue.
>
> Signed-off-by: Aditya Pakki <pakki001@....edu>
> ---
>  drivers/block/rbd.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
> index 2b184563cd32..6e9a11f32a94 100644
> --- a/drivers/block/rbd.c
> +++ b/drivers/block/rbd.c
> @@ -1892,7 +1892,8 @@ static int __rbd_object_map_load(struct rbd_device *rbd_dev)
>         int num_pages;
>         int ret;
>
> -       rbd_assert(!rbd_dev->object_map && !rbd_dev->object_map_size);
> +       if (rbd_dev->object_map || rbd_dev->object_map_size)
> +               return -EINVAL;
>
>         num_objects = ceph_get_num_objects(&rbd_dev->layout,
>                                            rbd_dev->mapping.size);

Hi Aditya,

Could you explain what issue is being fixed?  Did you hit this assert?
If so, under what circumstances?  The fact that __rbd_object_map_load()
can fail doesn't mean that it shouldn't have asserts...

Thanks,

                Ilya

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ