pop-os / linux

Pop!_OS fork of https://launchpad.net/ubuntu/+source/linux
Other
110 stars 13 forks source link

`UBSAN: array-index-out-of-bounds` dmesg error for many modules since 6.5.4 release #285

Open curiousercreative opened 9 months ago

curiousercreative commented 9 months ago

Here's a list of all the module errors:

$ sudo dmesg | grep 'UBSAN: array-index-out-of-bounds in'
[    5.288676] UBSAN: array-index-out-of-bounds in /build/linux-K8MOYl/linux-6.5.4/drivers/scsi/mpt3sas/mpt3sas_scsih.c:4667:12
[    5.288961] UBSAN: array-index-out-of-bounds in /build/linux-K8MOYl/linux-6.5.4/drivers/scsi/mpt3sas/mpt3sas_scsih.c:4023:12
[    5.289267] UBSAN: array-index-out-of-bounds in /build/linux-K8MOYl/linux-6.5.4/drivers/scsi/mpt3sas/mpt3sas_scsih.c:6810:36
[    5.290898] UBSAN: array-index-out-of-bounds in /build/linux-K8MOYl/linux-6.5.4/drivers/scsi/mpt3sas/mpt3sas_scsih.c:6598:38
[    5.291097] UBSAN: array-index-out-of-bounds in /build/linux-K8MOYl/linux-6.5.4/drivers/scsi/mpt3sas/mpt3sas_scsih.c:6602:36
[    5.291258] UBSAN: array-index-out-of-bounds in /build/linux-K8MOYl/linux-6.5.4/drivers/scsi/mpt3sas/mpt3sas_scsih.c:6619:7
[    5.291415] UBSAN: array-index-out-of-bounds in /build/linux-K8MOYl/linux-6.5.4/drivers/scsi/mpt3sas/mpt3sas_scsih.c:6666:21
[    5.291573] UBSAN: array-index-out-of-bounds in /build/linux-K8MOYl/linux-6.5.4/drivers/scsi/mpt3sas/mpt3sas_scsih.c:7649:32
[    5.291717] UBSAN: array-index-out-of-bounds in /build/linux-K8MOYl/linux-6.5.4/drivers/scsi/mpt3sas/mpt3sas_scsih.c:7651:23
[    5.291849] UBSAN: array-index-out-of-bounds in /build/linux-K8MOYl/linux-6.5.4/drivers/scsi/mpt3sas/mpt3sas_scsih.c:7655:12
[   28.077370] UBSAN: array-index-out-of-bounds in /var/lib/dkms/zfs/2.1.13/build/module/icp/os/modhash.c:801:27
[   28.079098] UBSAN: array-index-out-of-bounds in /var/lib/dkms/zfs/2.1.13/build/module/icp/os/modhash.c:589:36
[   28.080606] UBSAN: array-index-out-of-bounds in /var/lib/dkms/zfs/2.1.13/build/module/icp/os/modhash.c:591:18
[   30.583077] UBSAN: array-index-out-of-bounds in /var/lib/dkms/zfs/2.1.13/build/module/zfs/zap_leaf.c:394:26
[   30.644636] UBSAN: array-index-out-of-bounds in /var/lib/dkms/zfs/2.1.13/build/module/zfs/zap_micro.c:308:44
[   30.648555] UBSAN: array-index-out-of-bounds in /var/lib/dkms/zfs/2.1.13/build/module/zfs/zap_micro.c:467:34
[   30.653175] UBSAN: array-index-out-of-bounds in /var/lib/dkms/zfs/2.1.13/build/module/zfs/zap_micro.c:1624:28
[   30.662368] UBSAN: array-index-out-of-bounds in /var/lib/dkms/zfs/2.1.13/build/module/zfs/zap_micro.c:333:46
[   30.667515] UBSAN: array-index-out-of-bounds in /var/lib/dkms/zfs/2.1.13/build/module/zfs/zap_micro.c:1013:27
[   30.875905] UBSAN: array-index-out-of-bounds in /var/lib/dkms/zfs/2.1.13/build/module/zfs/zap_leaf.c:443:49
[   37.422008] UBSAN: array-index-out-of-bounds in /var/lib/dkms/zfs/2.1.13/build/module/zfs/zap_micro.c:1379:22
[   37.424059] UBSAN: array-index-out-of-bounds in /var/lib/dkms/zfs/2.1.13/build/module/zfs/zap_leaf.c:587:18
[   37.426293] UBSAN: array-index-out-of-bounds in /var/lib/dkms/zfs/2.1.13/build/module/zfs/zap_leaf.c:700:16
[   38.599576] UBSAN: array-index-out-of-bounds in /var/lib/dkms/zfs/2.1.13/build/module/zfs/zap_micro.c:1226:52
[   38.601375] UBSAN: array-index-out-of-bounds in /var/lib/dkms/zfs/2.1.13/build/module/zfs/zap_micro.c:308:44
[   38.603145] UBSAN: array-index-out-of-bounds in /var/lib/dkms/zfs/2.1.13/build/module/zfs/zap_micro.c:1439:4
[   39.269040] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxdrv/common/log/log.c:1791:41
[   39.269406] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:399:33
[   39.269705] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:596:45
[   39.270019] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxdrv/SUPDrvGip.c:1956:44
[   39.292996] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxdrv/SUPDrvGip.c:904:43
[   39.293301] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxdrv/SUPDrvGip.c:1392:24
[   39.293817] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxdrv/SUPDrvGip.c:1401:13
[   39.294244] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxdrv/SUPDrvGip.c:1460:35
[   39.294632] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxdrv/SUPDrvGip.c:1461:35
[   39.295028] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxdrv/SUPDrvGip.c:1462:5
[   39.295410] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxdrv/SUPDrvGip.c:1464:16
[   39.295807] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxdrv/SUPDrvGip.c:1465:16
[   39.296194] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxdrv/SUPDrvGip.c:1491:5
[   39.296594] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxdrv/SUPDrvGip.c:1457:40
[   39.308991] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxdrv/SUPDrvGip.c:4169:42
[   39.309175] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxdrv/SUPDrvGip.c:4206:46
[   39.309349] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxdrv/SUPDrvGip.c:4253:33
[   39.309523] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxdrv/SUPDrvGip.c:180:24
[   39.309729] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxdrv/SUPDrvGip.c:4041:33
[   39.309960] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxdrv/SUPDrvGip.c:4274:52
[   39.310120] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxdrv/SUPDrvGip.c:3997:53
[   39.334243] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxdrv/common/log/log.c:551:41
[   39.334407] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxdrv/common/log/log.c:4161:34
[  134.301106] UBSAN: array-index-out-of-bounds in /var/lib/dkms/zfs/2.1.13/build/module/zfs/zap_micro.c:674:40

Here's a sample of the full output for a single error:

[    5.288615] ================================================================================
[    5.288676] UBSAN: array-index-out-of-bounds in /build/linux-K8MOYl/linux-6.5.4/drivers/scsi/mpt3sas/mpt3sas_scsih.c:4667:12
[    5.288703] index 1 is out of range for type 'MPI2_EVENT_SAS_TOPO_PHY_ENTRY [1]'
[    5.288721] CPU: 15 PID: 0 Comm: swapper/15 Not tainted 6.5.4-76060504-generic #202309191142~1695998943~22.04~070916d
[    5.288723] Hardware name: Hewlett-Packard HP Z840 Workstation/2129, BIOS M60 v02.58 12/07/2021
[    5.288725] Call Trace:
[    5.288728]  <IRQ>
[    5.288730]  dump_stack_lvl+0x48/0x70
[    5.288740]  dump_stack+0x10/0x20
[    5.288743]  __ubsan_handle_out_of_bounds+0xc6/0x110
[    5.288750]  _scsih_check_topo_delete_events+0x2dc/0x350 [mpt3sas]
[    5.288792]  mpt3sas_scsih_event_callback+0x21f/0x630 [mpt3sas]
[    5.288808]  _base_async_event.isra.0+0x73/0x190 [mpt3sas]
[    5.288822]  _base_process_reply_queue+0x3a0/0x720 [mpt3sas]
[    5.288835]  _base_interrupt+0x4e/0x70 [mpt3sas]
[    5.288847]  __handle_irq_event_percpu+0x4f/0x1c0
[    5.288851]  handle_irq_event+0x39/0x80
[    5.288854]  handle_edge_irq+0x8c/0x250
[    5.288860]  __common_interrupt+0x56/0x110
[    5.288866]  common_interrupt+0x9f/0xb0
[    5.288870]  </IRQ>
[    5.288871]  <TASK>
[    5.288872]  asm_common_interrupt+0x27/0x40
[    5.288876] RIP: 0010:cpuidle_enter_state+0xda/0x720
[    5.288880] Code: 13 07 ff e8 e8 f5 ff ff 8b 53 04 49 89 c7 0f 1f 44 00 00 31 ff e8 16 bf 05 ff 80 7d d0 00 0f 85 61 02 00 00 fb 0f 1f 44 00 00 <45> 85 f6 0f 88 f7 01 00 00 4d 63 ee 49 83 fd 09 0f 87 19 05 00 00
[    5.288881] RSP: 0018:ffffbe944432fe18 EFLAGS: 00000246
[    5.288884] RAX: 0000000000000000 RBX: ffffde943d661e00 RCX: 0000000000000000
[    5.288885] RDX: 000000000000000f RSI: 0000000000000000 RDI: 0000000000000000
[    5.288886] RBP: ffffbe944432fe68 R08: 0000000000000000 R09: 0000000000000000
[    5.288887] R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff8b6cdb80
[    5.288888] R13: 0000000000000004 R14: 0000000000000004 R15: 000000013b399e16
[    5.288890]  ? cpuidle_enter_state+0xca/0x720
[    5.288892]  ? tick_nohz_stop_tick+0x50/0x210
[    5.288896]  cpuidle_enter+0x2e/0x50
[    5.288900]  call_cpuidle+0x23/0x60
[    5.288905]  cpuidle_idle_call+0x11d/0x190
[    5.288908]  do_idle+0x82/0xf0
[    5.288910]  cpu_startup_entry+0x1d/0x20
[    5.288913]  start_secondary+0x129/0x160
[    5.288919]  secondary_startup_64_no_verify+0x17e/0x18b
[    5.288924]  </TASK>
[    5.288925] ================================================================================
$ cat /etc/os-release
NAME="Pop!_OS"
VERSION="22.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 22.04 LTS"
VERSION_ID="22.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=jammy
UBUNTU_CODENAME=jammy
LOGO=distributor-logo-pop-os
leviport commented 9 months ago

Hmm, that was supposed to be addressed by https://github.com/pop-os/linux/pull/284

Good news is that there doesn't seem to be any adverse behavior, other than those messages junking up logs a bit.

curiousercreative commented 9 months ago

Yeah, I haven't noticed any issues aside from the log. Hoping it gets resolved some day :)

jackpot51 commented 9 months ago

I believe UBSAN became more strict with 6.5, and these are potential issues with various drivers that will be fixed with future kernel releases. These were present on older kernels but not reported.