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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200626133714.GB12646@lst.de>
Date:   Fri, 26 Jun 2020 15:37:14 +0200
From:   Christoph Hellwig <hch@....de>
To:     Luis Chamberlain <mcgrof@...nel.org>
Cc:     Christoph Hellwig <hch@....de>, Al Viro <viro@...iv.linux.org.uk>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Matthew Wilcox <willy@...radead.org>,
        Kees Cook <keescook@...omium.org>,
        Iurii Zaikin <yzaikin@...gle.com>,
        linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 8/9] fs: don't allow kernel reads and writes without
 iter ops

On Fri, Jun 26, 2020 at 12:27:52PM +0000, Luis Chamberlain wrote:
> On Fri, Jun 26, 2020 at 09:58:35AM +0200, Christoph Hellwig wrote:
> > diff --git a/fs/read_write.c b/fs/read_write.c
> > index e765c95ff3440d..ae463bcadb6906 100644
> > --- a/fs/read_write.c
> > +++ b/fs/read_write.c
> > @@ -420,6 +420,18 @@ ssize_t iter_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos,
> >  	return ret;
> >  }
> >  
> > +static void warn_unsupported(struct file *file, const char *op)
> > +{
> > +	char pathname[128], *path;
> 
> Why 128? How about kstrdup_quotable_file()?

This is in the read/write path for the case where we did not end up
calling in the driver.  This is far less stack usage than any read/write
method would have used eventually.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ