{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2021-47467","id":"CVE-2021-47467","title":"kunit: fix reference count leak in kfree_at_end","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nkunit: fix reference count leak in kfree_at_end\n\nThe reference counting issue happens in the normal path of\nkfree_at_end(). When kunit_alloc_and_get_resource() is invoked, the\nfunction forgets to handle the returned resource object, whose refcount\nincreased inside, causing a refcount leak.\n\nFix this issue by calling kunit_alloc_r","descriptionLong":"In the Linux kernel, the following vulnerability has been resolved:\n\nkunit: fix reference count leak in kfree_at_end\n\nThe reference counting issue happens in the normal path of\nkfree_at_end(). When kunit_alloc_and_get_resource() is invoked, the\nfunction forgets to handle the returned resource object, whose refcount\nincreased inside, causing a refcount leak.\n\nFix this issue by calling kunit_alloc_resource() instead of\nkunit_alloc_and_get_resource().\n\nFixed the following when applying:\nShuah Khan <skhan@linuxfoundation.org>\n\nCHECK: Alignment should match open parenthesis\n+\tkunit_alloc_resource(test, NULL, kfree_res_free, GFP_KERNEL,\n \t\t\t\t     (void *)to_free);","published":"2024-05-22T06:23:26.324Z","updated":"2026-06-17T04:17:32.593Z","reserved":"2024-05-22T06:20:56.198Z","status":"Analyzed","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","rating":"medium","source":"CISA-ADP"},"metrics":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","rating":"medium","source":"CISA-ADP"},{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","rating":"medium","source":"OSV"}],"rating":"medium","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1d71307a6f94df3750f8f884545a769e227172fe","lessThan":"bbdd158b40b66a9403391a517f24ef6613573446","status":"affected","versionType":"git"},{"version":"1d71307a6f94df3750f8f884545a769e227172fe","lessThan":"f62314b1ced25c58b86e044fc951cd6a1ea234cf","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.14","status":"affected"},{"version":"0","lessThan":"5.14","status":"unaffected","versionType":"semver"},{"version":"5.14.15","lessThanOrEqual":"5.14.*","status":"unaffected","versionType":"semver"},{"version":"5.15","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":[],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/bbdd158b40b66a9403391a517f24ef6613573446","tags":["x_transferred","Patch","fix"]},{"url":"https://git.kernel.org/stable/c/f62314b1ced25c58b86e044fc951cd6a1ea234cf","tags":["x_transferred","Patch","fix"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00489,"epssPercentile":0.42873,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2021-47467","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-47467","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2021-47467","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2021-47467","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}