{"id":"CVE-2026-139329","aliases":["CVE-2026-139329"],"related":[],"kind":"vulnerability","state":"published","title":"ALSA: jack: Protect the index scan against control removal","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nALSA: jack: Protect the index scan against control removal\n\nA control found during a jack-name index scan must remain alive until\nsnd_ctl_find_id() finishes comparing its ID and count. However,\nget_available_index() calls it without holding card->controls_rwsem.\nWith CONFIG_SND_CTL_FAST_LOOKUP enabled, the lookup loads a raw control\npointer from ctl_hash and dereferences it in elem_id_matches() without\nany lock that excludes removal.\n\nThis can happen when a jack is created while a different jack owner on\nthe same card removes an existing control with the same name and index.\nFor example, probe and unbind of different HDA codecs can reach these\npaths on a shared card if their generated jack names match.\nThe codec device locks do not serialize operations on different\ncodecs. The unbind path can free the control during the index scan:\n\n  Codec A: probe                  Codec B: unbind\n  --------------                  ---------------\n  get_available_index()\n    snd_ctl_find_id()\n      kctl = xa_load(...)\n                                  hda_codec_driver_remove()\n                                    snd_hda_codec_cleanup_for_unbind()\n                                      snd_hda_jack_tbl_clear()\n                                        snd_device_free()\n                                          __snd_device_free()\n                                            snd_jack_dev_free()\n                                              snd_ctl_remove()\n                                                snd_ctl_remove_locked()\n                                                  __snd_ctl_remove()\n                                                    snd_ctl_free_one()\n                                                      kfree(kctl)\n      elem_id_matches(kctl, ...)\n        read freed id/count -> UAF\n\nHold controls_rwsem for read across the index scan so removal cannot\nfree a control until the lookup has finished using it. Release the lock\nwhen get_available_index() returns, before the caller adds the new\ncontrol under the write lock.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nALSA: jack: Protect the index scan against control removal\n\nA control found during a jack-name index scan must remain alive until\nsnd_ctl_find_id() finishes comparing its ID and count. However,\nget_available_index() calls it without holding card->controls_rwsem.\nWith CONFIG_SND_CTL_FAST_LOOKUP enabled, the lookup loads a raw control\npointer from ctl_hash and dereferences it in elem_id_matches() without\nany lock that excludes removal.\n\nThis can happen when a jack is created while a different jack owner on\nthe same card removes an existing control with the same name and index.\nFor example, probe and unbind of different HDA codecs can reach these\npaths on a shared card if their generated jack names match.\nThe codec device locks do not serialize operations on different\ncodecs. The unbind path can free the control during the index scan:\n\n  Codec A: probe                  Codec B: unbind\n  --------------                  ---------------\n  get_available_index()\n    snd_ctl_find_id()\n      kctl = xa_load(...)\n                                  hda_codec_driver_remove()\n                                    snd_hda_codec_cleanup_for_unbind()\n                                      snd_hda_jack_tbl_clear()\n                                        snd_device_free()\n                                          __snd_device_free()\n                                            snd_jack_dev_free()\n                                              snd_ctl_remove()\n                                                snd_ctl_remove_locked()\n                                                  __snd_ctl_remove()\n                                                    snd_ctl_free_one()\n                                                      kfree(kctl)\n      elem_id_matches(kctl, ...)\n        read freed id/count -> UAF\n\nHold controls_rwsem for read across the index scan so removal cannot\nfree a control until the lookup has finished using it. Release the lock\nwhen get_available_index() returns, before the caller adds the new\ncontrol under the write lock.","source":"cvelist"}],"published":"2026-11-30T13:33:45.362Z","modified":"2026-11-30T14:18:57.540Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"38ea4c3dc306edf6f4e483e8ad9cb8d33943afde","fixed":"7d329eff434a7f55cb34fbda52d0295123783e78","status":"affected"},{"type":"git","introduced":"38ea4c3dc306edf6f4e483e8ad9cb8d33943afde","fixed":"400874c97fbf537f6a58b5bb72ef3f78e2e2db52","status":"affected"},{"type":"git","introduced":"38ea4c3dc306edf6f4e483e8ad9cb8d33943afde","fixed":"8c0f05570df41f7fe7cb8b9485647eaee8274343","status":"affected"},{"type":"git","introduced":"38ea4c3dc306edf6f4e483e8ad9cb8d33943afde","fixed":"ba8c3d5fc27ac3f86962641dd3b6600906234bab","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.12","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.12","status":"unaffected"},{"type":"semver","introduced":"6.12.119","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.65","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.6","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/7d329eff434a7f55cb34fbda52d0295123783e78","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/400874c97fbf537f6a58b5bb72ef3f78e2e2db52","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8c0f05570df41f7fe7cb8b9485647eaee8274343","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ba8c3d5fc27ac3f86962641dd3b6600906234bab","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-139329","url":"https://www.cve.org/CVERecord?id=CVE-2026-139329","licence":"CVE Terms of Use","modified":"2026-11-30T13:33:45.362Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-139329","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139329","licence":"Public domain","modified":"2026-11-30T14:18:57.540Z"}],"updatedAt":"2026-11-30T14:32:49.990Z","epss":{"score":0.00201,"percentile":0.10478,"date":"2026-12-01T12:00:22.000Z"}}