In the Linux kernel, the following vulnerability has been resolved:
gpio: amd8111: Fix PCI device reference count leak
foreachpcidev() is implemented by pcigetdevice(). The comment of pcigetdevice() says that it will increase the reference count for the returned pcidev and also decrease the reference count for the input pci_dev @from if it is not NULL.
If we break foreachpcidev() loop with pdev not NULL, we need to call pcidevput() to decrease the reference count. Add the missing pcidevput() after the 'out' label. Since pcidevput() can handle NULL input parameter, there is no problem for the 'Device not found' branch. For the normal path, add pcidevput() in amdgpio_exit().
[ { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5ee6413d3dd972930af787b2c0c7aaeb379fa521", "target": { "file": "drivers/gpio/gpio-amd8111.c" }, "digest": { "line_hashes": [ "256832859778528065074036094640189253686", "81750837403051794961323532140459875438", "328180880228305975693791049645817278486", "191470593851672364273264376911613874509", "80646918054542875790327015300495266981", "109540991815091730496970525351499608431", "182054729845075520003123140538999938955", "180349858790221278204171068064406833773", "189192814830267774566246531390944793214" ], "threshold": 0.9 }, "deprecated": false, "id": "CVE-2022-48973-019ad1af", "signature_type": "Line", "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e364ce04d8f840478b09eee57b614de7cf1e743e", "target": { "function": "amd_gpio_init", "file": "drivers/gpio/gpio-amd8111.c" }, "digest": { "function_hash": "54885877550003989136572846977125122938", "length": 1077.0 }, "deprecated": false, "id": "CVE-2022-48973-10c22d58", "signature_type": "Function", "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5ee6413d3dd972930af787b2c0c7aaeb379fa521", "target": { "function": "amd_gpio_exit", "file": "drivers/gpio/gpio-amd8111.c" }, "digest": { "function_hash": "118092964042613817509803876354958184485", "length": 85.0 }, "deprecated": false, "id": "CVE-2022-48973-1d4e2d2d", "signature_type": "Function", "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b2bc053ebbba57a06fa655db5ea796de2edce445", "target": { "function": "amd_gpio_init", "file": "drivers/gpio/gpio-amd8111.c" }, "digest": { "function_hash": "147796485549525098902898780380450713131", "length": 1062.0 }, "deprecated": false, "id": "CVE-2022-48973-27a31cec", "signature_type": "Function", "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@48bd5d3801f6b67cc144449d434abbd5043a6d37", "target": { "file": "drivers/gpio/gpio-amd8111.c" }, "digest": { "line_hashes": [ "256832859778528065074036094640189253686", "81750837403051794961323532140459875438", "328180880228305975693791049645817278486", "191470593851672364273264376911613874509", "80646918054542875790327015300495266981", "109540991815091730496970525351499608431", "182054729845075520003123140538999938955", "180349858790221278204171068064406833773", "189192814830267774566246531390944793214" ], "threshold": 0.9 }, "deprecated": false, "id": "CVE-2022-48973-37e1e3db", "signature_type": "Line", "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@71d591ef873f9ebb86cd8d053b3caee785b2de6a", "target": { "file": "drivers/gpio/gpio-amd8111.c" }, "digest": { "line_hashes": [ "256832859778528065074036094640189253686", "81750837403051794961323532140459875438", "328180880228305975693791049645817278486", "191470593851672364273264376911613874509", "80646918054542875790327015300495266981", "109540991815091730496970525351499608431", "182054729845075520003123140538999938955", "180349858790221278204171068064406833773", "189192814830267774566246531390944793214" ], "threshold": 0.9 }, "deprecated": false, "id": "CVE-2022-48973-4636594d", "signature_type": "Line", "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b2bc053ebbba57a06fa655db5ea796de2edce445", "target": { "function": "amd_gpio_exit", "file": "drivers/gpio/gpio-amd8111.c" }, "digest": { "function_hash": "118092964042613817509803876354958184485", "length": 85.0 }, "deprecated": false, "id": "CVE-2022-48973-4a9f5a9a", "signature_type": "Function", "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4271515f189bd5fe2ec86b4089dab7cb804625d2", "target": { "file": "drivers/gpio/gpio-amd8111.c" }, "digest": { "line_hashes": [ "151482954770073226519898261897319451004", "81750837403051794961323532140459875438", "328180880228305975693791049645817278486", "191470593851672364273264376911613874509", "80646918054542875790327015300495266981", "109540991815091730496970525351499608431", "182054729845075520003123140538999938955", "180349858790221278204171068064406833773", "189192814830267774566246531390944793214" ], "threshold": 0.9 }, "deprecated": false, "id": "CVE-2022-48973-599857c6", "signature_type": "Line", "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4749c5cc147c9860b96db1e71cc36d1de1bd3f59", "target": { "function": "amd_gpio_init", "file": "drivers/gpio/gpio-amd8111.c" }, "digest": { "function_hash": "147796485549525098902898780380450713131", "length": 1062.0 }, "deprecated": false, "id": "CVE-2022-48973-5d45fc61", "signature_type": "Function", "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@48bd5d3801f6b67cc144449d434abbd5043a6d37", "target": { "function": "amd_gpio_init", "file": "drivers/gpio/gpio-amd8111.c" }, "digest": { "function_hash": "147796485549525098902898780380450713131", "length": 1062.0 }, "deprecated": false, "id": "CVE-2022-48973-60411655", "signature_type": "Function", "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@45fecdb9f658d9c82960c98240bc0770ade19aca", "target": { "file": "drivers/gpio/gpio-amd8111.c" }, "digest": { "line_hashes": [ "151482954770073226519898261897319451004", "81750837403051794961323532140459875438", "328180880228305975693791049645817278486", "191470593851672364273264376911613874509", "80646918054542875790327015300495266981", "109540991815091730496970525351499608431", "182054729845075520003123140538999938955", "180349858790221278204171068064406833773", "189192814830267774566246531390944793214" ], "threshold": 0.9 }, "deprecated": false, "id": "CVE-2022-48973-652757c3", "signature_type": "Line", "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5ee6413d3dd972930af787b2c0c7aaeb379fa521", "target": { "function": "amd_gpio_init", "file": "drivers/gpio/gpio-amd8111.c" }, "digest": { "function_hash": "147796485549525098902898780380450713131", "length": 1062.0 }, "deprecated": false, "id": "CVE-2022-48973-785feefe", "signature_type": "Function", "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@71d591ef873f9ebb86cd8d053b3caee785b2de6a", "target": { "function": "amd_gpio_init", "file": "drivers/gpio/gpio-amd8111.c" }, "digest": { "function_hash": "147796485549525098902898780380450713131", "length": 1062.0 }, "deprecated": false, "id": "CVE-2022-48973-93f822ec", "signature_type": "Function", "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4749c5cc147c9860b96db1e71cc36d1de1bd3f59", "target": { "file": "drivers/gpio/gpio-amd8111.c" }, "digest": { "line_hashes": [ "256832859778528065074036094640189253686", "81750837403051794961323532140459875438", "328180880228305975693791049645817278486", "191470593851672364273264376911613874509", "80646918054542875790327015300495266981", "109540991815091730496970525351499608431", "182054729845075520003123140538999938955", "180349858790221278204171068064406833773", "189192814830267774566246531390944793214" ], "threshold": 0.9 }, "deprecated": false, "id": "CVE-2022-48973-94138f6b", "signature_type": "Line", "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@45fecdb9f658d9c82960c98240bc0770ade19aca", "target": { "function": "amd_gpio_exit", "file": "drivers/gpio/gpio-amd8111.c" }, "digest": { "function_hash": "118092964042613817509803876354958184485", "length": 85.0 }, "deprecated": false, "id": "CVE-2022-48973-a4948885", "signature_type": "Function", "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@71d591ef873f9ebb86cd8d053b3caee785b2de6a", "target": { "function": "amd_gpio_exit", "file": "drivers/gpio/gpio-amd8111.c" }, "digest": { "function_hash": "118092964042613817509803876354958184485", "length": 85.0 }, "deprecated": false, "id": "CVE-2022-48973-a5009c97", "signature_type": "Function", "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@48bd5d3801f6b67cc144449d434abbd5043a6d37", "target": { "function": "amd_gpio_exit", "file": "drivers/gpio/gpio-amd8111.c" }, "digest": { "function_hash": "118092964042613817509803876354958184485", "length": 85.0 }, "deprecated": false, "id": "CVE-2022-48973-afa7c84b", "signature_type": "Function", "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@45fecdb9f658d9c82960c98240bc0770ade19aca", "target": { "function": "amd_gpio_init", "file": "drivers/gpio/gpio-amd8111.c" }, "digest": { "function_hash": "54885877550003989136572846977125122938", "length": 1077.0 }, "deprecated": false, "id": "CVE-2022-48973-c12b5235", "signature_type": "Function", "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4271515f189bd5fe2ec86b4089dab7cb804625d2", "target": { "function": "amd_gpio_exit", "file": "drivers/gpio/gpio-amd8111.c" }, "digest": { "function_hash": "118092964042613817509803876354958184485", "length": 85.0 }, "deprecated": false, "id": "CVE-2022-48973-c1fec40f", "signature_type": "Function", "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4271515f189bd5fe2ec86b4089dab7cb804625d2", "target": { "function": "amd_gpio_init", "file": "drivers/gpio/gpio-amd8111.c" }, "digest": { "function_hash": "54885877550003989136572846977125122938", "length": 1077.0 }, "deprecated": false, "id": "CVE-2022-48973-d6dc8e3a", "signature_type": "Function", "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4749c5cc147c9860b96db1e71cc36d1de1bd3f59", "target": { "function": "amd_gpio_exit", "file": "drivers/gpio/gpio-amd8111.c" }, "digest": { "function_hash": "118092964042613817509803876354958184485", "length": 85.0 }, "deprecated": false, "id": "CVE-2022-48973-d9339e97", "signature_type": "Function", "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b2bc053ebbba57a06fa655db5ea796de2edce445", "target": { "file": "drivers/gpio/gpio-amd8111.c" }, "digest": { "line_hashes": [ "256832859778528065074036094640189253686", "81750837403051794961323532140459875438", "328180880228305975693791049645817278486", "191470593851672364273264376911613874509", "80646918054542875790327015300495266981", "109540991815091730496970525351499608431", "182054729845075520003123140538999938955", "180349858790221278204171068064406833773", "189192814830267774566246531390944793214" ], "threshold": 0.9 }, "deprecated": false, "id": "CVE-2022-48973-dd4fbdaa", "signature_type": "Line", "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e364ce04d8f840478b09eee57b614de7cf1e743e", "target": { "function": "amd_gpio_exit", "file": "drivers/gpio/gpio-amd8111.c" }, "digest": { "function_hash": "118092964042613817509803876354958184485", "length": 85.0 }, "deprecated": false, "id": "CVE-2022-48973-fcc71cf8", "signature_type": "Function", "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e364ce04d8f840478b09eee57b614de7cf1e743e", "target": { "file": "drivers/gpio/gpio-amd8111.c" }, "digest": { "line_hashes": [ "151482954770073226519898261897319451004", "81750837403051794961323532140459875438", "328180880228305975693791049645817278486", "191470593851672364273264376911613874509", "80646918054542875790327015300495266981", "109540991815091730496970525351499608431", "182054729845075520003123140538999938955", "180349858790221278204171068064406833773", "189192814830267774566246531390944793214" ], "threshold": 0.9 }, "deprecated": false, "id": "CVE-2022-48973-fe965a90", "signature_type": "Line", "signature_version": "v1" } ]