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: <CAADnVQL3iBoem4T6CxYeZRCJwS7qRwjjbW+8ip5r3-LCt_eRXQ@mail.gmail.com>
Date:   Mon, 8 Jun 2020 09:40:17 -0700
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Christoph Hellwig <hch@....de>, Stanislav Fomichev <sdf@...gle.com>
Cc:     Vegard Nossum <vegard.nossum@...cle.com>,
        Kees Cook <keescook@...omium.org>,
        Iurii Zaikin <yzaikin@...gle.com>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        LKML <linux-kernel@...r.kernel.org>,
        Al Viro <viro@...iv.linux.org.uk>, bpf <bpf@...r.kernel.org>,
        Andrey Ignatov <rdna@...com>
Subject: Re: WARNING: CPU: 1 PID: 52 at mm/page_alloc.c:4826
 __alloc_pages_nodemask (Re: [PATCH 5/5] sysctl: pass kernel pointers to ->proc_handler)

On Mon, Jun 8, 2020 at 6:05 AM Christoph Hellwig <hch@....de> wrote:
>
> On Mon, Jun 08, 2020 at 09:45:49AM +0200, Vegard Nossum wrote:
> > Just a test case.
> >
> > Allowing the kernel to allocate an unbounded amount of memory on behalf
> > of userspace is an easy DOS.
> >
> > All the length checks were already in there, e.g.
> >
> >  static int cmm_timeout_handler(struct ctl_table *ctl, int write,
> >                               void __user *buffer, size_t *lenp, loff_t
> > *ppos)
> >  {
> >         char buf[64], *p;
> > [...]
> >                 len = min(*lenp, sizeof(buf));
> >                 if (copy_from_user(buf, buffer, len))
> >                         return -EFAULT;
>
> Doesn't help if we don't know the exact limit yet.  But we can put
> some arbitrary but reasonable limit like KMALLOC_MAX_SIZE on the
> sysctls and see if this sticks.

adding Stanislav. I think he's looking into this already.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ