Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
brlin-tw opened this issue Jul 27, 2024 · 2 comments
Closed
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@brlin-tw
Copy link

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

@brlin-tw brlin-tw added the Type: Defect Incorrect behavior (e.g. crash, hang) label Jul 27, 2024
@brlin-tw brlin-tw changed the title UBSAN: array-index-out-of-bounds in zfs/zap_micro.c:314:44 UBSAN: array-index-out-of-bounds in zfs/zap_micro.c:314:44 (mzap_ent_phys_t) Jul 27, 2024
@robn
Copy link
Member

robn commented Jul 27, 2024

Thanks for the report. This was already fixed in #16330 and will be fixed in 2.2.5 as well.

@brlin-tw
Copy link
Author

@robn

Thanks for the info! As this issue appears to be a duplicate of #16278 I'll close it for good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

No branches or pull requests

2 participants