In the Linux kernel, the following vulnerability has been resolved:
f2fs: get rid of online repaire on corrupted directory
syzbot reports a f2fs bug as below:
kernel BUG at fs/f2fs/inode.c:896! RIP: 0010:f2fsevictinode+0x1598/0x15c0 fs/f2fs/inode.c:896 Call Trace: evict+0x532/0x950 fs/inode.c:704 disposelist fs/inode.c:747 [inline] evictinodes+0x5f9/0x690 fs/inode.c:797 genericshutdownsuper+0x9d/0x2d0 fs/super.c:627 killblocksuper+0x44/0x90 fs/super.c:1696 killf2fssuper+0x344/0x690 fs/f2fs/super.c:4898 deactivatelockedsuper+0xc4/0x130 fs/super.c:473 cleanupmnt+0x41f/0x4b0 fs/namespace.c:1373 taskworkrun+0x24f/0x310 kernel/taskwork.c:228 ptracenotify+0x2d2/0x380 kernel/signal.c:2402 ptracereportsyscall include/linux/ptrace.h:415 [inline] ptracereportsyscallexit include/linux/ptrace.h:477 [inline] syscallexitwork+0xc6/0x190 kernel/entry/common.c:173 syscallexittousermodeprepare kernel/entry/common.c:200 [inline] _syscallexittousermodework kernel/entry/common.c:205 [inline] syscallexittousermode+0x279/0x370 kernel/entry/common.c:218 dosyscall64+0x100/0x230 arch/x86/entry/common.c:89 entrySYSCALL64afterhwframe+0x77/0x7f RIP: 0010:f2fsevict_inode+0x1598/0x15c0 fs/f2fs/inode.c:896
Online repaire on corrupted directory in f2fs_lookup() can generate dirty data/meta while racing w/ readonly remount, it may leave dirty inode after filesystem becomes readonly, however, checkpoint() will skips flushing dirty inode in a state of readonly mode, result in above panic.
Let's get rid of online repaire in f2fs_lookup(), and leave the work to fsck.f2fs.
{ "vanir_signatures": [ { "id": "CVE-2024-47690-021dedef", "signature_type": "Line", "target": { "file": "fs/f2fs/f2fs.h" }, "signature_version": "v1", "digest": { "line_hashes": [ "19462045945694708137247351798906356746", "156691729630438937451879661365988330136", "245273224153251572245759296030937477762", "22232795223884820314989046757306177333", "297920746532402475368022781583494960033", "124884655483743029840746819470029745568", "286204688774180389399863277074334595199", "69990469971463502049308305339399765893", "193045599944575327237993271480534377938", "73921913376237719703517426424582670750", "18922062595797424486646705656982080407", "163962884359606391040659258807568955631", "311591469780451935085783348529388319689", "319583797431720361869932145579729090452", "178425102422191644761559783611845145806", "67631459094993137617898431291760133728", "331473971479747957609380216294782059047", "62194802532080080281429325880897172832", "187030812721069841831013858006166980796", "131269145552327002022541722167823797173", "85250268067961908779007690280983995120", "182199316576185571063555115996037980996", "296752262481102599113626344946088160433", "272303623795232751534977903675418790881", "294821789091303009230060819577229327478" ], "threshold": 0.9 }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bcefd0b0611f35b560d0a7281d87529fbe7a1e32" }, { "id": "CVE-2024-47690-07ecb50f", "signature_type": "Function", "target": { "file": "fs/f2fs/namei.c", "function": "__recover_dot_dentries" }, "signature_version": "v1", "digest": { "length": 1240.0, "function_hash": "212581482999746569944267897273669092409" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f4746f2d79507f65cfbde11d3c39ee8338aa50af" }, { "id": "CVE-2024-47690-16b862ad", "signature_type": "Line", "target": { "file": "fs/f2fs/f2fs.h" }, "signature_version": "v1", "digest": { "line_hashes": [ "19462045945694708137247351798906356746", "156691729630438937451879661365988330136", "245273224153251572245759296030937477762", "22232795223884820314989046757306177333", "297920746532402475368022781583494960033", "124884655483743029840746819470029745568", "286204688774180389399863277074334595199", "14981515048979517620936409819585799566", "193045599944575327237993271480534377938", "73921913376237719703517426424582670750", "18922062595797424486646705656982080407", "163962884359606391040659258807568955631", "311591469780451935085783348529388319689", "319583797431720361869932145579729090452", "178425102422191644761559783611845145806", "67631459094993137617898431291760133728", "331473971479747957609380216294782059047", "62194802532080080281429325880897172832", "187030812721069841831013858006166980796", "131269145552327002022541722167823797173", "85250268067961908779007690280983995120", "182199316576185571063555115996037980996", "296752262481102599113626344946088160433", "272303623795232751534977903675418790881", "294821789091303009230060819577229327478" ], "threshold": 0.9 }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f4746f2d79507f65cfbde11d3c39ee8338aa50af" }, { "id": "CVE-2024-47690-29ffeff1", "signature_type": "Function", "target": { "file": "fs/f2fs/f2fs.h", "function": "set_raw_inline" }, "signature_version": "v1", "digest": { "length": 762.0, "function_hash": "108368639326242768783193134946893244372" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f4746f2d79507f65cfbde11d3c39ee8338aa50af" }, { "id": "CVE-2024-47690-36f3ad45", "signature_type": "Function", "target": { "file": "fs/f2fs/namei.c", "function": "f2fs_lookup" }, "signature_version": "v1", "digest": { "length": 1705.0, "function_hash": "142420350897120181730402974111637141497" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f4746f2d79507f65cfbde11d3c39ee8338aa50af" }, { "id": "CVE-2024-47690-4c303917", "signature_type": "Function", "target": { "file": "fs/f2fs/f2fs.h", "function": "f2fs_has_inline_dots" }, "signature_version": "v1", "digest": { "length": 95.0, "function_hash": "329935086977667301699776825216761133843" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bcefd0b0611f35b560d0a7281d87529fbe7a1e32" }, { "id": "CVE-2024-47690-54567227", "signature_type": "Function", "target": { "file": "fs/f2fs/f2fs.h", "function": "set_raw_inline" }, "signature_version": "v1", "digest": { "length": 762.0, "function_hash": "108368639326242768783193134946893244372" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bcefd0b0611f35b560d0a7281d87529fbe7a1e32" }, { "id": "CVE-2024-47690-5f40d77f", "signature_type": "Line", "target": { "file": "fs/f2fs/namei.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "124005224010288252229446294953332445219", "143522861017867472323385027066584525586", "72946349349619923716977494092054663102", "294341435047407522221203595511580552355", "65019949648386774922397922571931447702", "40826594325869752161074174843262300685", "329088152328627911389042788175370827014", "230919655824986047736329361453746124008", "47403963309606646831389595719585141144", "86418965020721152070869982974946231648", "327316879448089311764213707563827215860", "65779952378444257661801380152415851776", "328232368202939032481536493804840597346", "270658489118329254682776184657017664609", "284580175577422490454247664909442959664", "27856721406349148370585808027807440371", "137896998114011964216671255151114870591", "182537168321863994522158140301583796718", "217996151506944270624990449026425890236", "238778116541712538963289117518423803715", "114773279166811794122586389572479638925", "309844754319734352515266241614092652495", "180680141815267852694038867381953669416", "76945498667978164458549674979014797711", "109106401376206794644058915777312168370", "261063188510923543526048515976512814891", "53121016522567170833157128599692138096", "59103191176219017072615664360161579108", "247612326466662929684791134204244652975", "293185829284505527199946007894767288043", "333062718757302161450801423546946440389", "255755870588259047759029258198396850171", "203813321897725414654430692760561432291", "200649614762113562881134589188835249294", "336502462632179330891460085862147472974", "104488071405116961822149065380014828200", "72884528282841511887525940908294211421", "55630611772605088307315522866794356129", "318945329407769067437878819733497318804", "309891302008173774330370731448439867648", "82502366628708213038921376505199322155", "187215657857749821966784267114627580928", "209030848046377897074609806590358740093", "324803729180420200481136279705940743554", "114815179320949627716954883622130451506", "101759731968417550899971498452153016789", "201549576053184111346786527338943531153", "263369066532817223014895119287889134375", "306452672248077286692625918344933897831", "53270085805839393333154281913085876241", "68312080330755448180721746562372389003", "60219566790479328809811780181988082289", "182041622072976323606987234480088521289", "158514232123332766618076064759951215081", "27730723538791398315907392847041376079", "111965770013095788691224810626440240972", "185519357851053050358755608171530129154", "28481843550566052837437392936284856295", "36381793762863091167492557058423688438", "211351501558882389106357597875692879870", "17153902582139181172109767191472502733", "40151659201248525643075923759751193673", "156173657792852421861776690965601106300", "119162885341252358969470760417791000089", "160131687992730815681044345306116625856", "133409248324929107156188264728802830934", "157321505711300049839060536920455956548" ], "threshold": 0.9 }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bcefd0b0611f35b560d0a7281d87529fbe7a1e32" }, { "id": "CVE-2024-47690-650cf17f", "signature_type": "Function", "target": { "file": "fs/f2fs/f2fs.h", "function": "set_raw_inline" }, "signature_version": "v1", "digest": { "length": 762.0, "function_hash": "108368639326242768783193134946893244372" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e8d64f598eeb079c42a52deaa3a91312c736a49d" }, { "id": "CVE-2024-47690-69a57d07", "signature_type": "Line", "target": { "file": "fs/f2fs/namei.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "124005224010288252229446294953332445219", "143522861017867472323385027066584525586", "72946349349619923716977494092054663102", "294341435047407522221203595511580552355", "65019949648386774922397922571931447702", "40826594325869752161074174843262300685", "329088152328627911389042788175370827014", "230919655824986047736329361453746124008", "47403963309606646831389595719585141144", "86418965020721152070869982974946231648", "327316879448089311764213707563827215860", "65779952378444257661801380152415851776", "328232368202939032481536493804840597346", "270658489118329254682776184657017664609", "284580175577422490454247664909442959664", "27856721406349148370585808027807440371", "137896998114011964216671255151114870591", "182537168321863994522158140301583796718", "217996151506944270624990449026425890236", "238778116541712538963289117518423803715", "114773279166811794122586389572479638925", "309844754319734352515266241614092652495", "180680141815267852694038867381953669416", "76945498667978164458549674979014797711", "109106401376206794644058915777312168370", "261063188510923543526048515976512814891", "53121016522567170833157128599692138096", "59103191176219017072615664360161579108", "247612326466662929684791134204244652975", "293185829284505527199946007894767288043", "333062718757302161450801423546946440389", "255755870588259047759029258198396850171", "203813321897725414654430692760561432291", "200649614762113562881134589188835249294", "336502462632179330891460085862147472974", "104488071405116961822149065380014828200", "72884528282841511887525940908294211421", "55630611772605088307315522866794356129", "318945329407769067437878819733497318804", "309891302008173774330370731448439867648", "82502366628708213038921376505199322155", "187215657857749821966784267114627580928", "209030848046377897074609806590358740093", "324803729180420200481136279705940743554", "114815179320949627716954883622130451506", "101759731968417550899971498452153016789", "201549576053184111346786527338943531153", "263369066532817223014895119287889134375", "306452672248077286692625918344933897831", "53270085805839393333154281913085876241", "68312080330755448180721746562372389003", "60219566790479328809811780181988082289", "182041622072976323606987234480088521289", "158514232123332766618076064759951215081", "27730723538791398315907392847041376079", "111965770013095788691224810626440240972", "185519357851053050358755608171530129154", "28481843550566052837437392936284856295", "36381793762863091167492557058423688438", "211351501558882389106357597875692879870", "17153902582139181172109767191472502733", "40151659201248525643075923759751193673", "156173657792852421861776690965601106300", "119162885341252358969470760417791000089", "160131687992730815681044345306116625856", "133409248324929107156188264728802830934", "157321505711300049839060536920455956548" ], "threshold": 0.9 }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e8d64f598eeb079c42a52deaa3a91312c736a49d" }, { "id": "CVE-2024-47690-6a49388d", "signature_type": "Function", "target": { "file": "fs/f2fs/namei.c", "function": "f2fs_lookup" }, "signature_version": "v1", "digest": { "length": 1695.0, "function_hash": "113000885134565735365901290627471985144" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bcefd0b0611f35b560d0a7281d87529fbe7a1e32" }, { "id": "CVE-2024-47690-7d4510fc", "signature_type": "Function", "target": { "file": "fs/f2fs/f2fs.h", "function": "__mark_inode_dirty_flag" }, "signature_version": "v1", "digest": { "length": 342.0, "function_hash": "209531606920594909524044490224851981541" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bcefd0b0611f35b560d0a7281d87529fbe7a1e32" }, { "id": "CVE-2024-47690-7dab6208", "signature_type": "Function", "target": { "file": "fs/f2fs/f2fs.h", "function": "__mark_inode_dirty_flag" }, "signature_version": "v1", "digest": { "length": 369.0, "function_hash": "17576271508354596229299237288337765445" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f4746f2d79507f65cfbde11d3c39ee8338aa50af" }, { "id": "CVE-2024-47690-8750809d", "signature_type": "Function", "target": { "file": "fs/f2fs/f2fs.h", "function": "__mark_inode_dirty_flag" }, "signature_version": "v1", "digest": { "length": 342.0, "function_hash": "209531606920594909524044490224851981541" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e8d64f598eeb079c42a52deaa3a91312c736a49d" }, { "id": "CVE-2024-47690-8c79ccd4", "signature_type": "Line", "target": { "file": "fs/f2fs/f2fs.h" }, "signature_version": "v1", "digest": { "line_hashes": [ "262766588813180879435104797471002048390", "276465648683397627634684657392185390588", "245273224153251572245759296030937477762", "22232795223884820314989046757306177333", "297920746532402475368022781583494960033", "124884655483743029840746819470029745568", "286204688774180389399863277074334595199", "69990469971463502049308305339399765893", "193045599944575327237993271480534377938", "73921913376237719703517426424582670750", "18922062595797424486646705656982080407", "163962884359606391040659258807568955631", "311591469780451935085783348529388319689", "319583797431720361869932145579729090452", "178425102422191644761559783611845145806", "67631459094993137617898431291760133728", "331473971479747957609380216294782059047", "62194802532080080281429325880897172832", "187030812721069841831013858006166980796", "131269145552327002022541722167823797173", "85250268067961908779007690280983995120", "182199316576185571063555115996037980996", "296752262481102599113626344946088160433", "272303623795232751534977903675418790881", "294821789091303009230060819577229327478" ], "threshold": 0.9 }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e8d64f598eeb079c42a52deaa3a91312c736a49d" }, { "id": "CVE-2024-47690-903db9fd", "signature_type": "Function", "target": { "file": "fs/f2fs/f2fs.h", "function": "get_inline_info" }, "signature_version": "v1", "digest": { "length": 821.0, "function_hash": "254931391509090982332278277051581867534" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bcefd0b0611f35b560d0a7281d87529fbe7a1e32" }, { "id": "CVE-2024-47690-9b6a060c", "signature_type": "Line", "target": { "file": "fs/f2fs/namei.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "124005224010288252229446294953332445219", "143522861017867472323385027066584525586", "72946349349619923716977494092054663102", "294341435047407522221203595511580552355", "65019949648386774922397922571931447702", "40826594325869752161074174843262300685", "329088152328627911389042788175370827014", "230919655824986047736329361453746124008", "47403963309606646831389595719585141144", "86418965020721152070869982974946231648", "327316879448089311764213707563827215860", "65779952378444257661801380152415851776", "328232368202939032481536493804840597346", "270658489118329254682776184657017664609", "284580175577422490454247664909442959664", "27856721406349148370585808027807440371", "137896998114011964216671255151114870591", "182537168321863994522158140301583796718", "217996151506944270624990449026425890236", "238778116541712538963289117518423803715", "114773279166811794122586389572479638925", "309844754319734352515266241614092652495", "180680141815267852694038867381953669416", "76945498667978164458549674979014797711", "109106401376206794644058915777312168370", "261063188510923543526048515976512814891", "53121016522567170833157128599692138096", "59103191176219017072615664360161579108", "247612326466662929684791134204244652975", "293185829284505527199946007894767288043", "333062718757302161450801423546946440389", "255755870588259047759029258198396850171", "203813321897725414654430692760561432291", "200649614762113562881134589188835249294", "336502462632179330891460085862147472974", "104488071405116961822149065380014828200", "72884528282841511887525940908294211421", "55630611772605088307315522866794356129", "318945329407769067437878819733497318804", "309891302008173774330370731448439867648", "82502366628708213038921376505199322155", "187215657857749821966784267114627580928", "209030848046377897074609806590358740093", "324803729180420200481136279705940743554", "114815179320949627716954883622130451506", "101759731968417550899971498452153016789", "201549576053184111346786527338943531153", "263369066532817223014895119287889134375", "306452672248077286692625918344933897831", "53270085805839393333154281913085876241", "68312080330755448180721746562372389003", "60219566790479328809811780181988082289", "182041622072976323606987234480088521289", "158514232123332766618076064759951215081", "27730723538791398315907392847041376079", "111965770013095788691224810626440240972", "185519357851053050358755608171530129154", "28481843550566052837437392936284856295", "36381793762863091167492557058423688438", "211351501558882389106357597875692879870", "17153902582139181172109767191472502733", "40151659201248525643075923759751193673", "156173657792852421861776690965601106300", "119162885341252358969470760417791000089", "160131687992730815681044345306116625856", "133409248324929107156188264728802830934", "157321505711300049839060536920455956548" ], "threshold": 0.9 }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f4746f2d79507f65cfbde11d3c39ee8338aa50af" }, { "id": "CVE-2024-47690-a2a6f2ba", "signature_type": "Function", "target": { "file": "fs/f2fs/namei.c", "function": "f2fs_lookup" }, "signature_version": "v1", "digest": { "length": 1696.0, "function_hash": "24951318475866708739061733276428619424" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e8d64f598eeb079c42a52deaa3a91312c736a49d" }, { "id": "CVE-2024-47690-b72abb5d", "signature_type": "Function", "target": { "file": "fs/f2fs/f2fs.h", "function": "f2fs_has_inline_dots" }, "signature_version": "v1", "digest": { "length": 95.0, "function_hash": "329935086977667301699776825216761133843" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e8d64f598eeb079c42a52deaa3a91312c736a49d" }, { "id": "CVE-2024-47690-d4e1fe48", "signature_type": "Function", "target": { "file": "fs/f2fs/f2fs.h", "function": "get_inline_info" }, "signature_version": "v1", "digest": { "length": 821.0, "function_hash": "254931391509090982332278277051581867534" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e8d64f598eeb079c42a52deaa3a91312c736a49d" }, { "id": "CVE-2024-47690-d55dbf16", "signature_type": "Function", "target": { "file": "fs/f2fs/f2fs.h", "function": "f2fs_has_inline_dots" }, "signature_version": "v1", "digest": { "length": 95.0, "function_hash": "329935086977667301699776825216761133843" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f4746f2d79507f65cfbde11d3c39ee8338aa50af" }, { "id": "CVE-2024-47690-df295054", "signature_type": "Function", "target": { "file": "fs/f2fs/namei.c", "function": "__recover_dot_dentries" }, "signature_version": "v1", "digest": { "length": 1240.0, "function_hash": "212581482999746569944267897273669092409" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bcefd0b0611f35b560d0a7281d87529fbe7a1e32" }, { "id": "CVE-2024-47690-e1c9d3ef", "signature_type": "Function", "target": { "file": "fs/f2fs/namei.c", "function": "__recover_dot_dentries" }, "signature_version": "v1", "digest": { "length": 1240.0, "function_hash": "212581482999746569944267897273669092409" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e8d64f598eeb079c42a52deaa3a91312c736a49d" }, { "id": "CVE-2024-47690-e6fa0bb3", "signature_type": "Function", "target": { "file": "fs/f2fs/f2fs.h", "function": "get_inline_info" }, "signature_version": "v1", "digest": { "length": 821.0, "function_hash": "254931391509090982332278277051581867534" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f4746f2d79507f65cfbde11d3c39ee8338aa50af" } ] }