{"id":"CVE-2026-138989","aliases":["CVE-2026-138989"],"related":[],"kind":"vulnerability","state":"published","title":"media: v4l2-ctrls: do nothing if controls[0] == NULL in cluster functions","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: v4l2-ctrls: do nothing if controls[0] == NULL in cluster functions\n\nThe V4L2 control framework is designed to allow drivers to instantiate\ncontrols and clusters without checking for errors after each call,\nchecking hdl->error only once at the end.\n\nHowever, if allocating the master control (controls[0]) fails, e.g. due to\nmemory allocation failure, v4l2_ctrl_cluster() triggers a WARNING:\n\n      ncontrols == 0 || controls[0] == NULL\n      WARNING: drivers/media/v4l2-core/v4l2-ctrls-core.c:2525 at v4l2_ctrl_cluster\n\nAdditionally, v4l2_ctrl_auto_cluster() attempts to dereference\nmaster->minimum without checking if controls[0] is NULL, leading to a\nNULL pointer dereference when master control creation fails.\n\nUpdate both v4l2_ctrl_cluster() and v4l2_ctrl_auto_cluster() to silently\nreturn if controls[0] is NULL, preserving the design that control\ncreation errors are caught at the end when the driver checks hdl->error.\nAlso update function documentation in include/media/v4l2-ctrls.h.\n\n[hverkuil: simplified the v4l2_ctrl_auto_cluster code a bit]","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: v4l2-ctrls: do nothing if controls[0] == NULL in cluster functions\n\nThe V4L2 control framework is designed to allow drivers to instantiate\ncontrols and clusters without checking for errors after each call,\nchecking hdl->error only once at the end.\n\nHowever, if allocating the master control (controls[0]) fails, e.g. due to\nmemory allocation failure, v4l2_ctrl_cluster() triggers a WARNING:\n\n      ncontrols == 0 || controls[0] == NULL\n      WARNING: drivers/media/v4l2-core/v4l2-ctrls-core.c:2525 at v4l2_ctrl_cluster\n\nAdditionally, v4l2_ctrl_auto_cluster() attempts to dereference\nmaster->minimum without checking if controls[0] is NULL, leading to a\nNULL pointer dereference when master control creation fails.\n\nUpdate both v4l2_ctrl_cluster() and v4l2_ctrl_auto_cluster() to silently\nreturn if controls[0] is NULL, preserving the design that control\ncreation errors are caught at the end when the driver checks hdl->error.\nAlso update function documentation in include/media/v4l2-ctrls.h.\n\n[hverkuil: simplified the v4l2_ctrl_auto_cluster code a bit]","source":"cvelist"}],"published":"2026-11-30T13:26:50.801Z","modified":"2026-11-30T14:18:01.493Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"71c689dc2e732d4cb190aaf0edea73116b1611bd","fixed":"8db2017feb141e46a456defe7b05ec935bae3aaf","status":"affected"},{"type":"git","introduced":"71c689dc2e732d4cb190aaf0edea73116b1611bd","fixed":"827b56d45e562a80d063eff9a7be4ffb4f3257a6","status":"affected"},{"type":"git","introduced":"71c689dc2e732d4cb190aaf0edea73116b1611bd","fixed":"7aa2f6a9cc2d467166174194de8697be8b830a36","status":"affected"},{"type":"git","introduced":"71c689dc2e732d4cb190aaf0edea73116b1611bd","fixed":"802e61f3ba7ab0dd212866286ddbe062de157e65","status":"affected"},{"type":"git","introduced":"71c689dc2e732d4cb190aaf0edea73116b1611bd","fixed":"90379d750ee6146b8ccaf28d00e98f7708b074fd","status":"affected"},{"type":"git","introduced":"71c689dc2e732d4cb190aaf0edea73116b1611bd","fixed":"e6f3ebe63ce84cb5a7bccc00f5e70b2f29133fc2","status":"affected"},{"type":"git","introduced":"71c689dc2e732d4cb190aaf0edea73116b1611bd","fixed":"9ff738f93084351ed6e818d4d58679a9e9083a8d","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.14","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.14","status":"unaffected"},{"type":"semver","introduced":"5.15.226","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.193","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.163","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.117","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.63","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.4","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/8db2017feb141e46a456defe7b05ec935bae3aaf","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/827b56d45e562a80d063eff9a7be4ffb4f3257a6","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7aa2f6a9cc2d467166174194de8697be8b830a36","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/802e61f3ba7ab0dd212866286ddbe062de157e65","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/90379d750ee6146b8ccaf28d00e98f7708b074fd","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e6f3ebe63ce84cb5a7bccc00f5e70b2f29133fc2","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9ff738f93084351ed6e818d4d58679a9e9083a8d","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-138989","url":"https://www.cve.org/CVERecord?id=CVE-2026-138989","licence":"CVE Terms of Use","modified":"2026-11-30T13:26:50.801Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-138989","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138989","licence":"Public domain","modified":"2026-11-30T14:18:01.493Z"}],"updatedAt":"2026-11-30T14:32:38.114Z","epss":{"score":0.00206,"percentile":0.11336,"date":"2026-12-01T12:00:22.000Z"}}