public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@kernel.org
To: linux-bluetooth@vger.kernel.org
Subject: [Bug 216389] New: net/bluetooth/l2cap_core.c fails bounds check with GCC 12.2
Date: Sun, 21 Aug 2022 11:50:14 +0000	[thread overview]
Message-ID: <bug-216389-62941@https.bugzilla.kernel.org/> (raw)

https://bugzilla.kernel.org/show_bug.cgi?id=216389

            Bug ID: 216389
           Summary: net/bluetooth/l2cap_core.c fails bounds check with GCC
                    12.2
           Product: Drivers
           Version: 2.5
    Kernel Version: 5.19.2
          Hardware: PPC-64
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Bluetooth
          Assignee: linux-bluetooth@vger.kernel.org
          Reporter: erhard_f@mailbox.org
                CC: marcel@holtmann.org
        Regression: No

Created attachment 301616
  --> https://bugzilla.kernel.org/attachment.cgi?id=301616&action=edit
kernel .config (5.19.2, Talos II Secure Workstation)

I get this on my Talos II when building v5.19.2. Does not happen with GCC 11.3.

 # make
  CALL    scripts/checksyscalls.sh
  CALL    scripts/atomic/check-atomics.sh
  CHK     include/generated/compile.h
  CC [M]  net/bluetooth/l2cap_core.o
In file included from ./include/linux/string.h:253,
                 from ./include/linux/bitmap.h:11,
                 from ./include/linux/cpumask.h:12,
                 from ./include/linux/mm_types_task.h:14,
                 from ./include/linux/mm_types.h:5,
                 from ./include/linux/buildid.h:5,
                 from ./include/linux/module.h:14,
                 from net/bluetooth/l2cap_core.c:31:
In function 'memcmp',
    inlined from 'bacmp' at ./include/net/bluetooth/bluetooth.h:302:9,
    inlined from 'l2cap_global_chan_by_psm' at
net/bluetooth/l2cap_core.c:2002:15:
./include/linux/fortify-string.h:44:33: error: '__builtin_memcmp' specified
bound 6 exceeds source size 0 [-Werror=stringop-overread]
   44 | #define __underlying_memcmp     __builtin_memcmp
      |                                 ^
./include/linux/fortify-string.h:420:16: note: in expansion of macro
'__underlying_memcmp'
  420 |         return __underlying_memcmp(p, q, size);
      |                ^~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [scripts/Makefile.build:249: net/bluetooth/l2cap_core.o] Fehler 1
make[1]: *** [scripts/Makefile.build:466: net/bluetooth] Fehler 2
make: *** [Makefile:1849: net] Fehler 2

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

             reply	other threads:[~2022-08-21 11:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-21 11:50 bugzilla-daemon [this message]
2022-08-22  2:01 ` [Bug 216389] net/bluetooth/l2cap_core.c fails bounds check with GCC 12.2 bugzilla-daemon
2022-08-23 10:45 ` bugzilla-daemon
2022-08-23 17:22 ` bugzilla-daemon
2022-08-24 12:36 ` bugzilla-daemon

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=bug-216389-62941@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@kernel.org \
    --cc=linux-bluetooth@vger.kernel.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