In the Linux kernel, the following vulnerability has been resolved:
net: hns: fix possible memory leak in hnaeaeregister()
Inject fault while probing module, if deviceregister() fails, but the refcount of kobject is not decreased to 0, the name allocated in devsetname() is leaked. Fix this by calling putdevice(), so that name can be freed in callback function kobject_cleanup().
unreferenced object 0xffff00c01aba2100 (size 128): comm "systemd-udevd", pid 1259, jiffies 4294903284 (age 294.152s) hex dump (first 32 bytes): 68 6e 61 65 30 00 00 00 18 21 ba 1a c0 00 ff ff hnae0....!...... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<0000000034783f26>] slabpostallochook+0xa0/0x3e0 [<00000000748188f2>] _kmemcacheallocnode+0x164/0x2b0 [<00000000ab0743e8>] _kmallocnodetrackcaller+0x6c/0x390 [<000000006c0ffb13>] kvasprintf+0x8c/0x118 [<00000000fa27bfe1>] kvasprintfconst+0x60/0xc8 [<0000000083e10ed7>] kobjectsetnamevargs+0x3c/0xc0 [<000000000b87affc>] devsetname+0x7c/0xa0 [<000000003fd8fe26>] hnaeaeregister+0xcc/0x190 [hnae] [<00000000fe97edc9>] hnsdsafaeinit+0x9c/0x108 [hnsdsaf] [<00000000c36ff1eb>] hnsdsafprobe+0x548/0x748 [hnsdsaf]
{ "vanir_signatures": [ { "digest": { "length": 902.0, "function_hash": "1663189424743706291462505553648319228" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@02dc0db19d944b4a90941db505ecf1aaec714be4", "signature_type": "Function", "target": { "function": "hnae_ae_register", "file": "drivers/net/ethernet/hisilicon/hns/hnae.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50352-0422288a" }, { "digest": { "line_hashes": [ "285786049449830747300742631670575639642", "172619528498051187597786563813768438401", "209494861542426695942977761651651863113", "51447311330166661717562841052770892117", "109173853625508114885933143938593802215" ], "threshold": 0.9 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ff2f5ec5d009844ec28f171123f9e58750cef4bf", "signature_type": "Line", "target": { "file": "drivers/net/ethernet/hisilicon/hns/hnae.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50352-0e233512" }, { "digest": { "line_hashes": [ "285786049449830747300742631670575639642", "172619528498051187597786563813768438401", "209494861542426695942977761651651863113", "51447311330166661717562841052770892117", "109173853625508114885933143938593802215" ], "threshold": 0.9 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2974f3b330ef25f5d34a4948d04290c2cd7802cf", "signature_type": "Line", "target": { "file": "drivers/net/ethernet/hisilicon/hns/hnae.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50352-334b1a90" }, { "digest": { "length": 902.0, "function_hash": "1663189424743706291462505553648319228" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7ae1345f6ad715acbcdc9e1ac28153684fd498bb", "signature_type": "Function", "target": { "function": "hnae_ae_register", "file": "drivers/net/ethernet/hisilicon/hns/hnae.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50352-3a210cd3" }, { "digest": { "line_hashes": [ "285786049449830747300742631670575639642", "172619528498051187597786563813768438401", "209494861542426695942977761651651863113", "51447311330166661717562841052770892117", "109173853625508114885933143938593802215" ], "threshold": 0.9 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a3c148955c22fe1d94d7a2096005679c1f22eddf", "signature_type": "Line", "target": { "file": "drivers/net/ethernet/hisilicon/hns/hnae.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50352-479e99cd" }, { "digest": { "length": 902.0, "function_hash": "1663189424743706291462505553648319228" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3b78453cca046d3b03853f0d077ad3ad130db886", "signature_type": "Function", "target": { "function": "hnae_ae_register", "file": "drivers/net/ethernet/hisilicon/hns/hnae.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50352-51c82c46" }, { "digest": { "length": 902.0, "function_hash": "1663189424743706291462505553648319228" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2974f3b330ef25f5d34a4948d04290c2cd7802cf", "signature_type": "Function", "target": { "function": "hnae_ae_register", "file": "drivers/net/ethernet/hisilicon/hns/hnae.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50352-559d100a" }, { "digest": { "line_hashes": [ "285786049449830747300742631670575639642", "172619528498051187597786563813768438401", "209494861542426695942977761651651863113", "51447311330166661717562841052770892117", "109173853625508114885933143938593802215" ], "threshold": 0.9 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3b78453cca046d3b03853f0d077ad3ad130db886", "signature_type": "Line", "target": { "file": "drivers/net/ethernet/hisilicon/hns/hnae.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50352-7fa6914b" }, { "digest": { "line_hashes": [ "285786049449830747300742631670575639642", "172619528498051187597786563813768438401", "209494861542426695942977761651651863113", "51447311330166661717562841052770892117", "109173853625508114885933143938593802215" ], "threshold": 0.9 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@02dc0db19d944b4a90941db505ecf1aaec714be4", "signature_type": "Line", "target": { "file": "drivers/net/ethernet/hisilicon/hns/hnae.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50352-8cc6efbd" }, { "digest": { "length": 902.0, "function_hash": "1663189424743706291462505553648319228" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ff2f5ec5d009844ec28f171123f9e58750cef4bf", "signature_type": "Function", "target": { "function": "hnae_ae_register", "file": "drivers/net/ethernet/hisilicon/hns/hnae.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50352-9b480bef" }, { "digest": { "length": 902.0, "function_hash": "1663189424743706291462505553648319228" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@dfc0337c6dceb6449403b33ecb141f4a1458a1e9", "signature_type": "Function", "target": { "function": "hnae_ae_register", "file": "drivers/net/ethernet/hisilicon/hns/hnae.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50352-a0ce52fe" }, { "digest": { "line_hashes": [ "285786049449830747300742631670575639642", "172619528498051187597786563813768438401", "209494861542426695942977761651651863113", "51447311330166661717562841052770892117", "109173853625508114885933143938593802215" ], "threshold": 0.9 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7ae1345f6ad715acbcdc9e1ac28153684fd498bb", "signature_type": "Line", "target": { "file": "drivers/net/ethernet/hisilicon/hns/hnae.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50352-a89c75fc" }, { "digest": { "length": 902.0, "function_hash": "1663189424743706291462505553648319228" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a3c148955c22fe1d94d7a2096005679c1f22eddf", "signature_type": "Function", "target": { "function": "hnae_ae_register", "file": "drivers/net/ethernet/hisilicon/hns/hnae.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50352-acefd92e" }, { "digest": { "line_hashes": [ "285786049449830747300742631670575639642", "172619528498051187597786563813768438401", "209494861542426695942977761651651863113", "51447311330166661717562841052770892117", "109173853625508114885933143938593802215" ], "threshold": 0.9 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@91f8f5342bee726ed5692583d58f69e7cc9ae60e", "signature_type": "Line", "target": { "file": "drivers/net/ethernet/hisilicon/hns/hnae.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50352-b168d7bf" }, { "digest": { "line_hashes": [ "285786049449830747300742631670575639642", "172619528498051187597786563813768438401", "209494861542426695942977761651651863113", "51447311330166661717562841052770892117", "109173853625508114885933143938593802215" ], "threshold": 0.9 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@dfc0337c6dceb6449403b33ecb141f4a1458a1e9", "signature_type": "Line", "target": { "file": "drivers/net/ethernet/hisilicon/hns/hnae.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50352-ce3b7a44" }, { "digest": { "length": 902.0, "function_hash": "1663189424743706291462505553648319228" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@91f8f5342bee726ed5692583d58f69e7cc9ae60e", "signature_type": "Function", "target": { "function": "hnae_ae_register", "file": "drivers/net/ethernet/hisilicon/hns/hnae.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50352-da927c8c" } ] }