In the Linux kernel, the following vulnerability has been resolved:
orangefs: Fix kmemleak in orangefs{kernel,client}debug_init()
When insert and remove the orangefs module, there are memory leaked as below:
unreferenced object 0xffff88816b0cc000 (size 2048): comm "insmod", pid 783, jiffies 4294813439 (age 65.512s) hex dump (first 32 bytes): 6e 6f 6e 65 0a 00 00 00 00 00 00 00 00 00 00 00 none............ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<0000000031ab7788>] kmalloctrace+0x27/0xa0 [<000000005b405fee>] orangefsdebugfsinit.cold+0xaf/0x17f [<00000000e5a0085b>] 0xffffffffa02780f9 [<000000004232d9f7>] dooneinitcall+0x87/0x2a0 [<0000000054f22384>] doinitmodule+0xdf/0x320 [<000000003263bdea>] loadmodule+0x2f98/0x3330 [<0000000052cd4153>] _dosysfinitmodule+0x113/0x1b0 [<00000000250ae02b>] dosyscall64+0x35/0x80 [<00000000f11c03c7>] entrySYSCALL64afterhwframe+0x46/0xb0
Use the golbal variable as the buffer rather than dynamic allocate to slove the problem.
{ "vanir_signatures": [ { "digest": { "line_hashes": [ "334410369026860067389822790067091958085", "143264477964044419085306586271380006079", "241509642494942261380370369275614454397", "137119296177882601017360799330408167755", "294481157696411968023751909863545509634", "7856248283704292704035379789893931740", "195625573764601852706601375473281387874", "176864374479571616889553639535542722350", "188905423499120365452612558602162587167", "133862943073393009218181640789932469002", "320881771069305694260820743317047399145", "139788588351230745301663745729972886990", "138453167452781401248212906084197904032", "263901105665578379054447094135663704948", "276627087375393518297917664258209359645", "3224429867260297251285854788199516621", "53647265323681402674911277883259046783", "164613551685133647747302589086234917545", "51299691283026083508180156103422333321", "252581701288168928589621315246329720049", "205102298147581109290393880620224798234", "326823308119451788298900130065782637759", "131340695690234684944886139886527375601", "44870633204596845111511212758251998495", "276950085431190715281557965733446694937", "319802055186308796953290972076810098237", "281750772549288761896598263280025471538", "51406762400550778834733758125364116661", "114362939135931982222786775823164871529", "114140232178074443058570586729159096175", "49323211611079769490561325464786077552", "202546629304154199565113433169646015180" ], "threshold": 0.9 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a076490b0211990ec6764328c22cb744dd782bd9", "signature_type": "Line", "target": { "file": "fs/orangefs/orangefs-debugfs.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50376-0d422b00" }, { "digest": { "line_hashes": [ "334410369026860067389822790067091958085", "143264477964044419085306586271380006079", "241509642494942261380370369275614454397", "137119296177882601017360799330408167755", "294481157696411968023751909863545509634", "7856248283704292704035379789893931740", "195625573764601852706601375473281387874", "176864374479571616889553639535542722350", "188905423499120365452612558602162587167", "133862943073393009218181640789932469002", "320881771069305694260820743317047399145", "139788588351230745301663745729972886990", "138453167452781401248212906084197904032", "263901105665578379054447094135663704948", "276627087375393518297917664258209359645", "3224429867260297251285854788199516621", "53647265323681402674911277883259046783", "164613551685133647747302589086234917545", "51299691283026083508180156103422333321", "252581701288168928589621315246329720049", "205102298147581109290393880620224798234", "326823308119451788298900130065782637759", "131340695690234684944886139886527375601", "44870633204596845111511212758251998495", "276950085431190715281557965733446694937", "319802055186308796953290972076810098237", "281750772549288761896598263280025471538", "51406762400550778834733758125364116661", "114362939135931982222786775823164871529", "114140232178074443058570586729159096175", "49323211611079769490561325464786077552", "202546629304154199565113433169646015180" ], "threshold": 0.9 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0cd303aad220fafa595e0ed593e99aa51b90412b", "signature_type": "Line", "target": { "file": "fs/orangefs/orangefs-debugfs.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50376-2a429cb6" }, { "digest": { "length": 625.0, "function_hash": "225316445076572759293754469988829083826" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a076490b0211990ec6764328c22cb744dd782bd9", "signature_type": "Function", "target": { "function": "orangefs_kernel_debug_init", "file": "fs/orangefs/orangefs-debugfs.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50376-2c2d9321" }, { "digest": { "length": 625.0, "function_hash": "225316445076572759293754469988829083826" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@786e5296f9e3b045d5ff9098514ce7b8ba1d890d", "signature_type": "Function", "target": { "function": "orangefs_kernel_debug_init", "file": "fs/orangefs/orangefs-debugfs.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50376-2cf6fc8a" }, { "digest": { "length": 672.0, "function_hash": "131753609817997299505567712892592727166" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c8853267289c55b1acbe4dc3641374887584834d", "signature_type": "Function", "target": { "function": "orangefs_client_debug_init", "file": "fs/orangefs/orangefs-debugfs.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50376-36d8b0e1" }, { "digest": { "length": 625.0, "function_hash": "225316445076572759293754469988829083826" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bdc2d33fa2324b1f5ab5b701cda45ee0b2384409", "signature_type": "Function", "target": { "function": "orangefs_kernel_debug_init", "file": "fs/orangefs/orangefs-debugfs.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50376-4618b368" }, { "digest": { "length": 625.0, "function_hash": "225316445076572759293754469988829083826" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c8853267289c55b1acbe4dc3641374887584834d", "signature_type": "Function", "target": { "function": "orangefs_kernel_debug_init", "file": "fs/orangefs/orangefs-debugfs.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50376-5cfdd202" }, { "digest": { "length": 672.0, "function_hash": "131753609817997299505567712892592727166" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@31720a2b109b3080eb77e97b8f6f50a27b4ae599", "signature_type": "Function", "target": { "function": "orangefs_client_debug_init", "file": "fs/orangefs/orangefs-debugfs.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50376-81539cce" }, { "digest": { "length": 672.0, "function_hash": "131753609817997299505567712892592727166" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a076490b0211990ec6764328c22cb744dd782bd9", "signature_type": "Function", "target": { "function": "orangefs_client_debug_init", "file": "fs/orangefs/orangefs-debugfs.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50376-8410a655" }, { "digest": { "length": 672.0, "function_hash": "131753609817997299505567712892592727166" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@786e5296f9e3b045d5ff9098514ce7b8ba1d890d", "signature_type": "Function", "target": { "function": "orangefs_client_debug_init", "file": "fs/orangefs/orangefs-debugfs.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50376-84416ebd" }, { "digest": { "line_hashes": [ "334410369026860067389822790067091958085", "143264477964044419085306586271380006079", "241509642494942261380370369275614454397", "137119296177882601017360799330408167755", "294481157696411968023751909863545509634", "7856248283704292704035379789893931740", "195625573764601852706601375473281387874", "176864374479571616889553639535542722350", "188905423499120365452612558602162587167", "133862943073393009218181640789932469002", "320881771069305694260820743317047399145", "139788588351230745301663745729972886990", "138453167452781401248212906084197904032", "263901105665578379054447094135663704948", "276627087375393518297917664258209359645", "3224429867260297251285854788199516621", "53647265323681402674911277883259046783", "164613551685133647747302589086234917545", "51299691283026083508180156103422333321", "252581701288168928589621315246329720049", "205102298147581109290393880620224798234", "326823308119451788298900130065782637759", "131340695690234684944886139886527375601", "44870633204596845111511212758251998495", "276950085431190715281557965733446694937", "319802055186308796953290972076810098237", "281750772549288761896598263280025471538", "51406762400550778834733758125364116661", "114362939135931982222786775823164871529", "114140232178074443058570586729159096175", "49323211611079769490561325464786077552", "202546629304154199565113433169646015180" ], "threshold": 0.9 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c8853267289c55b1acbe4dc3641374887584834d", "signature_type": "Line", "target": { "file": "fs/orangefs/orangefs-debugfs.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50376-9e62961e" }, { "digest": { "line_hashes": [ "334410369026860067389822790067091958085", "143264477964044419085306586271380006079", "241509642494942261380370369275614454397", "137119296177882601017360799330408167755", "294481157696411968023751909863545509634", "7856248283704292704035379789893931740", "195625573764601852706601375473281387874", "176864374479571616889553639535542722350", "188905423499120365452612558602162587167", "133862943073393009218181640789932469002", "320881771069305694260820743317047399145", "139788588351230745301663745729972886990", "138453167452781401248212906084197904032", "263901105665578379054447094135663704948", "276627087375393518297917664258209359645", "3224429867260297251285854788199516621", "53647265323681402674911277883259046783", "164613551685133647747302589086234917545", "51299691283026083508180156103422333321", "252581701288168928589621315246329720049", "205102298147581109290393880620224798234", "326823308119451788298900130065782637759", "131340695690234684944886139886527375601", "44870633204596845111511212758251998495", "276950085431190715281557965733446694937", "319802055186308796953290972076810098237", "281750772549288761896598263280025471538", "51406762400550778834733758125364116661", "114362939135931982222786775823164871529", "114140232178074443058570586729159096175", "49323211611079769490561325464786077552", "202546629304154199565113433169646015180" ], "threshold": 0.9 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@31720a2b109b3080eb77e97b8f6f50a27b4ae599", "signature_type": "Line", "target": { "file": "fs/orangefs/orangefs-debugfs.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50376-9e892f9b" }, { "digest": { "length": 672.0, "function_hash": "131753609817997299505567712892592727166" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bdc2d33fa2324b1f5ab5b701cda45ee0b2384409", "signature_type": "Function", "target": { "function": "orangefs_client_debug_init", "file": "fs/orangefs/orangefs-debugfs.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50376-b6344ce9" }, { "digest": { "line_hashes": [ "334410369026860067389822790067091958085", "143264477964044419085306586271380006079", "241509642494942261380370369275614454397", "137119296177882601017360799330408167755", "294481157696411968023751909863545509634", "7856248283704292704035379789893931740", "195625573764601852706601375473281387874", "176864374479571616889553639535542722350", "188905423499120365452612558602162587167", "133862943073393009218181640789932469002", "320881771069305694260820743317047399145", "139788588351230745301663745729972886990", "138453167452781401248212906084197904032", "263901105665578379054447094135663704948", "276627087375393518297917664258209359645", "3224429867260297251285854788199516621", "53647265323681402674911277883259046783", "164613551685133647747302589086234917545", "51299691283026083508180156103422333321", "252581701288168928589621315246329720049", "205102298147581109290393880620224798234", "326823308119451788298900130065782637759", "131340695690234684944886139886527375601", "44870633204596845111511212758251998495", "276950085431190715281557965733446694937", "319802055186308796953290972076810098237", "281750772549288761896598263280025471538", "51406762400550778834733758125364116661", "114362939135931982222786775823164871529", "114140232178074443058570586729159096175", "49323211611079769490561325464786077552", "202546629304154199565113433169646015180" ], "threshold": 0.9 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bdc2d33fa2324b1f5ab5b701cda45ee0b2384409", "signature_type": "Line", "target": { "file": "fs/orangefs/orangefs-debugfs.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50376-d6e8c3a8" }, { "digest": { "length": 625.0, "function_hash": "225316445076572759293754469988829083826" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@31720a2b109b3080eb77e97b8f6f50a27b4ae599", "signature_type": "Function", "target": { "function": "orangefs_kernel_debug_init", "file": "fs/orangefs/orangefs-debugfs.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50376-e181aaa4" }, { "digest": { "line_hashes": [ "334410369026860067389822790067091958085", "143264477964044419085306586271380006079", "241509642494942261380370369275614454397", "137119296177882601017360799330408167755", "294481157696411968023751909863545509634", "7856248283704292704035379789893931740", "195625573764601852706601375473281387874", "176864374479571616889553639535542722350", "188905423499120365452612558602162587167", "133862943073393009218181640789932469002", "320881771069305694260820743317047399145", "139788588351230745301663745729972886990", "138453167452781401248212906084197904032", "263901105665578379054447094135663704948", "276627087375393518297917664258209359645", "3224429867260297251285854788199516621", "53647265323681402674911277883259046783", "164613551685133647747302589086234917545", "51299691283026083508180156103422333321", "252581701288168928589621315246329720049", "205102298147581109290393880620224798234", "326823308119451788298900130065782637759", "131340695690234684944886139886527375601", "44870633204596845111511212758251998495", "276950085431190715281557965733446694937", "319802055186308796953290972076810098237", "281750772549288761896598263280025471538", "51406762400550778834733758125364116661", "114362939135931982222786775823164871529", "114140232178074443058570586729159096175", "49323211611079769490561325464786077552", "202546629304154199565113433169646015180" ], "threshold": 0.9 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@786e5296f9e3b045d5ff9098514ce7b8ba1d890d", "signature_type": "Line", "target": { "file": "fs/orangefs/orangefs-debugfs.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50376-ed4a1679" }, { "digest": { "length": 672.0, "function_hash": "131753609817997299505567712892592727166" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0cd303aad220fafa595e0ed593e99aa51b90412b", "signature_type": "Function", "target": { "function": "orangefs_client_debug_init", "file": "fs/orangefs/orangefs-debugfs.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50376-f3e6e90d" }, { "digest": { "length": 625.0, "function_hash": "225316445076572759293754469988829083826" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0cd303aad220fafa595e0ed593e99aa51b90412b", "signature_type": "Function", "target": { "function": "orangefs_kernel_debug_init", "file": "fs/orangefs/orangefs-debugfs.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50376-fc871451" } ] }