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, 14 Jun 2022 16:51:24 +0800
From:   kernel test robot <lkp@...el.com>
To:     Micah Morton <mortonm@...omium.org>,
        linux-security-module@...r.kernel.org
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        keescook@...omium.org, jmorris@...ei.org, serge@...lyn.com,
        linux-kernel@...r.kernel.org, Micah Morton <mortonm@...omium.org>
Subject: Re: [PATCH 1/2] security: Add LSM hook to setgroups() syscall

Hi Micah,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on jmorris-security/next-testing kees/for-next/pstore v5.19-rc2 next-20220614]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/intel-lab-lkp/linux/commits/Micah-Morton/security-Add-LSM-hook-to-setgroups-syscall/20220614-050341
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git b13baccc3850ca8b8cccbf8ed9912dbaa0fdf7f3
config: x86_64-randconfig-a002-20220613 (https://download.01.org/0day-ci/archive/20220614/202206141619.gvenMkdS-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project c97436f8b6e2718286e8496faf53a2c800e281cf)
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://github.com/intel-lab-lkp/linux/commit/b21cba6f759a2a60439de4d0f85323ed745b3ade
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Micah-Morton/security-Add-LSM-hook-to-setgroups-syscall/20220614-050341
        git checkout b21cba6f759a2a60439de4d0f85323ed745b3ade
        # 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 >>):

>> kernel/groups.c:143:6: error: assigning to 'struct cred *' from 'typeof (*(get_current()->cred)) *' (aka 'const struct cred *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
           old = current_cred();
               ^ ~~~~~~~~~~~~~~
>> kernel/groups.c:147:2: error: use of undeclared identifier 'retval'
           retval = security_task_fix_setgroups(new, old);
           ^
   kernel/groups.c:148:6: error: use of undeclared identifier 'retval'
           if (retval < 0)
               ^
   kernel/groups.c:155:9: error: use of undeclared identifier 'retval'
           return retval;
                  ^
   4 errors generated.


vim +143 kernel/groups.c

   126	
   127	/**
   128	 * set_current_groups - Change current's group subscription
   129	 * @group_info: The group list to impose
   130	 *
   131	 * Validate a group subscription and, if valid, impose it upon current's task
   132	 * security record.
   133	 */
   134	int set_current_groups(struct group_info *group_info)
   135	{
   136		struct cred *new;
   137		struct cred *old;
   138	
   139		new = prepare_creds();
   140		if (!new)
   141			return -ENOMEM;
   142	
 > 143		old = current_cred();
   144	
   145		set_groups(new, group_info);
   146	
 > 147		retval = security_task_fix_setgroups(new, old);
   148		if (retval < 0)
   149			goto error;
   150	
   151		return commit_creds(new);
   152	
   153	error:
   154		abort_creds(new);
   155		return retval;
   156	}
   157	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ