From: kernel test robot <lkp@intel.com>
To: B K Karthik <bkkarthik@pesu.pes.edu>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
Jakub Kicinski <kuba@kernel.org>,
linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
skhan@linuxfounation.org
Cc: kbuild-all@lists.01.org, netdev@vger.kernel.org
Subject: Re: [PATCH] net: ipv6: fix slab-out-of-bounds Read in __xfrm6_tunnel_spi_check
Date: Sun, 26 Jul 2020 03:48:30 +0800 [thread overview]
Message-ID: <202007260359.8srqbgru%lkp@intel.com> (raw)
In-Reply-To: <20200725133031.a5uxkpikopntgu4c@pesu.pes.edu>
[-- Attachment #1: Type: text/plain, Size: 2637 bytes --]
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 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-slab-out-of-bounds-Read-in-__xfrm6_tunnel_spi_check/20200725-213142
base: https://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec.git master
config: parisc-allyesconfig (attached as .config)
compiler: hppa-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=parisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.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: passing argument 1 of 'xfrm6_tunnel_spi_hash_byaddr' makes pointer from integer without a cast [-Wint-conversion]
106 | int index = xfrm6_tunnel_spi_hash_byaddr(spi);
| ^~~
| |
| u32 {aka unsigned int}
net/ipv6/xfrm6_tunnel.c:57:79: note: expected 'const xfrm_address_t *' {aka 'const union <anonymous> *'} but argument is of type 'u32' {aka 'unsigned int'}
57 | static inline unsigned int xfrm6_tunnel_spi_hash_byaddr(const xfrm_address_t *addr)
| ~~~~~~~~~~~~~~~~~~~~~~^~~~
vim +/xfrm6_tunnel_spi_hash_byaddr +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(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
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 65343 bytes --]
next prev parent reply other threads:[~2020-07-25 19:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-25 13:30 [PATCH] net: ipv6: fix slab-out-of-bounds Read in __xfrm6_tunnel_spi_check B K Karthik
2020-07-25 19:48 ` kernel test robot [this message]
2020-07-26 7:55 ` kernel test robot
2020-07-29 0:33 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202007260359.8srqbgru%lkp@intel.com \
--to=lkp@intel.com \
--cc=bkkarthik@pesu.pes.edu \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=herbert@gondor.apana.org.au \
--cc=kbuild-all@lists.01.org \
--cc=kuba@kernel.org \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=skhan@linuxfounation.org \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).