From: kernel test robot <lkp@intel.com>
To: "Lee, Chun-Yi" <jlee@suse.com>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Subject: [linux-next:master 9226/9381] include/net/bluetooth/bluetooth.h:364:16: warning: 'memcmp' specified bound 6 exceeds source size 0
Date: Tue, 3 Oct 2023 21:38:59 +0800 [thread overview]
Message-ID: <202310032158.OvfQjd58-lkp@intel.com> (raw)
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
reply other threads:[~2023-10-03 13:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202310032158.OvfQjd58-lkp@intel.com \
--to=lkp@intel.com \
--cc=jlee@suse.com \
--cc=linux-mm@kvack.org \
--cc=luiz.von.dentz@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
/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