CVE-2025-21782: orangefs: fix a oob in orangefs_debug_write
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
orangefs: fix a oob in orangefs_debug_write
I got a syzbot report: slab-out-of-bounds Read in orangefs_debug_write... several people suggested fixes, I tested Al Viro's suggestion and made this patch.
The Linux kernel CVE team has assigned CVE-2025-21782 to this issue.
Affected and fixed versions
===========================
Fixed in 6.1.129 with commit 1da2697307dad281dd690a19441b5ca4af92d786 Fixed in 6.6.79 with commit 2b84a231910cef2e0a16d29294afabfb69112087 Fixed in 6.12.16 with commit 897f496b946fdcfab5983c983e4b513ab6682364 Fixed in 6.13.4 with commit 1c5244299241cf49d8ae7b5054e299cc8faa4e09 Fixed in 6.14-rc1 with commit f7c848431632598ff9bce57a659db6af60d75b39
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2025-21782
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
fs/orangefs/orangefs-debugfs.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/1da2697307dad281dd690a19441b5ca4af92d786 https://git.kernel.org/stable/c/2b84a231910cef2e0a16d29294afabfb69112087 https://git.kernel.org/stable/c/897f496b946fdcfab5983c983e4b513ab6682364 https://git.kernel.org/stable/c/1c5244299241cf49d8ae7b5054e299cc8faa4e09 https://git.kernel.org/stable/c/f7c848431632598ff9bce57a659db6af60d75b39