CVE-2025-71123: ext4: fix string copying in parse_apply_sb_mount_options()

Published Jan 14, 2026
·
Updated

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

ext4: fix string copying in parseapplysbmountoptions()

strscpypad() can't be used to copy a non-NUL-term string into a NUL-term string of possibly bigger size. Commit 0efc5990bca5 ("string.h: Introduce memtostr() and memtostrpad()") provides additional information in that regard. So if this happens, the following warning is observed:

strnlen: detected buffer overflow: 65 byte read of buffer size 64 WARNING: CPU: 0 PID: 28655 at lib/stringhelpers.c:1032 fortifyreport+0x96/0xc0 lib/stringhelpers.c:1032 Modules linked in: CPU: 0 UID: 0 PID: 28655 Comm: syz-executor.3 Not tainted 6.12.54-syzkaller-00144-g5f0270f1ba00 #0 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:fortifyreport+0x96/0xc0 lib/stringhelpers.c:1032 Call Trace: <TASK> fortifypanic+0x1f/0x30 lib/stringhelpers.c:1039 strnlen include/linux/fortify-string.h:235 [inline] sizedstrscpy include/linux/fortify-string.h:309 [inline] parseapplysbmountoptions fs/ext4/super.c:2504 [inline] ext4fillsuper fs/ext4/super.c:5261 [inline] ext4fillsuper+0x3c35/0xad00 fs/ext4/super.c:5706 gettreebdevflags+0x387/0x620 fs/super.c:1636 vfsgettree+0x93/0x380 fs/super.c:1814 donewmount fs/namespace.c:3553 [inline] pathmount+0x6ae/0x1f70 fs/namespace.c:3880 domount fs/namespace.c:3893 [inline] dosysmount fs/namespace.c:4103 [inline] sesysmount fs/namespace.c:4080 [inline] x64sysmount+0x280/0x300 fs/namespace.c:4080 dosyscallx64 arch/x86/entry/common.c:52 [inline] dosyscall64+0x64/0x140 arch/x86/entry/common.c:83 entrySYSCALL64afterhwframe+0x76/0x7e

Since userspace is expected to provide smountopts field to be at most 63 characters long with the ending byte being NUL-term, use a 64-byte buffer which matches the size of smountopts, so that strscpypad() does its job properly. Return with error if the user still managed to provide a non-NUL-term string here.

Found by Linux Verification Center (linuxtesting.org) with Syzkaller.

Affected Software

18 affected componentsFixes available
Linux Linux kernel
Linux Linux kernel>=5.4.301<5.5
Linux Linux kernel>=5.10.246<5.10.248
Linux Linux kernel>=6.1.158<6.1.160
Linux Linux kernel>=6.6.114<6.6.120
Linux Linux kernel>=6.12.54<6.12.64
Linux Linux kernel>=6.17.4<6.18
Linux Linux kernel>=6.18.1<6.18.3
Linux Linux kernel=6.18
Linux Linux kernel=6.19-rc1
Linux Linux kernel=6.19-rc2
Linux Linux kernel=6.19-rc3
Linux Linux kernel=6.19-rc4
Linux Linux kernel=6.19-rc5
Linux Linux kernel=6.19-rc6
Linux Linux kernel=6.19-rc7
Linux Linux kernel=6.19-rc8
debian/linux
6.1.176-16.1.190-16.12.107-16.12.115-27.2.12-17.2.15-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

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

    Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.113-1Fixed in 7.2.12-1Fixed in 7.2.13-1

Event History

Jan 14, 2026
CVE Published
via MITRE·03:06 PM
Data Sourced
via MITRE·03:06 PM
Description
Data Sourced
via NVD·03:16 PM
RemedyDescriptionSeverityAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2025-71123?

CVE-2025-71123 has been classified as a medium severity vulnerability.

2

How does CVE-2025-71123 affect the Linux kernel?

CVE-2025-71123 affects the parsing of string copying in the ext4 filesystem, which could lead to improper handling of mount options.

3

How can I mitigate CVE-2025-71123?

To mitigate CVE-2025-71123, updating to the latest stable version of the Linux kernel where the patch is applied is recommended.

4

What versions of the Linux kernel are affected by CVE-2025-71123?

CVE-2025-71123 affects specific versions of the Linux kernel that utilize the ext4 filesystem and include the vulnerable parsing function.

5

Is a restart required after patching CVE-2025-71123?

Yes, a system restart is typically required after applying the patch for CVE-2025-71123 to ensure the changes take effect.

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