Skip to content

UBSAN: array-index-out-of-bounds in main.c:860:27 #2175

@devZer0

Description

@devZer0

Hello, i'm getting this kernel trace in dmesg when running csysdig from sysdig 0.41.2 with scap 8.1.0+driver on ubuntu 25.10 with kernel 6.17

so far it seems to work, but this message being thrown

[ 25.993749] scap: loading out-of-tree module taints kernel.
[ 25.993758] scap: module verification failed: signature and/or required key missing - tainting kernel
[ 25.995071] scap: driver loading, scap 8.1.0+driver
[ 25.996149] scap: adding new consumer 00000000ce51621a
[ 25.996164] scap: initializing ring buffer for CPU 0
[ 26.003004] scap: CPU buffer initialized, size=8388608
[ 26.003008] scap: initializing ring buffer for CPU 1
[ 26.013529] scap: CPU buffer initialized, size=8388608
[ 26.013534] scap: initializing ring buffer for CPU 2
[ 26.023994] scap: CPU buffer initialized, size=8388608
[ 26.023999] scap: initializing ring buffer for CPU 3
[ 26.032125] scap: CPU buffer initialized, size=8388608
[ 26.709843] ------------[ cut here ]------------
[ 26.709849] UBSAN: array-index-out-of-bounds in main.c:860:27
[ 26.709880] index 0 is out of range for type 'ppm_proc_info []'
[ 26.709896] CPU: 3 UID: 0 PID: 1319 Comm: csysdig Tainted: G OE 6.17.0-7-generic #7-Ubuntu PREEMPT(voluntary)
[ 26.709901] Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE
[ 26.709902] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014
[ 26.709906] Call Trace:
[ 26.709913]
[ 26.709920] show_stack+0x49/0x60
[ 26.709934] dump_stack_lvl+0x5f/0x90
[ 26.709942] dump_stack+0x10/0x18
[ 26.709945] ubsan_epilogue+0x9/0x39
[ 26.709950] __ubsan_handle_out_of_bounds.cold+0x50/0x55
[ 26.709959] ppm_ioctl+0x331/0x890 [scap]
[ 26.709971] __x64_sys_ioctl+0xa3/0x100
[ 26.709979] x64_sys_call+0x1151/0x2330
[ 26.709982] do_syscall_64+0x81/0xc90
[ 26.709987] ? __alloc_frozen_pages_noprof+0x180/0x360
[ 26.709992] ? mod_memcg_lruvec_state+0x101/0x2f0
[ 26.709998] ? __lruvec_stat_mod_folio+0x8d/0x100
[ 26.710001] ? set_ptes.isra.0+0x3b/0x90
[ 26.710005] ? _raw_spin_unlock+0xe/0x40
[ 26.710009] ? do_anonymous_page+0x105/0x540
[ 26.710016] ? handle_pte_fault+0x1d7/0x1f0
[ 26.710019] ? __handle_mm_fault+0x59d/0x720
[ 26.710023] ? count_memcg_events+0xe7/0x250
[ 26.710025] ? handle_mm_fault+0x1e8/0x2f0
[ 26.710028] ? arch_exit_to_user_mode_prepare.isra.0+0xd/0x100
[ 26.710034] ? irqentry_exit_to_user_mode+0x2d/0x1d0
[ 26.710039] ? irqentry_exit+0x43/0x50
[ 26.710042] ? exc_page_fault+0x90/0x1b0
[ 26.710045] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 26.710047] RIP: 0033:0x70562af3287d
[ 26.710052] Code: 04 25 28 00 00 00 48 89 45 c8 31 c0 48 8d 45 10 c7 45 b0 10 00 00 00 48 89 45 b8 48 8d 45 d0 48 89 45 c0 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1a 48 8b 45 c8 64 48 2b 04 25 28 00 00 00
[ 26.710054] RSP: 002b:00007ffcb2e4a2d0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[ 26.710059] RAX: ffffffffffffffda RBX: 00007ffcb2e4a3a0 RCX: 000070562af3287d
[ 26.710060] RDX: 0000000013b5ffd0 RSI: 0000000000007310 RDI: 0000000000000003
[ 26.710061] RBP: 00007ffcb2e4a320 R08: 0000000000000000 R09: 00000000000000b8
[ 26.710062] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
[ 26.710063] R13: 0000000000000100 R14: 0000000013b53830 R15: 0000000013b53bc8
[ 26.710066]
[ 26.710066] ---[ end trace ]---
[ 26.710073] ------------[ cut here ]------------
[ 26.710074] UBSAN: array-index-out-of-bounds in main.c:865:28
[ 26.710084] index 0 is out of range for type 'ppm_proc_info [
]'
[ 26.710094] CPU: 3 UID: 0 PID: 1319 Comm: csysdig Tainted: G OE 6.17.0-7-generic #7-Ubuntu PREEMPT(voluntary)
[ 26.710096] Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE
[ 26.710097] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014
[ 26.710102] Call Trace:
[ 26.710103]
[ 26.710103] show_stack+0x49/0x60
[ 26.710107] dump_stack_lvl+0x5f/0x90
[ 26.710110] dump_stack+0x10/0x18
[ 26.710113] ubsan_epilogue+0x9/0x39
[ 26.710115] __ubsan_handle_out_of_bounds.cold+0x50/0x55
[ 26.710119] ppm_ioctl+0x347/0x890 [scap]
[ 26.710124] __x64_sys_ioctl+0xa3/0x100
[ 26.710127] x64_sys_call+0x1151/0x2330
[ 26.710129] do_syscall_64+0x81/0xc90
[ 26.710132] ? __alloc_frozen_pages_noprof+0x180/0x360
[ 26.710135] ? mod_memcg_lruvec_state+0x101/0x2f0
[ 26.710139] ? __lruvec_stat_mod_folio+0x8d/0x100
[ 26.710142] ? set_ptes.isra.0+0x3b/0x90
[ 26.710144] ? _raw_spin_unlock+0xe/0x40
[ 26.710147] ? do_anonymous_page+0x105/0x540
[ 26.710150] ? handle_pte_fault+0x1d7/0x1f0
[ 26.710153] ? __handle_mm_fault+0x59d/0x720
[ 26.710157] ? count_memcg_events+0xe7/0x250
[ 26.710159] ? handle_mm_fault+0x1e8/0x2f0
[ 26.710162] ? arch_exit_to_user_mode_prepare.isra.0+0xd/0x100
[ 26.710165] ? irqentry_exit_to_user_mode+0x2d/0x1d0
[ 26.710168] ? irqentry_exit+0x43/0x50
[ 26.710170] ? exc_page_fault+0x90/0x1b0
[ 26.710172] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 26.710174] RIP: 0033:0x70562af3287d
[ 26.710175] Code: 04 25 28 00 00 00 48 89 45 c8 31 c0 48 8d 45 10 c7 45 b0 10 00 00 00 48 89 45 b8 48 8d 45 d0 48 89 45 c0 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1a 48 8b 45 c8 64 48 2b 04 25 28 00 00 00
[ 26.710176] RSP: 002b:00007ffcb2e4a2d0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[ 26.710178] RAX: ffffffffffffffda RBX: 00007ffcb2e4a3a0 RCX: 000070562af3287d
[ 26.710179] RDX: 0000000013b5ffd0 RSI: 0000000000007310 RDI: 0000000000000003
[ 26.710180] RBP: 00007ffcb2e4a320 R08: 0000000000000000 R09: 00000000000000b8
[ 26.710181] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
[ 26.710182] R13: 0000000000000100 R14: 0000000013b53830 R15: 0000000013b53bc8
[ 26.710185]
[ 26.710215] ---[ end trace ]---
[ 26.710217] ------------[ cut here ]------------
[ 26.710218] UBSAN: array-index-out-of-bounds in main.c:866:28
[ 26.710229] index 0 is out of range for type 'ppm_proc_info [*]'
[ 26.710239] CPU: 3 UID: 0 PID: 1319 Comm: csysdig Tainted: G OE 6.17.0-7-generic #7-Ubuntu PREEMPT(voluntary)
[ 26.710241] Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE
[ 26.710242] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014
[ 26.710243] Call Trace:
[ 26.710243]
[ 26.710244] show_stack+0x49/0x60
[ 26.710248] dump_stack_lvl+0x5f/0x90
[ 26.710251] dump_stack+0x10/0x18
[ 26.710254] ubsan_epilogue+0x9/0x39
[ 26.710256] __ubsan_handle_out_of_bounds.cold+0x50/0x55
[ 26.710259] ppm_ioctl+0x366/0x890 [scap]
[ 26.710265] __x64_sys_ioctl+0xa3/0x100
[ 26.710268] x64_sys_call+0x1151/0x2330
[ 26.710270] do_syscall_64+0x81/0xc90
[ 26.710273] ? __alloc_frozen_pages_noprof+0x180/0x360
[ 26.710276] ? mod_memcg_lruvec_state+0x101/0x2f0
[ 26.710280] ? __lruvec_stat_mod_folio+0x8d/0x100
[ 26.710284] ? set_ptes.isra.0+0x3b/0x90
[ 26.710286] ? _raw_spin_unlock+0xe/0x40
[ 26.710288] ? do_anonymous_page+0x105/0x540
[ 26.710291] ? handle_pte_fault+0x1d7/0x1f0
[ 26.710294] ? __handle_mm_fault+0x59d/0x720
[ 26.710297] ? count_memcg_events+0xe7/0x250
[ 26.710299] ? handle_mm_fault+0x1e8/0x2f0
[ 26.710302] ? arch_exit_to_user_mode_prepare.isra.0+0xd/0x100
[ 26.710305] ? irqentry_exit_to_user_mode+0x2d/0x1d0
[ 26.710307] ? irqentry_exit+0x43/0x50
[ 26.710310] ? exc_page_fault+0x90/0x1b0
[ 26.710313] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 26.710314] RIP: 0033:0x70562af3287d
[ 26.710315] Code: 04 25 28 00 00 00 48 89 45 c8 31 c0 48 8d 45 10 c7 45 b0 10 00 00 00 48 89 45 b8 48 8d 45 d0 48 89 45 c0 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1a 48 8b 45 c8 64 48 2b 04 25 28 00 00 00
[ 26.710317] RSP: 002b:00007ffcb2e4a2d0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[ 26.710318] RAX: ffffffffffffffda RBX: 00007ffcb2e4a3a0 RCX: 000070562af3287d
[ 26.710320] RDX: 0000000013b5ffd0 RSI: 0000000000007310 RDI: 0000000000000003
[ 26.710321] RBP: 00007ffcb2e4a320 R08: 0000000000000000 R09: 00000000000000b8
[ 26.710322] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
[ 26.710323] R13: 0000000000000100 R14: 0000000013b53830 R15: 0000000013b53bc8
[ 26.710325]
[ 26.710326] ---[ end trace ]---
[ 41.455027] scap: deallocating consumer 00000000ce51621a

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions