Skip to content

UBSAN: array-index-out-of-bounds in zfs/zap_micro.c:314:44 (mzap_ent_phys_t) #16391

Closed
@brlin-tw

Description

@brlin-tw

System information

Type Version/Name
Distribution Name Ubuntu
Distribution Version 24.04
Kernel Version 6.9.11-060911-generic from Ubuntu mainline kernel PPA
Architecture AMD64
OpenZFS Version 2.2.4 (w/ 2.2.2-0ubuntu9 userspace utils)

Describe the problem you're observing

I found the following log entries in the kernel log:

ZFS: Loaded module v2.2.4-1, ZFS pool version 5000, ZFS filesystem version 5
------------[ cut here ]------------
UBSAN: array-index-out-of-bounds in /var/lib/dkms/zfs/2.2.4/build/module/zfs/zap_micro.c:314:44
index 1 is out of range for type 'mzap_ent_phys_t [1]'
CPU: 12 PID: 1165 Comm: zpool Tainted: P           O       6.9.11-060911-generic #202407250836
Hardware name: Framework Laptop 13 (AMD Ryzen 7040Series)/FRANMDCP07, BIOS 03.05 03/29/2024
Call Trace:
 <TASK>
 dump_stack_lvl+0x76/0xa0
 dump_stack+0x10/0x20
 __ubsan_handle_out_of_bounds+0xcb/0x110
 zap_lockdir_impl+0x850/0x860 [zfs]
 zap_lockdir+0xc7/0x110 [zfs]
 zap_cursor_retrieve+0x1a2/0x3e0 [zfs]

    ...stripped...

Describe how to reproduce the problem

Just booting the system with ZFS volumes would reproduce this issue at my end.

Include any warning/errors/backtraces from the system logs

traces.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: DefectIncorrect behavior (e.g. crash, hang)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions