apfs-dkms DKMS FTBFS wrt Linux 6.5

Bug #2029217 reported by Paolo Pisati
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-apfs-rw (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

...
In file included from ./include/linux/string.h:254,
                 from ./include/linux/bitmap.h:11,
                 from ./include/linux/cpumask.h:12,
                 from ./arch/x86/include/asm/paravirt.h:17,
                 from ./arch/x86/include/asm/cpuid.h:62,
                 from ./arch/x86/include/asm/processor.h:19,
                 from ./arch/x86/include/asm/cpufeature.h:5,
                 from ./arch/x86/include/asm/thread_info.h:53,
                 from ./include/linux/thread_info.h:60,
                 from ./arch/x86/include/asm/preempt.h:9,
                 from ./include/linux/preempt.h:79,
                 from ./include/linux/spinlock.h:56,
                 from ./include/linux/mmzone.h:8,
                 from ./include/linux/gfp.h:7,
                 from ./include/linux/slab.h:16,
                 from /var/lib/dkms/linux-apfs-rw/0.3.2-0ubuntu1/build/dir.c:6:
In function ‘strcpy’,
    inlined from ‘apfs_build_sibling_val’ at /var/lib/dkms/linux-apfs-rw/0.3.2-0ubuntu1/build/dir.c:437:2,
    inlined from ‘apfs_create_sibling_link_rec’ at /var/lib/dkms/linux-apfs-rw/0.3.2-0ubuntu1/build/dir.c:478:12,
    inlined from ‘apfs_create_sibling_recs’ at /var/lib/dkms/linux-apfs-rw/0.3.2-0ubuntu1/build/dir.c:559:8:
./include/linux/fortify-string.h:798:17: error: call to ‘__write_overflow’ declared with attribute error: detected write beyond size of object (1st parameter)
  798 | __write_overflow();
...

[Fix]

Apply the attached fix.

[How to test]

Install the patched package and make sure it builds.

[Regression potential]

High - the DKMS was broken in several ways:

1) __SOURCE_FORTIFY reported several out of bounds strcpy() - i switched all the strcpy() instances to the secure strscpy() version

2) blk_dev_get_*() switched exclusive access model so some logic had to be massaged

I pushed the fixes upstream so we get a second review (and in the mean time we unclock 6.5 promotion).

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-apfs-rw - 0.3.2-0ubuntu2

---------------
linux-apfs-rw (0.3.2-0ubuntu2) mantic; urgency=medium

  * debian/patches/0001-linux-6.5-substitute-strcpy-with-strscpy.patch,
    debian/patches/0002-linux-6.5-fix-blkdev_get_by_path-holder-and-superblo.patch:
    - Fix Linux 6.5 (LP: #2029217)

 -- Paolo Pisati <email address hidden> Tue, 01 Aug 2023 09:50:01 +0000

Changed in linux-apfs-rw (Ubuntu):
status: New → 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.