In the Linux kernel, the following vulnerability has been resolved:
f2fs: don't set RO when shutting down f2fs
Shutdown does not check the error of thaw_super due to readonly, which causes a deadlock like below.
f2fsiocshutdown(F2FSGOINGDOWNFULLSYNC) issuediscardthread - bdevfreeze - freezesuper - f2fsstopcheckpoint() - f2fshandlecriticalerror - sbstartwrite - set RO - waiting - bdevthaw - thawsuperlocked - return -EINVAL, if sbrdonly() - f2fsstopdiscardthread -> wait for kthreadstop(discard_thread);
[
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3bdb7f161697e2d5123b89fe1778ef17a44858e7",
"deprecated": false,
"id": "CVE-2024-40969-414de0fc",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"261663955905541054330738723978127231916",
"115705529784008048402769403695929961692",
"112882408711541356101711224187692836954",
"2839041309640487899455389116799917857",
"158069514477942856032134987578131820811"
]
},
"target": {
"file": "fs/f2fs/super.c"
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3bdb7f161697e2d5123b89fe1778ef17a44858e7",
"deprecated": false,
"id": "CVE-2024-40969-ff7ab732",
"signature_type": "Function",
"digest": {
"length": 807.0,
"function_hash": "336395900953786015214537629702082353691"
},
"target": {
"function": "f2fs_handle_critical_error",
"file": "fs/f2fs/super.c"
}
}
]