CVE-2024-41059: hfsplus: fix uninit-value in copy_name

Published Jul 29, 2024
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

hfsplus: fix uninit-value in copyname

[syzbot reported] BUG: KMSAN: uninit-value in sizedstrscpy+0xc4/0x160 sizedstrscpy+0xc4/0x160 copyname+0x2af/0x320 fs/hfsplus/xattr.c:411 hfspluslistxattr+0x11e9/0x1a50 fs/hfsplus/xattr.c:750 vfslistxattr fs/xattr.c:493 [inline] listxattr+0x1f3/0x6b0 fs/xattr.c:840 pathlistxattr fs/xattr.c:864 [inline] dosyslistxattr fs/xattr.c:876 [inline] sesyslistxattr fs/xattr.c:873 [inline] x64syslistxattr+0x16b/0x2f0 fs/xattr.c:873 x64syscall+0x2ba0/0x3b50 arch/x86/include/generated/asm/syscalls64.h:195 dosyscallx64 arch/x86/entry/common.c:52 [inline] dosyscall64+0xcf/0x1e0 arch/x86/entry/common.c:83 entrySYSCALL64afterhwframe+0x77/0x7f

Uninit was created at: slabpostallochook mm/slub.c:3877 [inline] slaballocnode mm/slub.c:3918 [inline] kmalloctrace+0x57b/0xbe0 mm/slub.c:4065 kmalloc include/linux/slab.h:628 [inline] hfspluslistxattr+0x4cc/0x1a50 fs/hfsplus/xattr.c:699 vfslistxattr fs/xattr.c:493 [inline] listxattr+0x1f3/0x6b0 fs/xattr.c:840 pathlistxattr fs/xattr.c:864 [inline] dosyslistxattr fs/xattr.c:876 [inline] sesyslistxattr fs/xattr.c:873 [inline] x64syslistxattr+0x16b/0x2f0 fs/xattr.c:873 x64syscall+0x2ba0/0x3b50 arch/x86/include/generated/asm/syscalls64.h:195 dosyscallx64 arch/x86/entry/common.c:52 [inline] dosyscall64+0xcf/0x1e0 arch/x86/entry/common.c:83 entrySYSCALL64afterhwframe+0x77/0x7f [Fix] When allocating memory to strbuf, initialize memory to 0.

Other sources

This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.

Launchpad

Affected Software

9 affected componentsFixes available
Linux Linux kernel<4.19.319
Linux Linux kernel>=4.20<5.4.281
Linux Linux kernel>=5.5<5.10.223
Linux Linux kernel>=5.11<5.15.164
Linux Linux kernel>=5.16<6.1.101
Linux Linux kernel>=6.2<6.6.42
Linux Linux kernel>=6.7<6.9.11
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.22-16.12.25-1
debian/linux-6.1
6.1.129-1~deb11u1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.22-1Fixed in 6.12.25-1
  2. Upgrade

    Upgrade debian/linux-6.1 to a version that resolves this vulnerability.

    Fixed in 6.1.129-1~deb11u1
  3. Configuration

    In the hfsplus xattr code path where strbuf is allocated, initialize the allocated memory for strbuf to 0 (the fix states: "When allocating memory to strbuf, initialize memory to 0.").

    Linux kernel (hfsplus/xattr.c) strbuf allocation initialization = 0

Event History

Jul 29, 2024
CVE Published
via MITRE·02:57 PM
Data Sourced
via MITRE·02:57 PM
DescriptionSeverity
Data Sourced
via NVD·03:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Oct 31, 2024
Data Sourced
via Launchpad·04:20 PM
Description
May 5, 2025
Data Sourced
via Ubuntu·12:33 AM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-41059?

CVE-2024-41059 is classified as a medium severity vulnerability in the Linux kernel.

2

What versions of Linux kernel are affected by CVE-2024-41059?

CVE-2024-41059 affects Linux kernel versions from 4.20 to 6.1.101, as well as versions between 5.5 and 6.6.42.

3

How do I fix CVE-2024-41059?

To fix CVE-2024-41059, you should upgrade to a patched version of the Linux kernel such as 5.10.223-1, 5.10.226-1, or any recommended versions from the distribution.

4

What are the implications of CVE-2024-41059?

CVE-2024-41059 can result in undefined behavior due to uninitialized value access, which may lead to potential security risks.

5

Is there a known exploit for CVE-2024-41059?

As of now, there are no publicly available exploits specifically targeting CVE-2024-41059.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203