CVE-2023-53732: fs/ntfs3: Fix NULL dereference in ni_write_inode
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
fs/ntfs3: Fix NULL dereference in ni_write_inode
Syzbot reports a NULL dereference in ni_write_inode. When creating a new inode, if allocation fails in mi_init function (called in mi_format_new function), mi->mrec is set to NULL. In the error path of this inode creation, mi->mrec is later dereferenced in ni_write_inode.
Add a NULL check to prevent NULL dereference.
The Linux kernel CVE team has assigned CVE-2023-53732 to this issue.
Affected and fixed versions
===========================
Fixed in 5.15.113 with commit d4b74482529516477cf7b12502538e51827c699f Fixed in 6.1.81 with commit b3152afc0eb864f7c6ecad134a15b577ef7aec77 Fixed in 6.3.4 with commit b1135fbaf8ebef93df326761ac70ebcc3c2e3d63 Fixed in 6.4 with commit 8dae4f6341e335a09575be60b4fdf697c732a470
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-2023-53732
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/ntfs3/frecord.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/d4b74482529516477cf7b12502538e51827c699f https://git.kernel.org/stable/c/b3152afc0eb864f7c6ecad134a15b577ef7aec77 https://git.kernel.org/stable/c/b1135fbaf8ebef93df326761ac70ebcc3c2e3d63 https://git.kernel.org/stable/c/8dae4f6341e335a09575be60b4fdf697c732a470