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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YTnrh2AUzActMoxl@infradead.org>
Date:   Thu, 9 Sep 2021 12:09:59 +0100
From:   Christoph Hellwig <hch@...radead.org>
To:     Andreas Gruenbacher <agruenba@...hat.com>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        Christoph Hellwig <hch@...radead.org>,
        "Darrick J. Wong" <djwong@...nel.org>, Jan Kara <jack@...e.cz>,
        Matthew Wilcox <willy@...radead.org>, cluster-devel@...hat.com,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        ocfs2-devel@....oracle.com
Subject: Re: [PATCH v7 01/19] iov_iter: Fix iov_iter_get_pages{,_alloc} page
 fault return value

On Fri, Aug 27, 2021 at 06:49:08PM +0200, Andreas Gruenbacher wrote:
> Both iov_iter_get_pages and iov_iter_get_pages_alloc return the number
> of bytes of the iovec they could get the pages for.  When they cannot
> get any pages, they're supposed to return 0, but when the start of the
> iovec isn't page aligned, the calculation goes wrong and they return a
> negative value.  Fix both functions.
> 
> In addition, change iov_iter_get_pages_alloc to return NULL in that case
> to prevent resource leaks.
> 
> Signed-off-by: Andreas Gruenbacher <agruenba@...hat.com>

Looks good,

Reviewed-by: Christoph Hellwig <hch@....de>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ