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>] [day] [month] [year] [list]
Date:   Fri, 30 Sep 2022 15:49:23 +0800
From:   kernel test robot <lkp@...el.com>
To:     Alexey Gladkov <legion@...nel.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        "Eric W. Biederman" <ebiederm@...ssion.com>
Subject: [ebiederm-user-namespace:unpriv-ipc-sysctls-for-v6.1 1/3]
 ipc/ipc_sysctl.c:228:28: error: implicit declaration of function
 'current_euid'; did you mean 'current_work'?

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git unpriv-ipc-sysctls-for-v6.1
head:   7608b6a72ed04607cc832248cbd52fb5e68bd42c
commit: 54e1011bd95a49d8e68feb3aa4d29cc8a6d9a4a3 [1/3] sysctl: Allow change system v ipc sysctls inside ipc namespace
config: arc-randconfig-r043-20220928
compiler: arc-elf-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git/commit/?id=54e1011bd95a49d8e68feb3aa4d29cc8a6d9a4a3
        git remote add ebiederm-user-namespace https://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git
        git fetch --no-tags ebiederm-user-namespace unpriv-ipc-sysctls-for-v6.1
        git checkout 54e1011bd95a49d8e68feb3aa4d29cc8a6d9a4a3
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   ipc/ipc_sysctl.c: In function 'ipc_permissions':
>> ipc/ipc_sysctl.c:228:28: error: implicit declaration of function 'current_euid'; did you mean 'current_work'? [-Werror=implicit-function-declaration]
     228 |                 if (uid_eq(current_euid(), ns_root_uid))
         |                            ^~~~~~~~~~~~
         |                            current_work
>> ipc/ipc_sysctl.c:228:28: error: incompatible type for argument 1 of 'uid_eq'
     228 |                 if (uid_eq(current_euid(), ns_root_uid))
         |                            ^~~~~~~~~~~~~~
         |                            |
         |                            int
   In file included from include/linux/stat.h:20,
                    from include/linux/module.h:13,
                    from ipc/ipc_sysctl.c:8:
   include/linux/uidgid.h:61:34: note: expected 'kuid_t' but argument is of type 'int'
      61 | static inline bool uid_eq(kuid_t left, kuid_t right)
         |                           ~~~~~~~^~~~
>> ipc/ipc_sysctl.c:231:26: error: implicit declaration of function 'in_egroup_p' [-Werror=implicit-function-declaration]
     231 |                 else if (in_egroup_p(ns_root_gid))
         |                          ^~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +228 ipc/ipc_sysctl.c

   206	
   207	static int ipc_permissions(struct ctl_table_header *head, struct ctl_table *table)
   208	{
   209		int mode = table->mode;
   210	
   211	#ifdef CONFIG_CHECKPOINT_RESTORE
   212		struct ipc_namespace *ns =
   213			container_of(head->set, struct ipc_namespace, ipc_set);
   214	
   215		if (((table->data == &ns->ids[IPC_SEM_IDS].next_id) ||
   216		     (table->data == &ns->ids[IPC_MSG_IDS].next_id) ||
   217		     (table->data == &ns->ids[IPC_SHM_IDS].next_id)) &&
   218		    checkpoint_restore_ns_capable(ns->user_ns))
   219			mode = 0666;
   220		else
   221	#endif
   222		{
   223			kuid_t ns_root_uid;
   224			kgid_t ns_root_gid;
   225	
   226			ipc_set_ownership(head, table, &ns_root_uid, &ns_root_gid);
   227	
 > 228			if (uid_eq(current_euid(), ns_root_uid))
   229				mode >>= 6;
   230	
 > 231			else if (in_egroup_p(ns_root_gid))
   232				mode >>= 3;
   233		}
   234	
   235		mode &= 7;
   236	
   237		return (mode << 6) | (mode << 3) | mode;
   238	}
   239	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (177253 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ