[Bug 216389] New: net/bluetooth/l2cap_core.c fails bounds check with GCC 12.2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
          Reporter: erhard_f@xxxxxxxxxxx
                CC: marcel@xxxxxxxxxxxx
        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.



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux