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: <202007261550.vmElqFBf%lkp@intel.com>
Date:   Sun, 26 Jul 2020 15:20:07 +0800
From:   kernel test robot <lkp@...el.com>
To:     B K Karthik <bkkarthik@...u.pes.edu>,
        Steffen Klassert <steffen.klassert@...unet.com>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        "David S. Miller" <davem@...emloft.net>,
        Alexey Kuznetsov <kuznet@....inr.ac.ru>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        Jakub Kicinski <kuba@...nel.org>, linux-kernel@...r.kernel.org,
        gregkh@...uxfoundation.org, skhan@...uxfoundation.org
Cc:     kbuild-all@...ts.01.org, netdev@...r.kernel.org
Subject: Re: [PATCH v2] net: ipv6: fix use-after-free Read in
 __xfrm6_tunnel_spi_lookup

Hi K,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on ipsec/master]
[also build test WARNING on ipsec-next/master sparc-next/master net-next/master net/master v5.8-rc6 next-20200724]
[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/0day-ci/linux/commits/B-K-Karthik/net-ipv6-fix-use-after-free-Read-in-__xfrm6_tunnel_spi_lookup/20200726-111019
base:   https://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec.git master
config: alpha-allyesconfig (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.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
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha 

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

All warnings (new ones prefixed by >>):

   net/ipv6/xfrm6_tunnel.c: In function '__xfrm6_tunnel_spi_check':
>> net/ipv6/xfrm6_tunnel.c:106:43: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     106 |  int index = xfrm6_tunnel_spi_hash_byaddr((const xfrm_address_t *)spi);
         |                                           ^

vim +106 net/ipv6/xfrm6_tunnel.c

   101	
   102	static int __xfrm6_tunnel_spi_check(struct net *net, u32 spi)
   103	{
   104		struct xfrm6_tunnel_net *xfrm6_tn = xfrm6_tunnel_pernet(net);
   105		struct xfrm6_tunnel_spi *x6spi;
 > 106		int index = xfrm6_tunnel_spi_hash_byaddr((const xfrm_address_t *)spi);
   107	
   108		hlist_for_each_entry(x6spi,
   109				     &xfrm6_tn->spi_byaddr[index],
   110				     list_byspi) {
   111			if (x6spi->spi == spi)
   112				return -1;
   113		}
   114		return index;
   115	}
   116	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (65029 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ