In the Linux kernel, the following vulnerability has been resolved:
nilfs2: do not write dirty data after degenerating to read-only
According to syzbot's report, markbufferdirty() called from nilfssegctordo_construct() outputs a warning with some patterns after nilfs2 detects metadata corruption and degrades to read-only mode.
After such read-only degeneration, page cache data may be cleared through nilfscleardirtypage() which may also clear the uptodate flag for their buffer heads. However, even after the degeneration, log writes are still performed by unmount processing etc., which causes markbuffer_dirty() to be called for buffer heads without the "uptodate" flag and causes the warning.
Since any writes should not be done to a read-only file system in the first place, this fixes the warning in markbufferdirty() by letting nilfssegctordo_construct() abort early if in read-only mode.
This also changes the retry check of nilfssegctorwriteout() to avoid unnecessary log write retries if it detects -EROFS that nilfssegctordoconstruct() returned.
[ { "signature_type": "Function", "target": { "function": "nilfs_segctor_write_out", "file": "fs/nilfs2/segment.c" }, "deprecated": false, "digest": { "function_hash": "288204273512673126278579846381428343583", "length": 292.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a73201c607d8e506358d60aafddda4246bdd9350", "signature_version": "v1", "id": "CVE-2023-53337-070e5f1e" }, { "signature_type": "Line", "target": { "file": "fs/nilfs2/segment.c" }, "deprecated": false, "digest": { "threshold": 0.9, "line_hashes": [ "96995636714164073370218134516613336328", "246955630708875384579346238309963749888", "209205799982014536037192807876941123470", "289790357949652166387599795093069330261", "226405741004799362203048289047776114714", "51025883218042999499245037884843064768", "17296175022570743645090067051857222016" ] }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e9c5412c5972124776c1b873533eb39e287a4dfa", "signature_version": "v1", "id": "CVE-2023-53337-1fe6cd17" }, { "signature_type": "Function", "target": { "function": "nilfs_segctor_write_out", "file": "fs/nilfs2/segment.c" }, "deprecated": false, "digest": { "function_hash": "288204273512673126278579846381428343583", "length": 292.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@28a65b49eb53e172d23567005465019658bfdb4d", "signature_version": "v1", "id": "CVE-2023-53337-262a25ca" }, { "signature_type": "Function", "target": { "function": "nilfs_segctor_do_construct", "file": "fs/nilfs2/segment.c" }, "deprecated": false, "digest": { "function_hash": "180716042968770812690986801080805749084", "length": 1755.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e9c5412c5972124776c1b873533eb39e287a4dfa", "signature_version": "v1", "id": "CVE-2023-53337-2ebbea50" }, { "signature_type": "Function", "target": { "function": "nilfs_segctor_do_construct", "file": "fs/nilfs2/segment.c" }, "deprecated": false, "digest": { "function_hash": "180716042968770812690986801080805749084", "length": 1755.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4569a292a84e340e97d178898ad1cfe1a3080a61", "signature_version": "v1", "id": "CVE-2023-53337-3161f907" }, { "signature_type": "Function", "target": { "function": "nilfs_segctor_write_out", "file": "fs/nilfs2/segment.c" }, "deprecated": false, "digest": { "function_hash": "288204273512673126278579846381428343583", "length": 292.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@13f73ef77baa4764dc1ca4fcbae9cade05b83866", "signature_version": "v1", "id": "CVE-2023-53337-3a0c9864" }, { "signature_type": "Line", "target": { "file": "fs/nilfs2/segment.c" }, "deprecated": false, "digest": { "threshold": 0.9, "line_hashes": [ "96995636714164073370218134516613336328", "246955630708875384579346238309963749888", "209205799982014536037192807876941123470", "289790357949652166387599795093069330261", "226405741004799362203048289047776114714", "51025883218042999499245037884843064768", "17296175022570743645090067051857222016" ] }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@55f7810632f993cff622a0ddbc7c865892294b61", "signature_version": "v1", "id": "CVE-2023-53337-3a23df09" }, { "signature_type": "Function", "target": { "function": "nilfs_segctor_do_construct", "file": "fs/nilfs2/segment.c" }, "deprecated": false, "digest": { "function_hash": "180716042968770812690986801080805749084", "length": 1755.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bd89073fc7a5d03b1d06b372addbe405e5a925f4", "signature_version": "v1", "id": "CVE-2023-53337-4ae47605" }, { "signature_type": "Function", "target": { "function": "nilfs_segctor_write_out", "file": "fs/nilfs2/segment.c" }, "deprecated": false, "digest": { "function_hash": "288204273512673126278579846381428343583", "length": 292.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4005cec6847c06ee191583270b7cdd7e696543cc", "signature_version": "v1", "id": "CVE-2023-53337-4c5119a9" }, { "signature_type": "Function", "target": { "function": "nilfs_segctor_write_out", "file": "fs/nilfs2/segment.c" }, "deprecated": false, "digest": { "function_hash": "288204273512673126278579846381428343583", "length": 292.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bd89073fc7a5d03b1d06b372addbe405e5a925f4", "signature_version": "v1", "id": "CVE-2023-53337-4e2b9b30" }, { "signature_type": "Line", "target": { "file": "fs/nilfs2/segment.c" }, "deprecated": false, "digest": { "threshold": 0.9, "line_hashes": [ "96995636714164073370218134516613336328", "246955630708875384579346238309963749888", "209205799982014536037192807876941123470", "289790357949652166387599795093069330261", "226405741004799362203048289047776114714", "51025883218042999499245037884843064768", "17296175022570743645090067051857222016" ] }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a73201c607d8e506358d60aafddda4246bdd9350", "signature_version": "v1", "id": "CVE-2023-53337-56d54d63" }, { "signature_type": "Line", "target": { "file": "fs/nilfs2/segment.c" }, "deprecated": false, "digest": { "threshold": 0.9, "line_hashes": [ "96995636714164073370218134516613336328", "246955630708875384579346238309963749888", "209205799982014536037192807876941123470", "289790357949652166387599795093069330261", "226405741004799362203048289047776114714", "51025883218042999499245037884843064768", "17296175022570743645090067051857222016" ] }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@28a65b49eb53e172d23567005465019658bfdb4d", "signature_version": "v1", "id": "CVE-2023-53337-5c6bd007" }, { "signature_type": "Function", "target": { "function": "nilfs_segctor_do_construct", "file": "fs/nilfs2/segment.c" }, "deprecated": false, "digest": { "function_hash": "180716042968770812690986801080805749084", "length": 1755.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@13f73ef77baa4764dc1ca4fcbae9cade05b83866", "signature_version": "v1", "id": "CVE-2023-53337-633bad34" }, { "signature_type": "Line", "target": { "file": "fs/nilfs2/segment.c" }, "deprecated": false, "digest": { "threshold": 0.9, "line_hashes": [ "96995636714164073370218134516613336328", "246955630708875384579346238309963749888", "209205799982014536037192807876941123470", "289790357949652166387599795093069330261", "226405741004799362203048289047776114714", "51025883218042999499245037884843064768", "17296175022570743645090067051857222016" ] }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7c3e662048053802f6b0db3a78e97f4e1f7edc4f", "signature_version": "v1", "id": "CVE-2023-53337-7c1f6cc2" }, { "signature_type": "Function", "target": { "function": "nilfs_segctor_write_out", "file": "fs/nilfs2/segment.c" }, "deprecated": false, "digest": { "function_hash": "288204273512673126278579846381428343583", "length": 292.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@55f7810632f993cff622a0ddbc7c865892294b61", "signature_version": "v1", "id": "CVE-2023-53337-81dae14b" }, { "signature_type": "Function", "target": { "function": "nilfs_segctor_write_out", "file": "fs/nilfs2/segment.c" }, "deprecated": false, "digest": { "function_hash": "288204273512673126278579846381428343583", "length": 292.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4569a292a84e340e97d178898ad1cfe1a3080a61", "signature_version": "v1", "id": "CVE-2023-53337-91218b74" }, { "signature_type": "Line", "target": { "file": "fs/nilfs2/segment.c" }, "deprecated": false, "digest": { "threshold": 0.9, "line_hashes": [ "96995636714164073370218134516613336328", "246955630708875384579346238309963749888", "209205799982014536037192807876941123470", "289790357949652166387599795093069330261", "226405741004799362203048289047776114714", "51025883218042999499245037884843064768", "17296175022570743645090067051857222016" ] }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@13f73ef77baa4764dc1ca4fcbae9cade05b83866", "signature_version": "v1", "id": "CVE-2023-53337-91d2a3f1" }, { "signature_type": "Line", "target": { "file": "fs/nilfs2/segment.c" }, "deprecated": false, "digest": { "threshold": 0.9, "line_hashes": [ "96995636714164073370218134516613336328", "246955630708875384579346238309963749888", "209205799982014536037192807876941123470", "289790357949652166387599795093069330261", "226405741004799362203048289047776114714", "51025883218042999499245037884843064768", "17296175022570743645090067051857222016" ] }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4569a292a84e340e97d178898ad1cfe1a3080a61", "signature_version": "v1", "id": "CVE-2023-53337-920658c9" }, { "signature_type": "Function", "target": { "function": "nilfs_segctor_do_construct", "file": "fs/nilfs2/segment.c" }, "deprecated": false, "digest": { "function_hash": "180716042968770812690986801080805749084", "length": 1755.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7c3e662048053802f6b0db3a78e97f4e1f7edc4f", "signature_version": "v1", "id": "CVE-2023-53337-941cb90c" }, { "signature_type": "Function", "target": { "function": "nilfs_segctor_write_out", "file": "fs/nilfs2/segment.c" }, "deprecated": false, "digest": { "function_hash": "288204273512673126278579846381428343583", "length": 292.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e9c5412c5972124776c1b873533eb39e287a4dfa", "signature_version": "v1", "id": "CVE-2023-53337-9a4c175e" }, { "signature_type": "Line", "target": { "file": "fs/nilfs2/segment.c" }, "deprecated": false, "digest": { "threshold": 0.9, "line_hashes": [ "96995636714164073370218134516613336328", "246955630708875384579346238309963749888", "209205799982014536037192807876941123470", "289790357949652166387599795093069330261", "226405741004799362203048289047776114714", "51025883218042999499245037884843064768", "17296175022570743645090067051857222016" ] }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4005cec6847c06ee191583270b7cdd7e696543cc", "signature_version": "v1", "id": "CVE-2023-53337-ab259573" }, { "signature_type": "Function", "target": { "function": "nilfs_segctor_do_construct", "file": "fs/nilfs2/segment.c" }, "deprecated": false, "digest": { "function_hash": "180716042968770812690986801080805749084", "length": 1755.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a73201c607d8e506358d60aafddda4246bdd9350", "signature_version": "v1", "id": "CVE-2023-53337-ba5d281a" }, { "signature_type": "Function", "target": { "function": "nilfs_segctor_do_construct", "file": "fs/nilfs2/segment.c" }, "deprecated": false, "digest": { "function_hash": "180716042968770812690986801080805749084", "length": 1755.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@55f7810632f993cff622a0ddbc7c865892294b61", "signature_version": "v1", "id": "CVE-2023-53337-c1565631" }, { "signature_type": "Function", "target": { "function": "nilfs_segctor_do_construct", "file": "fs/nilfs2/segment.c" }, "deprecated": false, "digest": { "function_hash": "180716042968770812690986801080805749084", "length": 1755.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@28a65b49eb53e172d23567005465019658bfdb4d", "signature_version": "v1", "id": "CVE-2023-53337-ce911579" }, { "signature_type": "Line", "target": { "file": "fs/nilfs2/segment.c" }, "deprecated": false, "digest": { "threshold": 0.9, "line_hashes": [ "96995636714164073370218134516613336328", "246955630708875384579346238309963749888", "209205799982014536037192807876941123470", "289790357949652166387599795093069330261", "226405741004799362203048289047776114714", "51025883218042999499245037884843064768", "17296175022570743645090067051857222016" ] }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bd89073fc7a5d03b1d06b372addbe405e5a925f4", "signature_version": "v1", "id": "CVE-2023-53337-d59a888a" }, { "signature_type": "Function", "target": { "function": "nilfs_segctor_write_out", "file": "fs/nilfs2/segment.c" }, "deprecated": false, "digest": { "function_hash": "288204273512673126278579846381428343583", "length": 292.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7c3e662048053802f6b0db3a78e97f4e1f7edc4f", "signature_version": "v1", "id": "CVE-2023-53337-e10dca10" }, { "signature_type": "Function", "target": { "function": "nilfs_segctor_do_construct", "file": "fs/nilfs2/segment.c" }, "deprecated": false, "digest": { "function_hash": "180716042968770812690986801080805749084", "length": 1755.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4005cec6847c06ee191583270b7cdd7e696543cc", "signature_version": "v1", "id": "CVE-2023-53337-f214cca2" } ]