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:   Fri, 2 Nov 2018 10:15:56 -0700
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     mst@...hat.com, Al Viro <viro@...iv.linux.org.uk>
Cc:     mark.rutland@....com, Kees Cook <keescook@...omium.org>,
        kvm@...r.kernel.org, virtualization@...ts.linux-foundation.org,
        netdev@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        bijan.mottahedeh@...cle.com, gedwards@....com, joe@...ches.com,
        lenaic@...ard.fr, liang.z.li@...el.com, mhocko@...nel.org,
        mhocko@...e.com, stefanha@...hat.com, wei.w.wang@...el.com,
        jasowang@...hat.com
Subject: Re: [PULL] vhost: cleanups and fixes

On Fri, Nov 2, 2018 at 10:10 AM Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
> Don't you take over the VM with "use_mm()" when you do the copies? So
> yes, it's a kernel thread, but it has a user VM, and though that
> should have the user limits.

Oooh. *Just* as I sent this, I realized that "use_mm()" doesn't update
the thread addr_limit.

That actually looks like a bug to me - although one that you've
apparently been aware of and worked around.

Wouldn't it be nicer to just make "use_mm()" do

        set_fs(USER_DS);

instead? And undo it on unuse_mm()?

And, in fact, maybe we should default kernel threads to have a zero
address limit, so that they can't do any user accesses at all without
doing this?

Adding Al to the cc, because I think he's been looking at set_fs() in general.

                  Linus

Powered by blists - more mailing lists