f2fs: avoid NULL checkpoint thread access in sysfs
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ e65920661708b7c0f3db45c9cd5d0095034ee37f · < 5cb33b00c8fbb6e8f1fa3d281c3036d5f7c7c41f| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
f2fs: avoid NULL checkpoint thread access in sysfs
checkpoint_merge can be enabled even when no checkpoint merge thread is running. A read-only mount is one case: f2fs does not start f2fs_issue_ckpt there, but ckpt_thread_ioprio is still writable through sysfs.
The ckpt_thread_ioprio store path updates the saved ioprio value and, when checkpoint_merge is enabled, calls set_task_ioprio() for the checkpoint thread. If cprc->f2fs_issue_ckpt is NULL, that dereferences a NULL task pointer.
Protect ckpt_thread_ioprio sysfs writes with s_umount as well, so the checkpoint thread cannot disappear under the store path while updating its ioprio.
From the CVE record · Linux
The Linux kernel’s f2fs ckpt_thread_ioprio sysfs write path can dereference a NULL checkpoint-thread pointer when checkpoint_merge is enabled but no checkpoint thread is running, such as on a read-only mount. A local actor able to write that sysfs attribute can trigger the dereference; the input does not specify whether authentication or other interaction is required.
Operators running Linux kernels with f2fs should check whether their kernel includes the fix; affected versions are not specified.