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-next>] [day] [month] [year] [list]
Message-ID: <202209301555.UK7B8MPo-lkp@intel.com>
Date:   Fri, 30 Sep 2022 15:49:21 +0800
From:   kernel test robot <lkp@...el.com>
To:     Alexey Gladkov <legion@...nel.org>
Cc:     llvm@...ts.linux.dev, 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:14: error: implicit declaration of function
 'current_euid' is invalid in C99

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: x86_64-randconfig-a016-20220926
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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=clang make.cross W=1 O=build_dir ARCH=x86_64 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:228:14: error: implicit declaration of function 'current_euid' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   if (uid_eq(current_euid(), ns_root_uid))
                              ^
   ipc/ipc_sysctl.c:228:14: note: did you mean 'current_work'?
   include/linux/workqueue.h:467:28: note: 'current_work' declared here
   extern struct work_struct *current_work(void);
                              ^
>> ipc/ipc_sysctl.c:228:14: error: passing 'int' to parameter of incompatible type 'kuid_t'
                   if (uid_eq(current_euid(), ns_root_uid))
                              ^~~~~~~~~~~~~~
   include/linux/uidgid.h:61:34: note: passing argument to parameter 'left' here
   static inline bool uid_eq(kuid_t left, kuid_t right)
                                    ^
>> ipc/ipc_sysctl.c:231:12: error: implicit declaration of function 'in_egroup_p' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   else if (in_egroup_p(ns_root_gid))
                            ^
   3 errors generated.


vim +/current_euid +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" (150705 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ