kernel 6.5 changes cause UBSAN errors (patch included)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
broadcom-sta (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
"On Linux 6.5, due to commit 2d47c6956ab3 ("ubsan: Tighten UBSAN_BOUNDS
on GCC"), flexible trailing arrays declared like `whatever_t foo[1];`
will generate warnings when CONFIG_UBSAN & co. is enabled."
Due to changes in kernel 6.5, we get this error in dmesg:
[ 28.818756] =======
[ 28.822952] UBSAN: array-index-
[ 28.828888] index 2 is out of range for type 'ether_addr [1]'
[ 28.832900] CPU: 1 PID: 1232 Comm: avahi-daemon Tainted: P OE 6.5.0-rc4 #1
[ 28.836452] Hardware name: Apple Inc. MacBookPro11,
[ 28.839806] Call Trace:
[ 28.843091] <TASK>
[ 28.846387] dump_stack_
[ 28.849692] dump_stack+
[ 28.852965] __ubsan_
[ 28.856251] _wl_set_
[ 28.859191] wl_set_
[ 28.861879] __dev_set_
[ 28.864237] __dev_mc_
[ 28.866587] dev_mc_
[ 28.868920] igmp_group_
[ 28.871102] ____ip_
[ 28.873231] __ip_mc_
[ 28.875170] ip_mc_join_
[ 28.877111] do_ip_setsockop
[ 28.878894] ? __sys_setsockop
[ 28.880657] ip_setsockopt+
[ 28.882326] udp_setsockopt+
[ 28.883949] sock_common_
[ 28.885554] __sys_setsockop
[ 28.887063] __x64_sys_
[ 28.888564] do_syscall_
[ 28.889952] ? syscall_
[ 28.891226] ? __x64_sys_
[ 28.892450] ? do_syscall_
[ 28.893651] ? do_syscall_
[ 28.894796] entry_SYSCALL_
[ 28.895942] RIP: 0033:0x7f0a97a7ddae
[ 28.897100] Code: 0f 1f 40 00 48 8b 15 69 60 0d 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 f3 0f 1e fa 49 89 ca b8 36 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 0a c3 66 0f 1f 84 00 00 00 00 00 48 8b 15 31
[ 28.898270] RSP: 002b:00007fffb7
[ 28.899449] RAX: ffffffffffffffda RBX: 000000000000000c RCX: 00007f0a97a7ddae
[ 28.900623] RDX: 0000000000000023 RSI: 0000000000000000 RDI: 000000000000000c
[ 28.901784] RBP: 0000000000000001 R08: 000000000000000c R09: 0000000000000004
[ 28.902895] R10: 00007fffb7b1b404 R11: 0000000000000246 R12: 00007fffb7b1b404
[ 28.904011] R13: 0000000000000014 R14: 000055cc506ee078 R15: 000055cc506eaf60
[ 28.905149] </TASK>
[ 28.906228] =======
A patch is however available for this issue:
https:/
ProblemType: Bug
DistroRelease: Ubuntu 23.04
Package: bcmwl-kernel-source (not installed)
Uname: Linux 6.5.0-rc4 x86_64
NonfreeKernelMo
ApportVersion: 2.26.1-0ubuntu2
Architecture: amd64
CasperMD5CheckR
Date: Thu Aug 10 10:40:27 2023
ProcEnviron:
LANG=en_US.UTF-8
PATH=(custom, no user)
SHELL=/bin/bash
TERM=xterm-
SourcePackage: broadcom-sta
UpgradeStatus: No upgrade log present (probably fresh install)
The attachment "ubsan patch for broadcom-wl driver" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]