In addition to the IEEE-1394 Firewire support still being maintained within the Linux kernel, another Apple tech still seeing code churn within the Linux kernel years later are the HFS and HFS+ file-systems. For the Linux 6.18 kernel are more fixes to the HFS/HFS+ support.
Earlier in the year there was talk of potentially removing the HFS/HFS+ drivers from Linux over being unmaintained. But shining light onto that issue ended up leading to new maintainers stepping up to help with the aging file-system driver code. Since then fixes to the hfs and hfsplus drivers have surfaced and now for Linux 6.18 are yet more fixes.
This merge to Linux 6.18 Git on Monday provided the newest round of fixes to these old Apple file-system drivers:
“This contains several fixes of syzbot reported issues, HFS/HFS+ fixes of xfstests failures, and rework of HFS/HFS+ debug output subsystem.
– Kang Chen fixed a slab-out-of-bounds issue in hfsplus_uni2asc() when hfsplus_uni2asc() is called from hfsplus_listxattr().
– Yang Chenzhi fixed a crash in hfsplus_bmap_alloc() if record offset or length is larger than node_size.
– Yangtao Li corrected the error code from hfsplus_fill_super() if Catalog File contains corrupted record for the case of hidden directory’s type.
– KMSAN uninit-value fixes: hfs_find_set_zero_bits() and __hfsplus_ext_cache_extent() use kzalloc() instead of kmalloc(), and in hfsplus_delete_cat() by proper initialization of struct hfsplus_inode_info in the hfsplus_iget() logic.
– A slab-out-of-bounds issue could happen in hfsplus_strcasecmp() if the length field of struct hfsplus_unistr is bigger than HFSPLUS_MAX_STRLEN. Fixed by checking the length of comparing strings, and if the strings’ length is bigger than HFSPLUS_MAX_STRLEN, then the length is corrected to this value.
– The generic/736 xfstest failed for HFS because the HFS volume becomes corrupted after the test run.
The main reason was the absence of logic that corrects mdb->drNxtCNID/HFS_SB(sb)->next_id (next unused CNID) afterdeleting a record in Catalog File. That was fixed by implementing the necessary logic in hfs_correct_next_unused_CNID()”