zfs-dkms UBSAN array-out-of-bounds warning with kernel 6.5 on mantic

Bug #2033385 reported by Andrea Righi
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zfs-linux (Ubuntu)
Fix Released
Undecided
Steve Langasek
Mantic
Fix Released
Undecided
Steve Langasek

Bug Description

[Impact]

When the zfs module is loaded we can see the following errors in dmesg with the latest 6.5 kernel in mantic:

[ 10.730318] UBSAN: array-index-out-of-bounds in /build/mantic/debian/build/build-generic/_______________________________________________________________________________________________dkms/build/zfs/2.2.0~rc3/build/module/zfs/vdev_raidz_math_impl.h:1475:22
[ 10.734075] index 6 is out of range for type 'raidz_col_t [*]'

[Test case]

 $ sudo apt install zfs-dkms

[Fix]

Apply this patch to properly support varlen arrays and prevent the UBSAN warnings:

 https://github.com/ckane/zfs/commit/095a435cd5129b25ebc1b090613b73059719bae5

[Regression potential]

This change is limited to ZFS, so we may experience regressions in those systems that are using ZFS filesystems or zpool volumes.

Tags: patch
Revision history for this message
Andrea Righi (arighi) wrote :

debdiff in attach fixes the UBSAN warnings with linux 6.5 on mantic.

Revision history for this message
Andrea Righi (arighi) wrote :

Add LP bug reference to the changelog.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "zfs-fix-ubsan-warnings.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Steve Langasek (vorlon) wrote :

looks good, thank you

Changed in zfs-linux (Ubuntu Mantic):
status: New → Fix Committed
assignee: nobody → Steve Langasek (vorlon)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package zfs-linux - 2.2.0~rc3-0ubuntu2

---------------
zfs-linux (2.2.0~rc3-0ubuntu2) mantic; urgency=medium

  * Fix UBSAN array-index-out-of-bounds warnings (LP: #2033385):
    - debian/patches/4630-ubsan-Support-varlen-arrays-at-end-of-struct-as-1-or.patch

 -- Andrea Righi <email address hidden> Tue, 29 Aug 2023 09:37:56 +0000

Changed in zfs-linux (Ubuntu Mantic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.