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: <d0d111ef-edae-4760-83fb-36db84278da1@t-8ch.de>
Date:   Sat, 24 Jun 2023 09:29:23 +0200
From:   Thomas Weißschuh <thomas@...ch.de>
To:     Zhangjin Wu <falcon@...ylab.org>, arnd@...db.de, w@....eu
Cc:     linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v1 00/17] selftests/nolibc: allow run with minimal kernel
 config

On 2023-06-24 08:52:55+0200, Thomas Weißschuh wrote:
> As for the CONFIG_NET dependency, which I would guess is one of the more
> expensive configs to enable:
> 
> link_cross can be easily adapted to instead use /proc/self.
> 
> chmod_net relies on /proc/$PID/net accepting chmod().
> It is the only file in /proc/$PID/ that works that way.
> 
> Maybe its a kernel bug anyways and we shouldn't rely on it anyways?
> I'm taking a look.

It indeed seems to be a kernel bug. The following patch aligns
/proc/$PID/net with all the other /proc/$PID stuff.

diff --git a/fs/proc/proc_net.c b/fs/proc/proc_net.c
index a0c0419872e3..8c5e9abf4380 100644
--- a/fs/proc/proc_net.c
+++ b/fs/proc/proc_net.c
@@ -320,6 +320,7 @@ static int proc_tgid_net_getattr(struct mnt_idmap *idmap,
 
 const struct inode_operations proc_net_inode_operations = {
 	.lookup		= proc_tgid_net_lookup,
+	.setattr	= proc_setattr,
 	.getattr	= proc_tgid_net_getattr,
 };

I'm not entirely sure about the process to synchronize the application
of the fix in the procfs tree and the fix/removal of the testcase in the
nolibc tree so we avoid broken states.
Or if this would technically be a (relevant) break of userspace ABI and
therefore has to stay as it is.

Any ideas?

Thomas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ