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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <7fa19b78076e400f8f51c563746d697d@huawei.com>
Date:   Wed, 2 Sep 2020 01:46:32 +0000
From:   linmiaohe <linmiaohe@...wei.com>
To:     Christoph Hellwig <hch@...radead.org>
CC:     "axboe@...nel.dk" <axboe@...nel.dk>,
        "linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] block: Fix potential page reference leak in
 __bio_iov_iter_get_pages()

Christoph Hellwig <hch@...radead.org> wrote:
>On Tue, Sep 01, 2020 at 08:00:06AM -0400, Miaohe Lin wrote:
>> When bio is full, __bio_iov_iter_get_pages() would return error 
>> directly while left page reference still held in pages. Release these references.
>> Also advance the iov_iter according to what we have done successfully.
>> 
>> Fixes: 576ed9135489 ("block: use bio_add_page in 
>> bio_iov_iter_get_pages")
>> Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
>
>The WARN_ON means something is fundamentally wrong here.  I think a few leaked pages are the least of our problems in this case.

Yes, WARN_ON means something is fundamentally wrong here. But IMO it's not really a big problem when bio is full.
We should not simply rely on this WARN_ON and we can handle this gracefully.
Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ