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: <CANaxB-wMOeR_aLfPdDKk-4RDp1Y0bwapbyGfp68Kg0p5M3-ZrQ@mail.gmail.com>
Date:   Tue, 7 Apr 2020 09:06:14 -0700
From:   Andrei Vagin <avagin@...il.com>
To:     Jan Kara <jack@...e.cz>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ucount: Make sure ucounts in /proc/sys/user don't regress again

On Tue, Apr 7, 2020 at 8:46 AM Jan Kara <jack@...e.cz> wrote:
>
> Commit 769071ac9f20 "ns: Introduce Time Namespace" broke reporting of
> inotify ucounts (max_inotify_instances, max_inotify_watches) in
> /proc/sys/user because it has added UCOUNT_TIME_NAMESPACES into enum
> ucount_type but didn't properly update reporting in
> kernel/ucount.c:setup_userns_sysctls(). This problem got fixed in commit
> eeec26d5da82 "time/namespace: Add max_time_namespaces ucount". Add
> BUILD_BUG_ON to catch a similar problem in the future.
>

Acked-by: Andrei Vagin <avagin@...il.com>

> Signed-off-by: Jan Kara <jack@...e.cz>
> ---
>  kernel/ucount.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/kernel/ucount.c b/kernel/ucount.c
> index a53cc2b4179c..3da4d868e452 100644
> --- a/kernel/ucount.c
> +++ b/kernel/ucount.c
> @@ -81,6 +81,8 @@ bool setup_userns_sysctls(struct user_namespace *ns)
>  {
>  #ifdef CONFIG_SYSCTL
>         struct ctl_table *tbl;
> +
> +       BUILD_BUG_ON(ARRAY_SIZE(user_table) != UCOUNT_COUNTS + 1);
>         setup_sysctl_set(&ns->set, &set_root, set_is_seen);
>         tbl = kmemdup(user_table, sizeof(user_table), GFP_KERNEL);
>         if (tbl) {
> --
> 2.16.4
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ