In the Linux kernel, the following vulnerability has been resolved:
md/raid5-cache: fix null-ptr-deref for r5lflushstripetoraid()
r5lflushstripetoraid() will check if the list 'flushingios' is empty, and then submit 'flushbio', however, r5llogflush_endio() is clearing the list first and then clear the bio, which will cause null-ptr-deref:
T1: submit flush io raid5d handleactivestripes r5lflushstripetoraid // list is empty // add 'ioendios' to the list bioinit submitbio // io1
T2: io1 is done r5llogflushendio listsplicetailinit // clear the list T3: submit new flush io ... r5lflushstripetoraid // list is empty // add 'ioendios' to the list bioinit biouninit // clear bio->biblkg submitbio // null-ptr-deref
Fix this problem by clearing bio before clearing the list in r5llogflush_endio().
[
{
"deprecated": false,
"id": "CVE-2023-53210-08fcb4df",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@711fb92606208a8626b785da4f9f23d648a5b6c8",
"digest": {
"line_hashes": [
"192789896871117226477410784449384110886",
"245616417179465745326010649990766944508",
"270437386739344364988005295008684827925",
"238235600309066404639576995723707778167",
"78050538525622595397423654144788114699",
"12188349546283183423572542201587412223",
"88353279386884663347487757055798739805",
"190463240161209127571730281147579160041",
"234476521621066850778160896877184820359",
"186994302044246300370286181964094075516"
],
"threshold": 0.9
},
"target": {
"file": "drivers/md/raid5-cache.c"
},
"signature_type": "Line",
"signature_version": "v1"
},
{
"deprecated": false,
"id": "CVE-2023-53210-4dbca678",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0d0bd28c500173bfca78aa840f8f36d261ef1765",
"digest": {
"function_hash": "67110150582493369327935780945748521058",
"length": 484.0
},
"target": {
"function": "r5l_log_flush_endio",
"file": "drivers/md/raid5-cache.c"
},
"signature_type": "Function",
"signature_version": "v1"
},
{
"deprecated": false,
"id": "CVE-2023-53210-7a654e36",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7a8b6d93991bf4b72b3f959baea35397c6c8e521",
"digest": {
"line_hashes": [
"192789896871117226477410784449384110886",
"245616417179465745326010649990766944508",
"270437386739344364988005295008684827925",
"238235600309066404639576995723707778167",
"78050538525622595397423654144788114699",
"12188349546283183423572542201587412223",
"88353279386884663347487757055798739805",
"190463240161209127571730281147579160041",
"234476521621066850778160896877184820359",
"186994302044246300370286181964094075516"
],
"threshold": 0.9
},
"target": {
"file": "drivers/md/raid5-cache.c"
},
"signature_type": "Line",
"signature_version": "v1"
},
{
"deprecated": false,
"id": "CVE-2023-53210-95ca5606",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0d0bd28c500173bfca78aa840f8f36d261ef1765",
"digest": {
"line_hashes": [
"192789896871117226477410784449384110886",
"245616417179465745326010649990766944508",
"270437386739344364988005295008684827925",
"238235600309066404639576995723707778167",
"78050538525622595397423654144788114699",
"12188349546283183423572542201587412223",
"88353279386884663347487757055798739805",
"190463240161209127571730281147579160041",
"234476521621066850778160896877184820359",
"186994302044246300370286181964094075516"
],
"threshold": 0.9
},
"target": {
"file": "drivers/md/raid5-cache.c"
},
"signature_type": "Line",
"signature_version": "v1"
},
{
"deprecated": false,
"id": "CVE-2023-53210-b8a61f5d",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e46b2e7be8059d156af8c011dd8d665229b65886",
"digest": {
"line_hashes": [
"192789896871117226477410784449384110886",
"245616417179465745326010649990766944508",
"270437386739344364988005295008684827925",
"238235600309066404639576995723707778167",
"78050538525622595397423654144788114699",
"12188349546283183423572542201587412223",
"88353279386884663347487757055798739805",
"190463240161209127571730281147579160041",
"234476521621066850778160896877184820359",
"186994302044246300370286181964094075516"
],
"threshold": 0.9
},
"target": {
"file": "drivers/md/raid5-cache.c"
},
"signature_type": "Line",
"signature_version": "v1"
},
{
"deprecated": false,
"id": "CVE-2023-53210-da82dbbc",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e46b2e7be8059d156af8c011dd8d665229b65886",
"digest": {
"function_hash": "67110150582493369327935780945748521058",
"length": 484.0
},
"target": {
"function": "r5l_log_flush_endio",
"file": "drivers/md/raid5-cache.c"
},
"signature_type": "Function",
"signature_version": "v1"
},
{
"deprecated": false,
"id": "CVE-2023-53210-edf8cbcd",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7a8b6d93991bf4b72b3f959baea35397c6c8e521",
"digest": {
"function_hash": "67110150582493369327935780945748521058",
"length": 484.0
},
"target": {
"function": "r5l_log_flush_endio",
"file": "drivers/md/raid5-cache.c"
},
"signature_type": "Function",
"signature_version": "v1"
},
{
"deprecated": false,
"id": "CVE-2023-53210-ee3783a5",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@711fb92606208a8626b785da4f9f23d648a5b6c8",
"digest": {
"function_hash": "67110150582493369327935780945748521058",
"length": 484.0
},
"target": {
"function": "r5l_log_flush_endio",
"file": "drivers/md/raid5-cache.c"
},
"signature_type": "Function",
"signature_version": "v1"
}
]