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]
Date:   Tue, 3 Aug 2021 19:40:26 -0700
From:   Nathan Chancellor <nathan@...nel.org>
To:     Sven Schnelle <svens@...ux.ibm.com>
Cc:     "Eric W. Biederman" <ebiederm@...ssion.com>,
        Alexey Gladkov <legion@...nel.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] ucounts: add missing data type changes

On Fri, Jul 30, 2021 at 08:28:54AM +0200, Sven Schnelle wrote:
> commit f9c82a4ea89c3 ("Increase size of ucounts to atomic_long_t")
> changed the data type of ucounts/ucounts_max to long, but missed to
> adjust a few other places. This is noticeable on big endian platforms
> from user space because the /proc/sys/user/max_*_names files all
> contain 0.
> 
> Fixes: f9c82a4ea89c ("Increase size of ucounts to atomic_long_t")
> Signed-off-by: Sven Schnelle <svens@...ux.ibm.com>

This patch in -next as commit e43fc41d1f7f ("ucounts: add missing data type
changes") causes Windows Subsystem for Linux to fail to start:

[error 0x8007010b when launching `wsl.exe -d Arch'] Could not access starting
directory "\\wsl$\Arch\home\nathan"

Specifically, it is the change to max_user_watches in
fs/notify/inotify/inotify_user.c, as the below diff gets me back to working.
Unfortunately, I have no additional information to offer beyond that as WSL's
init is custom and closed source (as far as I am aware) and there are no real
debugging utilities.

Cheers,
Nathan

diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c
index 55fe7cdea2fb..32178a95c1b3 100644
--- a/fs/notify/inotify/inotify_user.c
+++ b/fs/notify/inotify/inotify_user.c
@@ -68,9 +68,9 @@ struct ctl_table inotify_table[] = {
        {
                .procname       = "max_user_watches",
                .data           = &init_user_ns.ucount_max[UCOUNT_INOTIFY_WATCHES],
-               .maxlen         = sizeof(long),
+               .maxlen         = sizeof(int),
                .mode           = 0644,
-               .proc_handler   = proc_doulongvec_minmax,
+               .proc_handler   = proc_dointvec_minmax,
                .extra1         = SYSCTL_ZERO,
                .extra2         = SYSCTL_INT_MAX,
        },

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ