{"id":"CVE-2026-138878","summary":"ALSA: hda/hdmi: clamp num_cvts against cvt_nids[] in hdmi_read_pin_conn","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nALSA: hda/hdmi: clamp num_cvts against cvt_nids[] in hdmi_read_pin_conn\n\nhdmi_add_cvt() stores each converter's NID into the fixed-size\nspec-\u003ecvt_nids[] array (used only by the Intel Haswell pin-connection\nfixup), but only when spec-\u003enum_cvts is still within\nARRAY_SIZE(cvt_nids); the num_cvts counter itself is incremented\nunconditionally regardless of whether the store happened. A codec\nthat reports more converters than cvt_nids[] can hold therefore ends\nup with num_cvts \u003e ARRAY_SIZE(cvt_nids).\n\nhdmi_read_pin_conn(), on the intel_hsw_fixup path, copies num_cvts\nelements from cvt_nids[] with memcpy(), so once num_cvts exceeds the\narray size this reads past cvt_nids[] and writes the resulting\ngarbage NIDs into per_pin-\u003emux_nids[].\n\nClamp the copy length to the actual size of cvt_nids[] instead of\ntrusting num_cvts, which is also used unbounded as the size of the\nseparate, dynamically-sized spec-\u003ecvts array and must not be\ntruncated at the source.","modified":"2026-11-30T15:01:16.819408372Z","published":"2026-11-30T13:25:49.876Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138878.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/0b2a74faca57f3eee030d6bbe73de9b5307550e2"},{"type":"WEB","url":"https://git.kernel.org/stable/c/38438672a7568a889a326d8251af834653bc2aae"},{"type":"WEB","url":"https://git.kernel.org/stable/c/3dade2925a2c827bc882fa786d6f18028d290503"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6cf3ab38b0d53d41f00fe594b2986849bdf994ae"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c149718773b4291ca8968487a0cb7a3926a79432"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d08e4c84102e314cfdc902749bb8c94a20fc583a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d37861288c5de3c3041ef1890e22a0fab70d0b8f"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d68390d9859cc5dc91eb26a1570ce3a86a5d88c0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138878.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138878"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"bce0d2a80e428aac3b39bf19675f1f57126f9cb6"},{"fixed":"0b2a74faca57f3eee030d6bbe73de9b5307550e2"},{"fixed":"3dade2925a2c827bc882fa786d6f18028d290503"},{"fixed":"38438672a7568a889a326d8251af834653bc2aae"},{"fixed":"d08e4c84102e314cfdc902749bb8c94a20fc583a"},{"fixed":"c149718773b4291ca8968487a0cb7a3926a79432"},{"fixed":"d37861288c5de3c3041ef1890e22a0fab70d0b8f"},{"fixed":"d68390d9859cc5dc91eb26a1570ce3a86a5d88c0"},{"fixed":"6cf3ab38b0d53d41f00fe594b2986849bdf994ae"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-138878.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.10.0"},{"fixed":"5.10.275"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.226"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.1.193"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.6.163"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.118"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.63"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.4"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-138878.json"}}],"schema_version":"1.9.2"}