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: <CALYGNiPt+6GB5DfvuPWHY1yJQFFsE3UWGdvhotzGeif2zdBrGA@mail.gmail.com>
Date:	Fri, 2 Oct 2015 14:21:39 +0300
From:	Konstantin Khlebnikov <koct9i@...il.com>
To:	Roman Gushchin <klamm@...dex-team.ru>
Cc:	Miklos Szeredi <miklos@...redi.hu>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	fuse-devel@...ts.sourceforge.net,
	Al Viro <viro@...iv.linux.org.uk>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] fuse: break infinite loop in fuse_fill_write_pages()

Bump. Add more peopple in CC.

On Mon, Sep 21, 2015 at 1:02 PM, Roman Gushchin <klamm@...dex-team.ru> wrote:
> I got a report about unkillable task eating CPU. Thge further
> investigation shows, that the problem is in the fuse_fill_write_pages()
> function. If iov's first segment has zero length, we get an infinite
> loop, because we never reach iov_iter_advance() call.
>
> Fix this by calling iov_iter_advance() before repeating an attempt to
> copy data from userspace.
>
> A similar problem is described in 124d3b7041f ("fix writev regression:
> pan hanging unkillable and un-straceable").
>
> Signed-off-by: Roman Gushchin <klamm@...dex-team.ru>
> Cc: Miklos Szeredi <miklos@...redi.hu>
> ---
>  fs/fuse/file.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/fuse/file.c b/fs/fuse/file.c
> index f523f2f..195476a 100644
> --- a/fs/fuse/file.c
> +++ b/fs/fuse/file.c
> @@ -1049,6 +1049,7 @@ static ssize_t fuse_fill_write_pages(struct fuse_req *req,
>                 tmp = iov_iter_copy_from_user_atomic(page, ii, offset, bytes);
>                 flush_dcache_page(page);
>
> +               iov_iter_advance(ii, tmp);
>                 if (!tmp) {
>                         unlock_page(page);
>                         page_cache_release(page);
> @@ -1061,7 +1062,6 @@ static ssize_t fuse_fill_write_pages(struct fuse_req *req,
>                 req->page_descs[req->num_pages].length = tmp;
>                 req->num_pages++;
>
> -               iov_iter_advance(ii, tmp);
>                 count += tmp;
>                 pos += tmp;
>                 offset += tmp;
> --
> 2.4.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ