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: <CAJKOXPd6nDi6x+iZ8jke-7qFb=DDjnStkQS9=0PfTZExA7i6jQ@mail.gmail.com>
Date:   Thu, 15 Oct 2020 21:58:37 +0200
From:   Krzysztof Kozlowski <krzk@...nel.org>
To:     Kees Cook <keescook@...omium.org>
Cc:     Christian Borntraeger <borntraeger@...ibm.com>,
        Sven Schnelle <svens@...ux.ibm.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Christoph Hellwig <hch@...radead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Linux-Next Mailing List <linux-next@...r.kernel.org>,
        "viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>
Subject: Re: autofs crash with latest linux-next

On Thu, 15 Oct 2020 at 21:28, Kees Cook <keescook@...omium.org> wrote:
>
> On Wed, Oct 14, 2020 at 09:15:47AM +0200, Krzysztof Kozlowski wrote:
> > I hit this since few days as well. Although the bisect points to the
> > merge, the issue looks like a result of mentioned commit 4d03e3cc5982
> > ("fs: don't allow kernel reads and writes without iter ops").
> >
> > The __kernel_read() last argument 'pos' can be NULL and it is
> > dereferenced here (added by the commit):
> >
> >  525 ssize_t __kernel_write(struct file *file, const void *buf, size_t count, loff_t *pos)
> > ...
> >  547         kiocb.ki_pos = *pos;
> >  548         iov_iter_kvec(&iter, WRITE, &iov, 1, iov.iov_len);
> >
> >
> > The __kernel_read() is called with NULL in fs/autofs/waitq.c:
> >
> >  45 static int autofs_write(struct autofs_sb_info *sbi,
> >  46                         struct file *file, const void *addr, int bytes)
> >
> > ...
> >  54         mutex_lock(&sbi->pipe_mutex);
> >  55         while (bytes) {
> >  56                 wr = __kernel_write(file, data, bytes, NULL);
>
> I think the thread here is the same thing, but you've found it in
> autofs...
> https://lore.kernel.org/lkml/CAHk-=wgj=mKeN-EfV5tKwJNeHPLG0dybq+R5ZyGuc4WeUnqcmA@mail.gmail.com/

Indeed it looks the same. Thanks for the pointer.

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ