Apple HFS/HFS+ File-System Drivers See More Fixes With Linux 6.18
([Apple] 112 Minutes Ago
Apple HFS)
- Reference: 0001581660
- News link: https://www.phoronix.com/news/Apple-HFS-Linux-6.18
- Source link:
In addition to the [1]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 [2]talk of potentially removing the HFS/HFS+ drivers from Linux over being unmaintained. But shining light onto that issue ended up leading to [3]new maintainers stepping up to help with the aging file-system driver code . Since then [4]fixes to the hfs and hfsplus drivers have surfaced and now for Linux 6.18 are yet more fixes.
[5]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()"
[1] https://www.phoronix.com/news/Linux-6.18-Firewire
[2] https://www.phoronix.com/news/Linux-2025-Sad-State-HFS
[3] https://www.phoronix.com/news/Apple-HFS-2025-Linux-Maintain
[4] https://www.phoronix.com/news/Apple-HFS-Linux-6.17
[5] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b3e1c7855e8e1c4d77685ce4a8cd9cdd576058eb
Earlier in the year there was [2]talk of potentially removing the HFS/HFS+ drivers from Linux over being unmaintained. But shining light onto that issue ended up leading to [3]new maintainers stepping up to help with the aging file-system driver code . Since then [4]fixes to the hfs and hfsplus drivers have surfaced and now for Linux 6.18 are yet more fixes.
[5]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()"
[1] https://www.phoronix.com/news/Linux-6.18-Firewire
[2] https://www.phoronix.com/news/Linux-2025-Sad-State-HFS
[3] https://www.phoronix.com/news/Apple-HFS-2025-Linux-Maintain
[4] https://www.phoronix.com/news/Apple-HFS-Linux-6.17
[5] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b3e1c7855e8e1c4d77685ce4a8cd9cdd576058eb
mobadboy