{"id":"CVE-2021-47380","state":"PUBLISHED","title":"HID: amd_sfh: Fix potential NULL pointer dereference","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nHID: amd_sfh: Fix potential NULL pointer dereference\n\ndevm_add_action_or_reset() can suddenly invoke amd_mp2_pci_remove() at\nregistration that will cause NULL pointer dereference since\ncorresponding data is not initialized yet. The patch moves\ninitialization of data before devm_add_action_or_reset().\n\nFound by Linux Driver Verification project (linuxtesting.org).\n\n[jkosina@suse.cz: rebase]","publishedAt":"2024-05-21T15:03:42.325Z","updatedAt":"2026-08-05T08:47:32.385Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"4f567b9f8141a86c7d878fadf136e5d1408e3e61","status":"affected","lessThan":"283e4bee701dfcd409dd293f19a268bb2bc8ff38","versionType":"git"},{"version":"4f567b9f8141a86c7d878fadf136e5d1408e3e61","status":"affected","lessThan":"d46ef750ed58cbeeba2d9a55c99231c30a172764","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/hid/amd-sfh-hid/amd_sfh_pcie.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.11","versionType":"semver"},{"version":"5.14.10","status":"unaffected","lessThanOrEqual":"5.14.*","versionType":"semver"},{"version":"5.15","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/hid/amd-sfh-hid/amd_sfh_pcie.c"]}],"references":["https://git.kernel.org/stable/c/283e4bee701dfcd409dd293f19a268bb2bc8ff38","https://git.kernel.org/stable/c/d46ef750ed58cbeeba2d9a55c99231c30a172764"],"weaknesses":[],"ingestedAt":"2026-10-29T19:49:19.404Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2021/47xxx/CVE-2021-47380.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2021-47380","state":"PUBLISHED","datePublished":"2024-05-21T15:03:42.325Z","dateUpdated":"2026-08-05T08:47:32.385Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-05-21T14:58:30.812Z"},"containers":{"cna":{"title":"HID: amd_sfh: Fix potential NULL pointer dereference","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nHID: amd_sfh: Fix potential NULL pointer dereference\n\ndevm_add_action_or_reset() can suddenly invoke amd_mp2_pci_remove() at\nregistration that will cause NULL pointer dereference since\ncorresponding data is not initialized yet. The patch moves\ninitialization of data before devm_add_action_or_reset().\n\nFound by Linux Driver Verification project (linuxtesting.org).\n\n[jkosina@suse.cz: rebase]"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"4f567b9f8141a86c7d878fadf136e5d1408e3e61","status":"affected","lessThan":"283e4bee701dfcd409dd293f19a268bb2bc8ff38","versionType":"git"},{"version":"4f567b9f8141a86c7d878fadf136e5d1408e3e61","status":"affected","lessThan":"d46ef750ed58cbeeba2d9a55c99231c30a172764","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/hid/amd-sfh-hid/amd_sfh_pcie.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.11","versionType":"semver"},{"version":"5.14.10","status":"unaffected","lessThanOrEqual":"5.14.*","versionType":"semver"},{"version":"5.15","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/hid/amd-sfh-hid/amd_sfh_pcie.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/283e4bee701dfcd409dd293f19a268bb2bc8ff38"},{"url":"https://git.kernel.org/stable/c/d46ef750ed58cbeeba2d9a55c99231c30a172764"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable code is in amd_mp2_pci_probe for the onboard AMD Sensor Fusion Hub PCI device and is reached only via local driver probe/bind, not via network packets or a physically attached hotplug device.\nAC:L - An attacker who can apply memory pressure can make mid-probe allocations fail after DMA buffers are already allocated, reliably driving the broken cleanup path; no race or non-attacker-controlled hardware state is required.\nPR:L - Exploitation is assessed from a local unprivileged context on a system with the amd_sfh driver present; when privilege gating of PCI reprobe is ambiguous, the higher-severity Low value is required.\nUI:N - No separate victim action such as mounting a filesystem or opening a malicious file is required once probe runs under the attacker-influenced failure conditions.\nS:U - Impact remains within the kernel's own security authority; this is a host kernel memory-safety/DoS issue, not a VM escape or other cross-boundary impact.\nC:H - On probe failure after partial client init, amd_mp2_pci_remove double-frees DMA coherent allocations whose pointers were not cleared, yielding heap corruption that can be leveraged for arbitrary read primitives.\nI:H - The same double-free heap corruption provides a write/control-flow primitive surface consistent with treating exploitable memory corruption as High integrity impact.\nA:H - Both the mp2_ops NULL dereference on failed action registration and the double-free cleanup path cause kernel oops/panic and loss of system availability."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T08:47:32.385Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"5.14.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"5.15"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2021-47380","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-05-23T17:54:13.016769Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-06-04T17:15:14.096Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/283e4bee701dfcd409dd293f19a268bb2bc8ff38","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/d46ef750ed58cbeeba2d9a55c99231c30a172764","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-04T05:32:08.652Z"}}]}}}