New: net/bluetooth/l2cap_core.c fails bounds check with GCC 12.2
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: [email protected]
Reporter: [email protected]
CC: [email protected]
Regression: NoCreated 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 2Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are the assignee for the bug.
[Bug 216389] net/bluetooth/l2cap_core.c fails bounds check with GCC 12.2
https://bugzilla.kernel.org/show_bug.cgi?id=216389
Artem S. Tashkinov ([email protected]) changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |ANSWERED--- Comment #1 from Artem S. Tashkinov ([email protected]) --- This will be fixed eventually, might have already been fixed in 6.0-rc2.
Removing -Werror will fix it as well.
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are the assignee for the bug.
[Bug 216389] net/bluetooth/l2cap_core.c fails bounds check with GCC 12.2
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=216389
--- Comment #2 from Erhard F. ([email protected]) --- 6.0-rc2 still affected. But of course removing -Werror 'fixes' it.
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are the assignee for the bug.
[Bug 216389] net/bluetooth/l2cap_core.c fails bounds check with GCC 12.2
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=216389
Luiz Von Dentz ([email protected]) changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #3 from Luiz Von Dentz ([email protected]) --- The following patch should fix it:
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are the assignee for the bug.
[Bug 216389] net/bluetooth/l2cap_core.c fails bounds check with GCC 12.2
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=216389
--- Comment #4 from Erhard F. ([email protected]) --- (In reply to Luiz Von Dentz from comment #3)
Quoted 4 lines
The following patch should fix it:
https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/
commit/?id=1d71d9223e4143d3638f60c7bb291844c237556c
Correct. Thanks!
I'll close here as 'fixed' when the patch makes it into -rc.
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are the assignee for the bug.