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]
Date:   Wed, 6 Oct 2021 09:57:22 -0400
From:   "Theodore Ts'o" <tytso@....edu>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Hao Sun <sunhao.th@...il.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-fsdevel@...r.kernel.org, viro@...iv.linux.org.uk,
        Christoph Hellwig <hch@....de>,
        Kees Cook <keescook@...omium.org>
Subject: Re: WARNING in __kernel_read

On Wed, Oct 06, 2021 at 01:17:32PM +0100, Matthew Wilcox wrote:
> finit_module() is not the only caller of kernel_read_file_from_fd()
> which passes it a fd that userspace passed in, for example
> kexec_file_load() doesn't validate the fd either.  We could validate
> the fd in individual syscalls, in kernel_read_file_from_fd()
> or just do what vfs_read() does and return -EBADF without warning.

My suggestion would be to do both, and keep a WARN() in
__kernel_read(), since that should never happen (and we want a stack
trace if it does).

						- Ted

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ