* [linux-next:master 9226/9381] include/net/bluetooth/bluetooth.h:364:16: warning: 'memcmp' specified bound 6 exceeds source size 0
@ 2023-10-03 13:38 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-10-03 13:38 UTC (permalink / raw)
To: Lee, Chun-Yi
Cc: oe-kbuild-all, Linux Memory Management List, Luiz Augusto von Dentz
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: c9f2baaa18b5ea8f006a2b3a616da9597c71d15e
commit: d70e44fef8621aeae895e1cbc62059df9e31836b [9226/9381] Bluetooth: Reject connection with the device which has same BD_ADDR
config: arm64-randconfig-r002-20230421 (https://download.01.org/0day-ci/archive/20231003/202310032158.OvfQjd58-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231003/202310032158.OvfQjd58-lkp@intel.com/reproduce)
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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310032158.OvfQjd58-lkp@intel.com/
All warnings (new ones prefixed by >>):
net/bluetooth/hci_event.c: In function 'hci_cc_read_class_of_dev':
net/bluetooth/hci_event.c:522:9: warning: 'memcpy' writing 3 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
522 | memcpy(hdev->dev_class, rp->dev_class, 3);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: note: destination object is likely at address zero
In file included from net/bluetooth/hci_event.c:30:
In function 'bacmp',
inlined from 'hci_conn_request_evt' at net/bluetooth/hci_event.c:3274:7:
>> include/net/bluetooth/bluetooth.h:364:16: warning: 'memcmp' specified bound 6 exceeds source size 0 [-Wstringop-overread]
364 | return memcmp(ba1, ba2, sizeof(bdaddr_t));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/memcmp +364 include/net/bluetooth/bluetooth.h
^1da177e4c3f41 Linus Torvalds 2005-04-16 360
^1da177e4c3f41 Linus Torvalds 2005-04-16 361 /* Copy, swap, convert BD Address */
f53c20e93612f7 David Rheinsberg 2013-04-06 362 static inline int bacmp(const bdaddr_t *ba1, const bdaddr_t *ba2)
^1da177e4c3f41 Linus Torvalds 2005-04-16 363 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 @364 return memcmp(ba1, ba2, sizeof(bdaddr_t));
^1da177e4c3f41 Linus Torvalds 2005-04-16 365 }
f53c20e93612f7 David Rheinsberg 2013-04-06 366 static inline void bacpy(bdaddr_t *dst, const bdaddr_t *src)
^1da177e4c3f41 Linus Torvalds 2005-04-16 367 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 368 memcpy(dst, src, sizeof(bdaddr_t));
^1da177e4c3f41 Linus Torvalds 2005-04-16 369 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 370
:::::: The code at line 364 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-10-03 13:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-03 13:38 [linux-next:master 9226/9381] include/net/bluetooth/bluetooth.h:364:16: warning: 'memcmp' specified bound 6 exceeds source size 0 kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox