CVE-2024-58001: ocfs2: handle a symlink read error correctly
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ocfs2: handle a symlink read error correctly
Patch series "Convert ocfs2 to use folios".
Mark did a conversion of ocfs2 to use folios and sent it to me as a giant patch for review ;-)
So I've redone it as individual patches, and credited Mark for the patches where his code is substantially the same. It's not a bad way to do it; his patch had some bugs and my patches had some bugs. Hopefully all our bugs were different from each other. And hopefully Mark likes all the changes I made to his code!
This patch (of 23):
If we can't read the buffer, be sure to unlock the page before returning.
The Linux kernel CVE team has assigned CVE-2024-58001 to this issue.
Affected and fixed versions
===========================
Fixed in 6.1.129 with commit 6e143eb4ab83c24e7ad3e3d8e7daa241d9c38377 Fixed in 6.6.78 with commit b6833b38984d1e9f20dd80f9ec9050c10d687f30 Fixed in 6.12.14 with commit 52a326f93ceb9348264fddf7bab6e345db69e08c Fixed in 6.13.3 with commit 5e3b3ec7c3cb5ba5629a766e4f0926db72cf0a1f Fixed in 6.14-rc1 with commit 2b4c2094da6d84e69b843dd3317902e977bf64bd
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-2024-58001
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/ocfs2/symlink.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/6e143eb4ab83c24e7ad3e3d8e7daa241d9c38377 https://git.kernel.org/stable/c/b6833b38984d1e9f20dd80f9ec9050c10d687f30 https://git.kernel.org/stable/c/52a326f93ceb9348264fddf7bab6e345db69e08c https://git.kernel.org/stable/c/5e3b3ec7c3cb5ba5629a766e4f0926db72cf0a1f https://git.kernel.org/stable/c/2b4c2094da6d84e69b843dd3317902e977bf64bd