In the Linux kernel, the following vulnerability has been resolved:
ext4: avoid deadlock in fs reclaim with page writeback
Ext4 has a filesystem wide lock protecting ext4_writepages() calls to avoid races with switching of journalled data flag or inode format. This lock can however cause a deadlock like:
CPU0 CPU1
ext4writepages() percpudownread(sbi->swritepagesrwsem); ext4changeinodejournalflag() percpudownwrite(sbi->swritepagesrwsem); - blocks, all readers block from now on ext4dowritepages() ext4initioend() kmemcachezalloc(ioendcachep, GFPKERNEL) fsreclaim frees dentry... dentryunlinkinode() iput() - last ref => iputfinal() - inode dirty => writeinodenow()... ext4writepages() tries to acquire sbi->swritepagesrwsem and blocks forever
Make sure we cannot recurse into filesystem reclaim from writeback code to avoid the deadlock.
{ "vanir_signatures": [ { "id": "CVE-2023-53149-06b9d4be", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4b4340bf04ce9a52061f15000ecedd126abc093c", "deprecated": false, "signature_version": "v1", "signature_type": "Line", "digest": { "threshold": 0.9, "line_hashes": [ "259702451121581406939955146808677465894", "83065224730379070791454272321938025856", "141200988767463564153873889814816710214", "76913934959608751913682162667960486044", "84136697284414564301947689082421858581", "85337361328832312522074543871834592861", "139481508485688396729044877949755375699", "223450930086633496109895018744980477308", "65810702926264759817312108412358303290", "65258805189496256011703655347990133890", "278752386064981064284109940247353278529", "171807238263225869221931984054206450550", "68614161241437323882112108527268460905", "58038172123008558401818032627710359346", "127543764048720694306871957899776876553", "105545269246764170397809409069752136978", "125541656626739853228983714705155857547", "109437404601954012393877817345591966055", "71882066309157364283317155149609266171", "42698509419132278337774059924684132073", "324170446923106161367752008636362879663", "335309346161438764312306393769198244392", "99261093289008017071566155275627981805", "272121768696110179989232653378488312581", "67206116044173049796410033425817716227", "6314769982930652137382093062435489963", "74165386682472929523915327007658203919" ] }, "target": { "file": "fs/ext4/migrate.c" } }, { "id": "CVE-2023-53149-142265ee", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2ec97dc90df40c50e509809dc9a198638a7e18b6", "deprecated": false, "signature_version": "v1", "signature_type": "Line", "digest": { "threshold": 0.9, "line_hashes": [ "206171655211688144023710464469367322998", "159400559654238360017241840978214900224", "148035698348723391195723973952492210371" ] }, "target": { "file": "fs/ext4/ext4.h" } }, { "id": "CVE-2023-53149-25a6acb7", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@00d873c17e29cc32d90ca852b82685f1673acaa5", "deprecated": false, "signature_version": "v1", "signature_type": "Line", "digest": { "threshold": 0.9, "line_hashes": [ "198630789818624001147265536411233985166", "224035526036815115081392130827275020597", "253468227299175546251765453242929277614", "330346875932498252736263205309165640561", "260606487739551718568384242734069961568", "74236690060623311633882853559611706431", "235574062099721551701052400140604720207", "284697736811417727752295164334624947828", "80510010585027419624129470216125969762", "131706527297116793806291554960725360013", "58079280619084139420585640447818227081", "303519533465857212931400893592275838779", "165549464299677381931838583709852461224", "281127741795544798414912850002504661139", "255135426339840649170259521902165054620", "256641997536337494096982239391734298217", "269546378954369113387579860327373858357", "79308814589494220873068271594549240710", "158730721978127236402106282566544119790", "319884284417994386278318699762880860595", "267774773223185727242992444251589406373", "82359962351516566852835742171947521858", "21421900399004535790251232413642412394", "17426301237114328300306118833333281426", "296535684853925713327499706616406892618", "23722361229886447637831018935876623802", "281137086796134227526025494347376255936", "243192310465181111056350051856893972337", "86975816450301898151733987390145366082", "197498346701217537479867749019564790420", "71423273130057589190516205127389894075", "285988326028274725604042378622210609667", "286358338690178882455446034361815100282", "123840592992951381157479606286701119750", "203274186865283696267305658052861253570", "273609674292225106073276546149079821922", "71831154984673789612919273697026057680", "44700227834971003065511031995810672259", "14157832218902875113865484445763683457" ] }, "target": { "file": "fs/ext4/inode.c" } }, { "id": "CVE-2023-53149-39644eb9", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2ec97dc90df40c50e509809dc9a198638a7e18b6", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 1626.0, "function_hash": "64699543426298460910125416143385017927" }, "target": { "file": "fs/ext4/migrate.c", "function": "ext4_ind_migrate" } }, { "id": "CVE-2023-53149-3b5626eb", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2ec97dc90df40c50e509809dc9a198638a7e18b6", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 404.0, "function_hash": "223628029701845602475187415101827439792" }, "target": { "file": "fs/ext4/inode.c", "function": "ext4_writepages" } }, { "id": "CVE-2023-53149-4715eda2", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2ec97dc90df40c50e509809dc9a198638a7e18b6", "deprecated": false, "signature_version": "v1", "signature_type": "Line", "digest": { "threshold": 0.9, "line_hashes": [ "198630789818624001147265536411233985166", "224035526036815115081392130827275020597", "253468227299175546251765453242929277614", "330346875932498252736263205309165640561", "260606487739551718568384242734069961568", "235603756854432200631568835656890106488", "223208604109756759381157876236374963113", "131706527297116793806291554960725360013", "58079280619084139420585640447818227081", "303519533465857212931400893592275838779", "165549464299677381931838583709852461224", "281127741795544798414912850002504661139", "255135426339840649170259521902165054620", "256641997536337494096982239391734298217", "269546378954369113387579860327373858357", "79308814589494220873068271594549240710", "158730721978127236402106282566544119790", "319884284417994386278318699762880860595", "267774773223185727242992444251589406373", "82359962351516566852835742171947521858", "21421900399004535790251232413642412394", "17426301237114328300306118833333281426", "296535684853925713327499706616406892618", "23722361229886447637831018935876623802", "281137086796134227526025494347376255936", "243192310465181111056350051856893972337", "86975816450301898151733987390145366082", "197498346701217537479867749019564790420", "71423273130057589190516205127389894075", "285988326028274725604042378622210609667", "286358338690178882455446034361815100282", "123840592992951381157479606286701119750", "203274186865283696267305658052861253570", "273609674292225106073276546149079821922", "71831154984673789612919273697026057680", "44700227834971003065511031995810672259", "14157832218902875113865484445763683457" ] }, "target": { "file": "fs/ext4/inode.c" } }, { "id": "CVE-2023-53149-48b93b56", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2ec97dc90df40c50e509809dc9a198638a7e18b6", "deprecated": false, "signature_version": "v1", "signature_type": "Line", "digest": { "threshold": 0.9, "line_hashes": [ "259702451121581406939955146808677465894", "83065224730379070791454272321938025856", "141200988767463564153873889814816710214", "76913934959608751913682162667960486044", "84136697284414564301947689082421858581", "85337361328832312522074543871834592861", "139481508485688396729044877949755375699", "223450930086633496109895018744980477308", "65810702926264759817312108412358303290", "65258805189496256011703655347990133890", "278752386064981064284109940247353278529", "171807238263225869221931984054206450550", "68614161241437323882112108527268460905", "58038172123008558401818032627710359346", "127543764048720694306871957899776876553", "105545269246764170397809409069752136978", "125541656626739853228983714705155857547", "109437404601954012393877817345591966055", "71882066309157364283317155149609266171", "42698509419132278337774059924684132073", "324170446923106161367752008636362879663", "335309346161438764312306393769198244392", "99261093289008017071566155275627981805", "272121768696110179989232653378488312581", "67206116044173049796410033425817716227", "6314769982930652137382093062435489963", "74165386682472929523915327007658203919" ] }, "target": { "file": "fs/ext4/migrate.c" } }, { "id": "CVE-2023-53149-499c558d", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4b4340bf04ce9a52061f15000ecedd126abc093c", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 1122.0, "function_hash": "301941218346817680785453133780271076750" }, "target": { "file": "fs/ext4/inode.c", "function": "ext4_change_inode_journal_flag" } }, { "id": "CVE-2023-53149-4b84d20f", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4b4340bf04ce9a52061f15000ecedd126abc093c", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 1626.0, "function_hash": "64699543426298460910125416143385017927" }, "target": { "file": "fs/ext4/migrate.c", "function": "ext4_ind_migrate" } }, { "id": "CVE-2023-53149-570380bf", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2ec97dc90df40c50e509809dc9a198638a7e18b6", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 485.0, "function_hash": "279903727045164382829606705322897363540" }, "target": { "file": "fs/ext4/inode.c", "function": "ext4_dax_writepages" } }, { "id": "CVE-2023-53149-6479b0c9", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@00d873c17e29cc32d90ca852b82685f1673acaa5", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 474.0, "function_hash": "170588819451268493740245713121552307627" }, "target": { "file": "fs/ext4/inode.c", "function": "ext4_writepages" } }, { "id": "CVE-2023-53149-6b932869", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@00d873c17e29cc32d90ca852b82685f1673acaa5", "deprecated": false, "signature_version": "v1", "signature_type": "Line", "digest": { "threshold": 0.9, "line_hashes": [ "206171655211688144023710464469367322998", "159400559654238360017241840978214900224", "148035698348723391195723973952492210371" ] }, "target": { "file": "fs/ext4/ext4.h" } }, { "id": "CVE-2023-53149-6d73538b", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4b4340bf04ce9a52061f15000ecedd126abc093c", "deprecated": false, "signature_version": "v1", "signature_type": "Line", "digest": { "threshold": 0.9, "line_hashes": [ "198630789818624001147265536411233985166", "224035526036815115081392130827275020597", "253468227299175546251765453242929277614", "330346875932498252736263205309165640561", "260606487739551718568384242734069961568", "235603756854432200631568835656890106488", "223208604109756759381157876236374963113", "131706527297116793806291554960725360013", "58079280619084139420585640447818227081", "303519533465857212931400893592275838779", "165549464299677381931838583709852461224", "281127741795544798414912850002504661139", "255135426339840649170259521902165054620", "256641997536337494096982239391734298217", "269546378954369113387579860327373858357", "79308814589494220873068271594549240710", "158730721978127236402106282566544119790", "319884284417994386278318699762880860595", "267774773223185727242992444251589406373", "82359962351516566852835742171947521858", "21421900399004535790251232413642412394", "17426301237114328300306118833333281426", "296535684853925713327499706616406892618", "23722361229886447637831018935876623802", "281137086796134227526025494347376255936", "243192310465181111056350051856893972337", "86975816450301898151733987390145366082", "197498346701217537479867749019564790420", "71423273130057589190516205127389894075", "285988326028274725604042378622210609667", "286358338690178882455446034361815100282", "123840592992951381157479606286701119750", "203274186865283696267305658052861253570", "273609674292225106073276546149079821922", "71831154984673789612919273697026057680", "44700227834971003065511031995810672259", "14157832218902875113865484445763683457" ] }, "target": { "file": "fs/ext4/inode.c" } }, { "id": "CVE-2023-53149-704b03cf", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@00d873c17e29cc32d90ca852b82685f1673acaa5", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 485.0, "function_hash": "279903727045164382829606705322897363540" }, "target": { "file": "fs/ext4/inode.c", "function": "ext4_dax_writepages" } }, { "id": "CVE-2023-53149-7b6bef53", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@00d873c17e29cc32d90ca852b82685f1673acaa5", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 2749.0, "function_hash": "60445774571226477423917603901389602451" }, "target": { "file": "fs/ext4/migrate.c", "function": "ext4_ext_migrate" } }, { "id": "CVE-2023-53149-7b79d8c0", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2ec97dc90df40c50e509809dc9a198638a7e18b6", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 1122.0, "function_hash": "301941218346817680785453133780271076750" }, "target": { "file": "fs/ext4/inode.c", "function": "ext4_change_inode_journal_flag" } }, { "id": "CVE-2023-53149-89f34217", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4b4340bf04ce9a52061f15000ecedd126abc093c", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 485.0, "function_hash": "279903727045164382829606705322897363540" }, "target": { "file": "fs/ext4/inode.c", "function": "ext4_dax_writepages" } }, { "id": "CVE-2023-53149-9abac0cb", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4b4340bf04ce9a52061f15000ecedd126abc093c", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 404.0, "function_hash": "223628029701845602475187415101827439792" }, "target": { "file": "fs/ext4/inode.c", "function": "ext4_writepages" } }, { "id": "CVE-2023-53149-acdf1442", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@00d873c17e29cc32d90ca852b82685f1673acaa5", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 1122.0, "function_hash": "301941218346817680785453133780271076750" }, "target": { "file": "fs/ext4/inode.c", "function": "ext4_change_inode_journal_flag" } }, { "id": "CVE-2023-53149-b13bce0e", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4b4340bf04ce9a52061f15000ecedd126abc093c", "deprecated": false, "signature_version": "v1", "signature_type": "Line", "digest": { "threshold": 0.9, "line_hashes": [ "206171655211688144023710464469367322998", "159400559654238360017241840978214900224", "148035698348723391195723973952492210371" ] }, "target": { "file": "fs/ext4/ext4.h" } }, { "id": "CVE-2023-53149-b5c121f6", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2ec97dc90df40c50e509809dc9a198638a7e18b6", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 2749.0, "function_hash": "60445774571226477423917603901389602451" }, "target": { "file": "fs/ext4/migrate.c", "function": "ext4_ext_migrate" } }, { "id": "CVE-2023-53149-b8389709", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4b4340bf04ce9a52061f15000ecedd126abc093c", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 2749.0, "function_hash": "60445774571226477423917603901389602451" }, "target": { "file": "fs/ext4/migrate.c", "function": "ext4_ext_migrate" } }, { "id": "CVE-2023-53149-e0ac07a5", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@00d873c17e29cc32d90ca852b82685f1673acaa5", "deprecated": false, "signature_version": "v1", "signature_type": "Function", "digest": { "length": 1626.0, "function_hash": "64699543426298460910125416143385017927" }, "target": { "file": "fs/ext4/migrate.c", "function": "ext4_ind_migrate" } }, { "id": "CVE-2023-53149-ff5dfb2b", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@00d873c17e29cc32d90ca852b82685f1673acaa5", "deprecated": false, "signature_version": "v1", "signature_type": "Line", "digest": { "threshold": 0.9, "line_hashes": [ "259702451121581406939955146808677465894", "83065224730379070791454272321938025856", "141200988767463564153873889814816710214", "76913934959608751913682162667960486044", "84136697284414564301947689082421858581", "85337361328832312522074543871834592861", "139481508485688396729044877949755375699", "223450930086633496109895018744980477308", "65810702926264759817312108412358303290", "65258805189496256011703655347990133890", "278752386064981064284109940247353278529", "171807238263225869221931984054206450550", "68614161241437323882112108527268460905", "58038172123008558401818032627710359346", "127543764048720694306871957899776876553", "105545269246764170397809409069752136978", "125541656626739853228983714705155857547", "109437404601954012393877817345591966055", "71882066309157364283317155149609266171", "42698509419132278337774059924684132073", "324170446923106161367752008636362879663", "335309346161438764312306393769198244392", "99261093289008017071566155275627981805", "272121768696110179989232653378488312581", "67206116044173049796410033425817716227", "6314769982930652137382093062435489963", "74165386682472929523915327007658203919" ] }, "target": { "file": "fs/ext4/migrate.c" } } ] }