In the Linux kernel, the following vulnerability has been resolved:
jfs: add check read-only before truncation in jfstruncatenolock()
Added a check for "read-only" mode in the jfs_truncate_nolock
function to avoid errors related to writing to a read-only
filesystem.
Call stack:
blockwritebegin() { jfswritefailed() { jfstruncate() { jfstruncatenolock() { txEnd() { ... log = JFSSBI(tblk->sb)->log; // (log == NULL)
If the isReadOnly(ip) condition is triggered in
jfs_truncate_nolock, the function execution will stop, and no
further data modification will occur. Instead, the xtTruncate
function will be called with the "COMMIT_WMAP" flag, preventing
modifications in "read-only" mode.
[
{
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 667.0,
"function_hash": "84881992316587236663895472708898919425"
},
"target": {
"file": "fs/jfs/inode.c",
"function": "jfs_truncate_nolock"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b5799dd77054c1ec49b0088b006c9908e256843b",
"signature_version": "v1",
"id": "CVE-2024-58094-1fd0c5e5"
},
{
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 667.0,
"function_hash": "84881992316587236663895472708898919425"
},
"target": {
"file": "fs/jfs/inode.c",
"function": "jfs_truncate_nolock"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f605bc3e162f5c6faa9bd3602ce496053d06a4bb",
"signature_version": "v1",
"id": "CVE-2024-58094-88451889"
},
{
"signature_type": "Line",
"deprecated": false,
"digest": {
"line_hashes": [
"162681789371673454324027169809290976977",
"237796182151697215402653289813906324160",
"175489904407781718954666736179078746148",
"242888795063181281948559558806442657165"
],
"threshold": 0.9
},
"target": {
"file": "fs/jfs/inode.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b5799dd77054c1ec49b0088b006c9908e256843b",
"signature_version": "v1",
"id": "CVE-2024-58094-a55eed19"
},
{
"signature_type": "Line",
"deprecated": false,
"digest": {
"line_hashes": [
"162681789371673454324027169809290976977",
"237796182151697215402653289813906324160",
"175489904407781718954666736179078746148",
"242888795063181281948559558806442657165"
],
"threshold": 0.9
},
"target": {
"file": "fs/jfs/inode.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f605bc3e162f5c6faa9bd3602ce496053d06a4bb",
"signature_version": "v1",
"id": "CVE-2024-58094-fd2eb6b2"
}
]