{"id":"CVE-2026-48065","state":"PUBLISHED","title":"pam_usb: Unchecked integer multiplication before xmalloc() in conf.c allows heap-based buffer overflow on 32-bit targets","description":"pam_usb provides hardware authentication for Linux using ordinary removable media. Prior to 0.9.1, src/conf.c allocates heap memory proportional to n_devices, a count derived from libxml2 XPath evaluation of the config file, without first enforcing an upper bound. On 32-bit targets (armv7l, i686 -- both listed in the project Makefile), the multiplication n_devices * sizeof(t_pusb_device) wraps around size_t, causing xmalloc() to receive a very small size. Because xmalloc() only calls abort() on NULL return, a small-but-non-NULL allocation is accepted, and subsequent array writes overflow the heap. This vulnerability is fixed in 0.9.1.","publishedAt":"2026-05-27T19:58:36.447Z","updatedAt":"2026-05-28T13:44:27.440Z","severity":{"score":6.7,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","source":"GitHub_M"},"assigner":"GitHub_M","products":["mcdope pam_usb"],"affected":[{"vendor":"mcdope","product":"pam_usb","versions":[{"version":"< 0.9.1","status":"affected"}]}],"references":["https://github.com/mcdope/pam_usb/security/advisories/GHSA-24mw-m2vf-36vp","https://github.com/mcdope/pam_usb/issues/352","https://github.com/mcdope/pam_usb/issues/55"],"weaknesses":["CWE-122","CWE-190"],"ingestedAt":"2026-10-29T20:12:07.131Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/48xxx/CVE-2026-48065.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-48065","state":"PUBLISHED","datePublished":"2026-05-27T19:58:36.447Z","dateUpdated":"2026-05-28T13:44:27.440Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-05-20T18:25:25.707Z"},"containers":{"cna":{"title":"pam_usb: Unchecked integer multiplication before xmalloc() in conf.c allows heap-based buffer overflow on 32-bit targets","descriptions":[{"lang":"en","value":"pam_usb provides hardware authentication for Linux using ordinary removable media. Prior to 0.9.1, src/conf.c allocates heap memory proportional to n_devices, a count derived from libxml2 XPath evaluation of the config file, without first enforcing an upper bound. On 32-bit targets (armv7l, i686 -- both listed in the project Makefile), the multiplication n_devices * sizeof(t_pusb_device) wraps around size_t, causing xmalloc() to receive a very small size. Because xmalloc() only calls abort() on NULL return, a small-but-non-NULL allocation is accepted, and subsequent array writes overflow the heap. This vulnerability is fixed in 0.9.1."}],"affected":[{"vendor":"mcdope","product":"pam_usb","versions":[{"version":"< 0.9.1","status":"affected"}]}],"references":[{"url":"https://github.com/mcdope/pam_usb/security/advisories/GHSA-24mw-m2vf-36vp","name":"https://github.com/mcdope/pam_usb/security/advisories/GHSA-24mw-m2vf-36vp","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/mcdope/pam_usb/issues/352","name":"https://github.com/mcdope/pam_usb/issues/352","tags":["x_refsource_MISC"]},{"url":"https://github.com/mcdope/pam_usb/issues/55","name":"https://github.com/mcdope/pam_usb/issues/55","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"LOCAL","availabilityImpact":"HIGH","baseScore":6.7,"baseSeverity":"MEDIUM","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"HIGH","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-122","lang":"en","description":"CWE-122: Heap-based Buffer Overflow","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-190","lang":"en","description":"CWE-190: Integer Overflow or Wraparound","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-05-27T19:58:36.447Z"},"source":{"advisory":"GHSA-24mw-m2vf-36vp","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-05-28T13:39:43.190969Z","id":"CVE-2026-48065","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-05-28T13:44:27.440Z"}}]}}}