In the Linux kernel, the following vulnerability has been resolved:
NTB: fix possible name leak in ntbregisterdevice()
If deviceregister() fails in ntbregisterdevice(), the device name allocated by devsetname() should be freed. As per the comment in deviceregister(), callers should use putdevice() to give up the reference in the error path. So fix this by calling putdevice() in the error path so that the name can be freed in kobject_cleanup().
As a result of this, putdevice() in the error path of ntbregister_device() is removed and the actual error is returned.
[mani: reworded commit message]
[
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"333728943713797360081378860533030876525",
"241988090604090349005484308570963280802",
"29163685367315973070553898147808555865",
"1055176422241824902484973750595838309",
"244270790409752707708684085406368636681",
"182843844930260411261432419954126008299",
"260313597811660888811089369781025283132",
"193095951614239032989258255927094249584",
"102986057030248664251918687443669174284",
"105058717482629352099816562000843258900"
]
},
"target": {
"file": "drivers/pci/endpoint/functions/pci-epf-vntb.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6632a54ac8057cc0b0d789c6f73883e871bcd25c",
"id": "CVE-2023-52652-06f66e34",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"333728943713797360081378860533030876525",
"241988090604090349005484308570963280802",
"29163685367315973070553898147808555865",
"1055176422241824902484973750595838309",
"244270790409752707708684085406368636681",
"182843844930260411261432419954126008299",
"260313597811660888811089369781025283132",
"193095951614239032989258255927094249584",
"102986057030248664251918687443669174284",
"105058717482629352099816562000843258900"
]
},
"target": {
"file": "drivers/pci/endpoint/functions/pci-epf-vntb.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e8025439ef8e16029dc313d78a351ef192469b7b",
"id": "CVE-2023-52652-0e16974b",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "75430624067410731610387860258973609398",
"length": 640.0
},
"target": {
"file": "drivers/pci/endpoint/functions/pci-epf-vntb.c",
"function": "pci_vntb_probe"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a62b9f3d7bbfac874cc0c638bc1776dcf1f8ec06",
"id": "CVE-2023-52652-17795ddd",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "16643259272676758955069031539557516409",
"length": 549.0
},
"target": {
"file": "drivers/ntb/core.c",
"function": "ntb_register_device"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@aebfdfe39b9327a3077d0df8db3beb3160c9bdd0",
"id": "CVE-2023-52652-188c0817",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"140337116034562459763160609185761014157",
"322462471126832787651775262629501176536",
"37090475859389277058944305401409894690",
"21886158378701063513731478989601848906",
"121817642082850231413891815934911903281",
"3637291698990143588427779296159412182",
"218110074225654056201045467062261756967",
"111312978067254206707685741662704148809"
]
},
"target": {
"file": "drivers/ntb/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@913421f9f7fd8324dcc41753d0f28b52e177ef04",
"id": "CVE-2023-52652-410459ee",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "16643259272676758955069031539557516409",
"length": 549.0
},
"target": {
"file": "drivers/ntb/core.c",
"function": "ntb_register_device"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a039690d323221eb5865f1f31db3ec264e7a14b6",
"id": "CVE-2023-52652-4820460a",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "75430624067410731610387860258973609398",
"length": 640.0
},
"target": {
"file": "drivers/pci/endpoint/functions/pci-epf-vntb.c",
"function": "pci_vntb_probe"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e8025439ef8e16029dc313d78a351ef192469b7b",
"id": "CVE-2023-52652-52f3c302",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "16643259272676758955069031539557516409",
"length": 549.0
},
"target": {
"file": "drivers/ntb/core.c",
"function": "ntb_register_device"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6632a54ac8057cc0b0d789c6f73883e871bcd25c",
"id": "CVE-2023-52652-5dc689b5",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"333728943713797360081378860533030876525",
"241988090604090349005484308570963280802",
"29163685367315973070553898147808555865",
"1055176422241824902484973750595838309",
"244270790409752707708684085406368636681",
"182843844930260411261432419954126008299",
"260313597811660888811089369781025283132",
"193095951614239032989258255927094249584",
"102986057030248664251918687443669174284",
"105058717482629352099816562000843258900"
]
},
"target": {
"file": "drivers/pci/endpoint/functions/pci-epf-vntb.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@913421f9f7fd8324dcc41753d0f28b52e177ef04",
"id": "CVE-2023-52652-65cb0e85",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "75430624067410731610387860258973609398",
"length": 640.0
},
"target": {
"file": "drivers/pci/endpoint/functions/pci-epf-vntb.c",
"function": "pci_vntb_probe"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6632a54ac8057cc0b0d789c6f73883e871bcd25c",
"id": "CVE-2023-52652-66d43660",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"140337116034562459763160609185761014157",
"322462471126832787651775262629501176536",
"37090475859389277058944305401409894690",
"21886158378701063513731478989601848906",
"121817642082850231413891815934911903281",
"3637291698990143588427779296159412182",
"218110074225654056201045467062261756967",
"111312978067254206707685741662704148809"
]
},
"target": {
"file": "drivers/ntb/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a039690d323221eb5865f1f31db3ec264e7a14b6",
"id": "CVE-2023-52652-76701953",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"333728943713797360081378860533030876525",
"241988090604090349005484308570963280802",
"29163685367315973070553898147808555865",
"1055176422241824902484973750595838309",
"244270790409752707708684085406368636681",
"182843844930260411261432419954126008299",
"260313597811660888811089369781025283132",
"193095951614239032989258255927094249584",
"102986057030248664251918687443669174284",
"105058717482629352099816562000843258900"
]
},
"target": {
"file": "drivers/pci/endpoint/functions/pci-epf-vntb.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a62b9f3d7bbfac874cc0c638bc1776dcf1f8ec06",
"id": "CVE-2023-52652-7e008a4b",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"333728943713797360081378860533030876525",
"241988090604090349005484308570963280802",
"29163685367315973070553898147808555865",
"1055176422241824902484973750595838309",
"244270790409752707708684085406368636681",
"182843844930260411261432419954126008299",
"260313597811660888811089369781025283132",
"193095951614239032989258255927094249584",
"102986057030248664251918687443669174284",
"105058717482629352099816562000843258900"
]
},
"target": {
"file": "drivers/pci/endpoint/functions/pci-epf-vntb.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a039690d323221eb5865f1f31db3ec264e7a14b6",
"id": "CVE-2023-52652-b0effd00",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"140337116034562459763160609185761014157",
"322462471126832787651775262629501176536",
"37090475859389277058944305401409894690",
"21886158378701063513731478989601848906",
"121817642082850231413891815934911903281",
"3637291698990143588427779296159412182",
"218110074225654056201045467062261756967",
"111312978067254206707685741662704148809"
]
},
"target": {
"file": "drivers/ntb/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6632a54ac8057cc0b0d789c6f73883e871bcd25c",
"id": "CVE-2023-52652-b1d21def",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "16643259272676758955069031539557516409",
"length": 549.0
},
"target": {
"file": "drivers/ntb/core.c",
"function": "ntb_register_device"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@913421f9f7fd8324dcc41753d0f28b52e177ef04",
"id": "CVE-2023-52652-b3f8ef3d",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "75430624067410731610387860258973609398",
"length": 640.0
},
"target": {
"file": "drivers/pci/endpoint/functions/pci-epf-vntb.c",
"function": "pci_vntb_probe"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@913421f9f7fd8324dcc41753d0f28b52e177ef04",
"id": "CVE-2023-52652-b8647e42",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"140337116034562459763160609185761014157",
"322462471126832787651775262629501176536",
"37090475859389277058944305401409894690",
"21886158378701063513731478989601848906",
"121817642082850231413891815934911903281",
"3637291698990143588427779296159412182",
"218110074225654056201045467062261756967",
"111312978067254206707685741662704148809"
]
},
"target": {
"file": "drivers/ntb/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a62b9f3d7bbfac874cc0c638bc1776dcf1f8ec06",
"id": "CVE-2023-52652-bc53d99e",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"140337116034562459763160609185761014157",
"322462471126832787651775262629501176536",
"37090475859389277058944305401409894690",
"21886158378701063513731478989601848906",
"121817642082850231413891815934911903281",
"3637291698990143588427779296159412182",
"218110074225654056201045467062261756967",
"111312978067254206707685741662704148809"
]
},
"target": {
"file": "drivers/ntb/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e8025439ef8e16029dc313d78a351ef192469b7b",
"id": "CVE-2023-52652-bfcc5c58",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "16643259272676758955069031539557516409",
"length": 549.0
},
"target": {
"file": "drivers/ntb/core.c",
"function": "ntb_register_device"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a62b9f3d7bbfac874cc0c638bc1776dcf1f8ec06",
"id": "CVE-2023-52652-c4ab4fb6",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "75430624067410731610387860258973609398",
"length": 640.0
},
"target": {
"file": "drivers/pci/endpoint/functions/pci-epf-vntb.c",
"function": "pci_vntb_probe"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@aebfdfe39b9327a3077d0df8db3beb3160c9bdd0",
"id": "CVE-2023-52652-d8351789",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "16643259272676758955069031539557516409",
"length": 549.0
},
"target": {
"file": "drivers/ntb/core.c",
"function": "ntb_register_device"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e8025439ef8e16029dc313d78a351ef192469b7b",
"id": "CVE-2023-52652-e1d33295",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"140337116034562459763160609185761014157",
"322462471126832787651775262629501176536",
"37090475859389277058944305401409894690",
"21886158378701063513731478989601848906",
"121817642082850231413891815934911903281",
"3637291698990143588427779296159412182",
"218110074225654056201045467062261756967",
"111312978067254206707685741662704148809"
]
},
"target": {
"file": "drivers/ntb/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@aebfdfe39b9327a3077d0df8db3beb3160c9bdd0",
"id": "CVE-2023-52652-ef8c53e4",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"333728943713797360081378860533030876525",
"241988090604090349005484308570963280802",
"29163685367315973070553898147808555865",
"1055176422241824902484973750595838309",
"244270790409752707708684085406368636681",
"182843844930260411261432419954126008299",
"260313597811660888811089369781025283132",
"193095951614239032989258255927094249584",
"102986057030248664251918687443669174284",
"105058717482629352099816562000843258900"
]
},
"target": {
"file": "drivers/pci/endpoint/functions/pci-epf-vntb.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@aebfdfe39b9327a3077d0df8db3beb3160c9bdd0",
"id": "CVE-2023-52652-f6be61ad",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "75430624067410731610387860258973609398",
"length": 640.0
},
"target": {
"file": "drivers/pci/endpoint/functions/pci-epf-vntb.c",
"function": "pci_vntb_probe"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a039690d323221eb5865f1f31db3ec264e7a14b6",
"id": "CVE-2023-52652-f7d05a79",
"deprecated": false,
"signature_version": "v1"
}
]