Hello satmandu, or anyone else affected,

Accepted broadcom-sta into jammy-proposed. The package will build now
and be available at https://launchpad.net/ubuntu/+source/broadcom-
sta/6.30.223.271-23~22.04.2 in a few hours, and then in the -proposed
repository.

Please help us by testing this new package.  See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed.  Your feedback will aid us getting this
update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, what testing has been
performed on the package and change the tag from verification-needed-
jammy to verification-done-jammy. If it does not fix the bug for you,
please add a comment stating that, and change the tag to verification-
failed-jammy. In either case, without details of your testing we will
not be able to proceed.

Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification .  Thank you in
advance for helping!

N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to broadcom-sta in Ubuntu.
https://bugs.launchpad.net/bugs/2030978

Title:
  [SRU] kernel 6.5 changes cause UBSAN errors (patch included)

Status in broadcom-sta package in Ubuntu:
  Fix Released
Status in broadcom-sta source package in Jammy:
  Fix Committed
Status in broadcom-sta source package in Noble:
  In Progress
Status in broadcom-sta source package in Plucky:
  Fix Committed
Status in broadcom-sta source package in Questing:
  Fix Released

Bug description:
  [SRU Justification]

  [ Impact ]

  array-index-out-of-bounds UBSAN warning in kernel dmesg.

  [ 28.818756] 
================================================================================
  [ 28.822952] UBSAN: array-index-out-of-bounds in 
/var/lib/dkms/broadcom-wl/6.30.223.271/build/src/wl/sys/wl_linux.c:1938:4
  [ 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,3/Mac-2BD1B31983FE1663, 
BIOS 432.60.3.0.0 10/27/2021
  [ 28.839806] Call Trace:
  [ 28.843091] <TASK>
  [ 28.846387] dump_stack_lvl+0x48/0x60
  [ 28.849692] dump_stack+0x10/0x20
  [ 28.852965] __ubsan_handle_out_of_bounds+0xc6/0x100
  [ 28.856251] _wl_set_multicast_list+0x1fd/0x220 [wl]
  [ 28.859191] wl_set_multicast_list+0x3a/0x80 [wl]
  [ 28.861879] __dev_set_rx_mode+0x6a/0xc0
  [ 28.864237] __dev_mc_add+0x82/0x90
  [ 28.866587] dev_mc_add+0x10/0x20
  [ 28.868920] igmp_group_added+0x198/0x1d0
  [ 28.871102] ____ip_mc_inc_group+0x185/0x2b0
  [ 28.873231] __ip_mc_join_group+0x108/0x170
  [ 28.875170] ip_mc_join_group+0x10/0x20
  [ 28.877111] do_ip_setsockopt+0x104d/0x1160
  [ 28.878894] ? __sys_setsockopt+0xeb/0x1c0
  [ 28.880657] ip_setsockopt+0x30/0xb0
  [ 28.882326] udp_setsockopt+0x22/0x40
  [ 28.883949] sock_common_setsockopt+0x14/0x20
  [ 28.885554] __sys_setsockopt+0xde/0x1c0
  [ 28.887063] __x64_sys_setsockopt+0x1f/0x30
  [ 28.888564] do_syscall_64+0x55/0x80
  [ 28.889952] ? syscall_exit_to_user_mode+0x26/0x40
  [ 28.891226] ? __x64_sys_recvmsg+0x1d/0x20
  [ 28.892450] ? do_syscall_64+0x61/0x80
  [ 28.893651] ? do_syscall_64+0x61/0x80
  [ 28.894796] entry_SYSCALL_64_after_hwframe+0x46/0xb0
  [ 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:00007fffb7b1b3f8 EFLAGS: 00000246 ORIG_RAX: 
0000000000000036
  [ 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] 
================================================================================

  [ Test Plan ]

  1. Install broadcom-sta-dkms from plucky/noble -proposed pocket
  2. The dkms should rebuild itself against the running kernel automatically; 
if not rebuild them manually with:

     $ sudo dkms install --force broadcom-sta/6.30.223.271 -k $(uname
  -r)

  3. Reboot to load the kernel module
  4. There should be no more UBSAN warning in dmesg.

  [ Where problems could occur ]

  This doesn't affect the rest part of the system, and it doesn't
  introduce functional changes.

  [ Other Info ]

  This affects series with kernels >= 6.5. Nominate Questing, Plucky,
  Noble and Jammy.

  ========== original bug report ==========

  "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-out-of-bounds in 
/var/lib/dkms/broadcom-wl/6.30.223.271/build/src/wl/sys/wl_linux.c:1938:4
  [   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,3/Mac-2BD1B31983FE1663, 
BIOS 432.60.3.0.0 10/27/2021
  [   28.839806] Call Trace:
  [   28.843091]  <TASK>
  [   28.846387]  dump_stack_lvl+0x48/0x60
  [   28.849692]  dump_stack+0x10/0x20
  [   28.852965]  __ubsan_handle_out_of_bounds+0xc6/0x100
  [   28.856251]  _wl_set_multicast_list+0x1fd/0x220 [wl]
  [   28.859191]  wl_set_multicast_list+0x3a/0x80 [wl]
  [   28.861879]  __dev_set_rx_mode+0x6a/0xc0
  [   28.864237]  __dev_mc_add+0x82/0x90
  [   28.866587]  dev_mc_add+0x10/0x20
  [   28.868920]  igmp_group_added+0x198/0x1d0
  [   28.871102]  ____ip_mc_inc_group+0x185/0x2b0
  [   28.873231]  __ip_mc_join_group+0x108/0x170
  [   28.875170]  ip_mc_join_group+0x10/0x20
  [   28.877111]  do_ip_setsockopt+0x104d/0x1160
  [   28.878894]  ? __sys_setsockopt+0xeb/0x1c0
  [   28.880657]  ip_setsockopt+0x30/0xb0
  [   28.882326]  udp_setsockopt+0x22/0x40
  [   28.883949]  sock_common_setsockopt+0x14/0x20
  [   28.885554]  __sys_setsockopt+0xde/0x1c0
  [   28.887063]  __x64_sys_setsockopt+0x1f/0x30
  [   28.888564]  do_syscall_64+0x55/0x80
  [   28.889952]  ? syscall_exit_to_user_mode+0x26/0x40
  [   28.891226]  ? __x64_sys_recvmsg+0x1d/0x20
  [   28.892450]  ? do_syscall_64+0x61/0x80
  [   28.893651]  ? do_syscall_64+0x61/0x80
  [   28.894796]  entry_SYSCALL_64_after_hwframe+0x46/0xb0
  [   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:00007fffb7b1b3f8 EFLAGS: 00000246 ORIG_RAX: 
0000000000000036
  [   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://gist.github.com/joanbm/9cd5fda1dcfab9a67b42cc6195b7b269

  ProblemType: Bug
  DistroRelease: Ubuntu 23.04
  Package: bcmwl-kernel-source (not installed)
  Uname: Linux 6.5.0-rc4 x86_64
  NonfreeKernelModules: wl zfs
  ApportVersion: 2.26.1-0ubuntu2
  Architecture: amd64
  CasperMD5CheckResult: unknown
  Date: Thu Aug 10 10:40:27 2023
  ProcEnviron:
   LANG=en_US.UTF-8
   PATH=(custom, no user)
   SHELL=/bin/bash
   TERM=xterm-256color
  SourcePackage: broadcom-sta
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/broadcom-sta/+bug/2030978/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to