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] [day] [month] [year] [list]
Message-ID: <CAGXu5j+S8fByq56DBrV3xQsoPmM9tXMa+Jm+ViuUcoTL3jM1OA@mail.gmail.com>
Date:   Mon, 15 Oct 2018 14:15:22 -0700
From:   Kees Cook <keescook@...omium.org>
To:     Christian Brauner <christian@...uner.io>
Cc:     Alexey Dobriyan <adobriyan@...il.com>,
        LKML <linux-kernel@...r.kernel.org>,
        "Eric W . Biederman" <ebiederm@...ssion.com>,
        "Luis R. Rodriguez" <mcgrof@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Joe Lawrence <joe.lawrence@...hat.com>,
        Waiman Long <longman@...hat.com>,
        Dominik Brodowski <linux@...inikbrodowski.net>,
        Al Viro <viro@...iv.linux.org.uk>
Subject: Re: Re: [PATCH v1 1/2] sysctl: cap to ULONG_MAX in proc_get_long()

On Mon, Oct 15, 2018 at 12:32 PM, Christian Brauner
<christian@...uner.io> wrote:
> On Mon, Oct 15, 2018 at 9:27 PM Alexey Dobriyan <adobriyan@...il.com> wrote:
>>
>> > int kstrtoul_bounded(const char *s, unsigned int base,
>> > char **trailing, unsigned long long *res)
>>
>> NO! The whole point is not have million variants of slightly different
>> integer parsing functions.
>> Cap it in the sysctl -- noone would care.
>
> (Please keep the CC list when replying.)
>
> Whatever works; I prefer the local strtoul_cap_erange() in kernel/sysctl.c as
> well.

This does match the standard of "evolution" for the kernel: there is
only one user currently, so keep it a static in sysctl.c. If we grow a
greater need, we can move it into lib/.

Reviewed-by: Kees Cook <keescook@...omium.org>

-Kees

-- 
Kees Cook
Pixel Security

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ