In the Linux kernel, the following vulnerability has been resolved:
f2fs: fix to shrink read extent node in batches
We use rwlock to protect core structure data of extent tree during its shrink, however, if there is a huge number of extent nodes in extent tree, during shrink of extent tree, it may hold rwlock for a very long time, which may trigger kernel hang issue.
This patch fixes to shrink read extent node in batches, so that, critical region of the rwlock can be shrunk to avoid its extreme long time hold.
[
{
"id": "CVE-2024-41935-190710c8",
"target": {
"file": "fs/f2fs/extent_cache.c",
"function": "__free_extent_tree"
},
"digest": {
"function_hash": "205169506570528658806865773021591185865",
"length": 378.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@924f7dd1e832e4e4530d14711db223d2803f7b61",
"signature_version": "v1"
},
{
"id": "CVE-2024-41935-3e660b82",
"target": {
"file": "fs/f2fs/extent_cache.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"72676008018347927620547124196520992870",
"122427306105509417095210492872286990417",
"132002356324546218762062688350903971196",
"101288368049094729115423697432248901740",
"179768272908104783825166116940798188488",
"150748684998530867349753364280881624029",
"314036954220172693686869193622845491004",
"311131719105526493149756374177202743076",
"39994076803959267301523839925016994673",
"194125384818848522384961264990719210580",
"213058838065224869169709180632874335215",
"81380184877675133626401989846011702529",
"181480192649700855988131863384876544629",
"216844120838775037814416691600548591128",
"117147366871581138704508305440507227801",
"248028120551031072585820309564074790653",
"96874546224437875247958916083206631320",
"259145248488461899116646920291192224836",
"63241181618166505701407422653378841905",
"192636562900619665759342107596905055353",
"115066805272925971781750200950214857366",
"300173610270839551267307071104392431025",
"247440552681654486642704657254505859175",
"169540334324726758657087572398259385033",
"124396210344281222671390489703865982306",
"330120228887362658804667824264039787936",
"243097537922316257978456988236442866286",
"231087827769979623755283843200537596092",
"247470324506080914471000774642044151785",
"241413359123489515438679011974691772173",
"81816009076083970283276790734459644435",
"213408240842825633220470206204250564604",
"107376002307245940651201559479814442",
"239936956654451103836730249293474584399",
"161467906861391080540334329888933837432",
"126583267171092343761245774183820520316",
"99237671552654348606433870124164391071",
"191160092227473056868006908809932051142",
"6017538590550821328874992587899666962",
"246189505379740405293164775916645279715",
"149752834699831089230412677230660045058",
"1255016485597149721773845675889190606",
"220576333309129755130072026511773477830",
"321007245078990854812710195248525451316",
"290805020079503491384240167923916676503",
"274505673794087225313589620324570728198",
"161260658071871505765347564268793737953",
"245060272462850295847099698396674567450",
"228445193532903869265374248118998582092",
"260303312667659007566823310838444664745",
"32668089297118249285621200036297825981",
"38393103241747545884355957144851260809",
"60175861770117572226519392245531507303",
"317171213044854929897275785683422270278",
"159600933972933596691373493695303035351",
"209378468908241491556335077677158297851",
"28129075302672984749618594467119835947",
"134249963050859854491976219652300740813",
"125329319983557926738023807298115543363",
"192819327651733370711296311284933420852",
"316083908016896951137031589820944301167",
"243097537922316257978456988236442866286"
]
},
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@924f7dd1e832e4e4530d14711db223d2803f7b61",
"signature_version": "v1"
},
{
"id": "CVE-2024-41935-5602c367",
"target": {
"file": "fs/f2fs/extent_cache.c",
"function": "__update_extent_tree_range"
},
"digest": {
"function_hash": "11682952591925377965787370136269692298",
"length": 3077.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@295b50e95e900da31ff237e46e04525fa799b2cf",
"signature_version": "v1"
},
{
"id": "CVE-2024-41935-6b78ed8f",
"target": {
"file": "fs/f2fs/extent_cache.c",
"function": "__destroy_extent_node"
},
"digest": {
"function_hash": "99240909194234362787857031601586560782",
"length": 343.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@924f7dd1e832e4e4530d14711db223d2803f7b61",
"signature_version": "v1"
},
{
"id": "CVE-2024-41935-7353361f",
"target": {
"file": "fs/f2fs/extent_cache.c",
"function": "__destroy_extent_node"
},
"digest": {
"function_hash": "99240909194234362787857031601586560782",
"length": 343.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@295b50e95e900da31ff237e46e04525fa799b2cf",
"signature_version": "v1"
},
{
"id": "CVE-2024-41935-77031ba7",
"target": {
"file": "fs/f2fs/extent_cache.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"72676008018347927620547124196520992870",
"122427306105509417095210492872286990417",
"132002356324546218762062688350903971196",
"101288368049094729115423697432248901740",
"179768272908104783825166116940798188488",
"150748684998530867349753364280881624029",
"314036954220172693686869193622845491004",
"311131719105526493149756374177202743076",
"39994076803959267301523839925016994673",
"194125384818848522384961264990719210580",
"213058838065224869169709180632874335215",
"81380184877675133626401989846011702529",
"181480192649700855988131863384876544629",
"216844120838775037814416691600548591128",
"117147366871581138704508305440507227801",
"248028120551031072585820309564074790653",
"96874546224437875247958916083206631320",
"259145248488461899116646920291192224836",
"63241181618166505701407422653378841905",
"192636562900619665759342107596905055353",
"115066805272925971781750200950214857366",
"300173610270839551267307071104392431025",
"247440552681654486642704657254505859175",
"169540334324726758657087572398259385033",
"124396210344281222671390489703865982306",
"330120228887362658804667824264039787936",
"243097537922316257978456988236442866286",
"231087827769979623755283843200537596092",
"247470324506080914471000774642044151785",
"241413359123489515438679011974691772173",
"81816009076083970283276790734459644435",
"213408240842825633220470206204250564604",
"107376002307245940651201559479814442",
"239936956654451103836730249293474584399",
"161467906861391080540334329888933837432",
"126583267171092343761245774183820520316",
"99237671552654348606433870124164391071",
"191160092227473056868006908809932051142",
"6017538590550821328874992587899666962",
"246189505379740405293164775916645279715",
"149752834699831089230412677230660045058",
"1255016485597149721773845675889190606",
"220576333309129755130072026511773477830",
"321007245078990854812710195248525451316",
"290805020079503491384240167923916676503",
"274505673794087225313589620324570728198",
"161260658071871505765347564268793737953",
"245060272462850295847099698396674567450",
"228445193532903869265374248118998582092",
"260303312667659007566823310838444664745",
"32668089297118249285621200036297825981",
"38393103241747545884355957144851260809",
"60175861770117572226519392245531507303",
"317171213044854929897275785683422270278",
"159600933972933596691373493695303035351",
"209378468908241491556335077677158297851",
"28129075302672984749618594467119835947",
"134249963050859854491976219652300740813",
"125329319983557926738023807298115543363",
"192819327651733370711296311284933420852",
"316083908016896951137031589820944301167",
"243097537922316257978456988236442866286"
]
},
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3fc5d5a182f6a1f8bd4dc775feb54c369dd2c343",
"signature_version": "v1"
},
{
"id": "CVE-2024-41935-80d64cb7",
"target": {
"file": "fs/f2fs/extent_cache.c",
"function": "__update_extent_tree_range"
},
"digest": {
"function_hash": "11682952591925377965787370136269692298",
"length": 3077.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3fc5d5a182f6a1f8bd4dc775feb54c369dd2c343",
"signature_version": "v1"
},
{
"id": "CVE-2024-41935-8ed3a445",
"target": {
"file": "fs/f2fs/extent_cache.c",
"function": "__drop_extent_tree"
},
"digest": {
"function_hash": "37796920159595167519275193559130212267",
"length": 475.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@924f7dd1e832e4e4530d14711db223d2803f7b61",
"signature_version": "v1"
},
{
"id": "CVE-2024-41935-90ff0fb7",
"target": {
"file": "fs/f2fs/extent_cache.c",
"function": "__free_extent_tree"
},
"digest": {
"function_hash": "205169506570528658806865773021591185865",
"length": 378.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@295b50e95e900da31ff237e46e04525fa799b2cf",
"signature_version": "v1"
},
{
"id": "CVE-2024-41935-a1fb34a3",
"target": {
"file": "fs/f2fs/extent_cache.c",
"function": "__shrink_extent_tree"
},
"digest": {
"function_hash": "310970412511435541690230233747748985646",
"length": 1631.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@295b50e95e900da31ff237e46e04525fa799b2cf",
"signature_version": "v1"
},
{
"id": "CVE-2024-41935-b0159355",
"target": {
"file": "fs/f2fs/extent_cache.c",
"function": "__shrink_extent_tree"
},
"digest": {
"function_hash": "310970412511435541690230233747748985646",
"length": 1631.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@924f7dd1e832e4e4530d14711db223d2803f7b61",
"signature_version": "v1"
},
{
"id": "CVE-2024-41935-b88a3636",
"target": {
"file": "fs/f2fs/extent_cache.c",
"function": "__drop_extent_tree"
},
"digest": {
"function_hash": "37796920159595167519275193559130212267",
"length": 475.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3fc5d5a182f6a1f8bd4dc775feb54c369dd2c343",
"signature_version": "v1"
},
{
"id": "CVE-2024-41935-bfe0d809",
"target": {
"file": "fs/f2fs/extent_cache.c",
"function": "__destroy_extent_node"
},
"digest": {
"function_hash": "99240909194234362787857031601586560782",
"length": 343.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3fc5d5a182f6a1f8bd4dc775feb54c369dd2c343",
"signature_version": "v1"
},
{
"id": "CVE-2024-41935-d91fa22b",
"target": {
"file": "fs/f2fs/extent_cache.c",
"function": "__free_extent_tree"
},
"digest": {
"function_hash": "205169506570528658806865773021591185865",
"length": 378.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3fc5d5a182f6a1f8bd4dc775feb54c369dd2c343",
"signature_version": "v1"
},
{
"id": "CVE-2024-41935-e1eed003",
"target": {
"file": "fs/f2fs/extent_cache.c",
"function": "__drop_extent_tree"
},
"digest": {
"function_hash": "37796920159595167519275193559130212267",
"length": 475.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@295b50e95e900da31ff237e46e04525fa799b2cf",
"signature_version": "v1"
},
{
"id": "CVE-2024-41935-e6b33339",
"target": {
"file": "fs/f2fs/extent_cache.c",
"function": "__shrink_extent_tree"
},
"digest": {
"function_hash": "310970412511435541690230233747748985646",
"length": 1631.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3fc5d5a182f6a1f8bd4dc775feb54c369dd2c343",
"signature_version": "v1"
},
{
"id": "CVE-2024-41935-e9ed60f0",
"target": {
"file": "fs/f2fs/extent_cache.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"72676008018347927620547124196520992870",
"122427306105509417095210492872286990417",
"132002356324546218762062688350903971196",
"101288368049094729115423697432248901740",
"179768272908104783825166116940798188488",
"150748684998530867349753364280881624029",
"314036954220172693686869193622845491004",
"311131719105526493149756374177202743076",
"39994076803959267301523839925016994673",
"194125384818848522384961264990719210580",
"213058838065224869169709180632874335215",
"81380184877675133626401989846011702529",
"181480192649700855988131863384876544629",
"216844120838775037814416691600548591128",
"117147366871581138704508305440507227801",
"248028120551031072585820309564074790653",
"96874546224437875247958916083206631320",
"259145248488461899116646920291192224836",
"63241181618166505701407422653378841905",
"192636562900619665759342107596905055353",
"115066805272925971781750200950214857366",
"300173610270839551267307071104392431025",
"247440552681654486642704657254505859175",
"169540334324726758657087572398259385033",
"124396210344281222671390489703865982306",
"330120228887362658804667824264039787936",
"243097537922316257978456988236442866286",
"231087827769979623755283843200537596092",
"247470324506080914471000774642044151785",
"241413359123489515438679011974691772173",
"81816009076083970283276790734459644435",
"213408240842825633220470206204250564604",
"107376002307245940651201559479814442",
"239936956654451103836730249293474584399",
"161467906861391080540334329888933837432",
"126583267171092343761245774183820520316",
"99237671552654348606433870124164391071",
"191160092227473056868006908809932051142",
"6017538590550821328874992587899666962",
"246189505379740405293164775916645279715",
"149752834699831089230412677230660045058",
"1255016485597149721773845675889190606",
"220576333309129755130072026511773477830",
"321007245078990854812710195248525451316",
"290805020079503491384240167923916676503",
"274505673794087225313589620324570728198",
"161260658071871505765347564268793737953",
"245060272462850295847099698396674567450",
"228445193532903869265374248118998582092",
"260303312667659007566823310838444664745",
"32668089297118249285621200036297825981",
"38393103241747545884355957144851260809",
"60175861770117572226519392245531507303",
"317171213044854929897275785683422270278",
"159600933972933596691373493695303035351",
"209378468908241491556335077677158297851",
"28129075302672984749618594467119835947",
"134249963050859854491976219652300740813",
"125329319983557926738023807298115543363",
"192819327651733370711296311284933420852",
"316083908016896951137031589820944301167",
"243097537922316257978456988236442866286"
]
},
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@295b50e95e900da31ff237e46e04525fa799b2cf",
"signature_version": "v1"
},
{
"id": "CVE-2024-41935-fc84f0db",
"target": {
"file": "fs/f2fs/extent_cache.c",
"function": "__update_extent_tree_range"
},
"digest": {
"function_hash": "11682952591925377965787370136269692298",
"length": 3077.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@924f7dd1e832e4e4530d14711db223d2803f7b61",
"signature_version": "v1"
}
]