tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue.git 
dev-queue
head:   2746dc17cbf54ef20cc09a7ec6862477a326fae1
commit: 678aebbf361736b67e2d83264fb1f2b49ecf6bc0 [20/95] ice: add parser 
internal helper functions
config: x86_64-randconfig-161-20240609 
(https://download.01.org/0day-ci/archive/20240610/202406100753.38qaqzo9-...@intel.com/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <l...@intel.com>
| Reported-by: Dan Carpenter <dan.carpen...@linaro.org>
| Closes: https://lore.kernel.org/r/202406100753.38qaqzo9-...@intel.com/

smatch warnings:
drivers/net/ethernet/intel/ice/ice_parser.c:971 __ice_pg_nm_cam_match() error: 
memcmp() '&item->key.val' too small (9 vs 13)

vim +971 drivers/net/ethernet/intel/ice/ice_parser.c

678aebbf361736 Junfeng Guo 2024-05-27  967  static bool 
__ice_pg_nm_cam_match(struct ice_pg_nm_cam_item *item,
678aebbf361736 Junfeng Guo 2024-05-27  968                                
struct ice_pg_cam_key *key)
678aebbf361736 Junfeng Guo 2024-05-27  969  {
678aebbf361736 Junfeng Guo 2024-05-27  970      return (item->key.valid &&
678aebbf361736 Junfeng Guo 2024-05-27 @971              !memcmp(&item->key.val, 
&key->val, sizeof(key->val)));

This will read beyond the end of the "item->key.val".  They're similar
structs but key->val has u32 next_proto; at the end.

678aebbf361736 Junfeng Guo 2024-05-27  972  }

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Reply via email to