{"id":"CVE-2026-139041","aliases":["CVE-2026-139041"],"related":[],"kind":"vulnerability","state":"published","title":"media: vicodec: make encoder CAPTURE dimensions read-only","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: vicodec: make encoder CAPTURE dimensions read-only\n\nSetting the encoder's compressed CAPTURE format to a smaller resolution\nthan the raw OUTPUT format makes the encoder write past the end of the\nCAPTURE buffer.\n\nFor a stateful encoder the CAPTURE width and height are not\nclient-settable; Documentation/userspace-api/media/v4l/dev-encoder.rst\nspecifies them as \"ignored (read-only)\" on VIDIOC_S_FMT. vicodec only\nimplements half of that: vidioc_s_fmt_vid_out() derives the CAPTURE coded\nsize and sizeimage from the OUTPUT format, but S_FMT on the CAPTURE queue\noverwrites them. The encoder then takes its geometry from the OUTPUT\nqueue alone, and v4l2_fwht_encode() gets no destination length.\n\nOverwrite the requested width and height with the OUTPUT queue's coded\ndimensions in vidioc_try_fmt_vid_cap(), making them read-only as the\ninterface requires.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: vicodec: make encoder CAPTURE dimensions read-only\n\nSetting the encoder's compressed CAPTURE format to a smaller resolution\nthan the raw OUTPUT format makes the encoder write past the end of the\nCAPTURE buffer.\n\nFor a stateful encoder the CAPTURE width and height are not\nclient-settable; Documentation/userspace-api/media/v4l/dev-encoder.rst\nspecifies them as \"ignored (read-only)\" on VIDIOC_S_FMT. vicodec only\nimplements half of that: vidioc_s_fmt_vid_out() derives the CAPTURE coded\nsize and sizeimage from the OUTPUT format, but S_FMT on the CAPTURE queue\noverwrites them. The encoder then takes its geometry from the OUTPUT\nqueue alone, and v4l2_fwht_encode() gets no destination length.\n\nOverwrite the requested width and height with the OUTPUT queue's coded\ndimensions in vidioc_try_fmt_vid_cap(), making them read-only as the\ninterface requires.","source":"cvelist"}],"published":"2026-11-30T13:27:19.257Z","modified":"2026-11-30T14:18:08.967Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"efec9c815e5da15fe671fe7b3a0ea5575067b4b5","fixed":"69ae6d7be0d67ecdedbea49a658d284cb6035495","status":"affected"},{"type":"git","introduced":"efec9c815e5da15fe671fe7b3a0ea5575067b4b5","fixed":"30fbc161c40c28f46f780f4222dbc8966d85af7c","status":"affected"},{"type":"git","introduced":"efec9c815e5da15fe671fe7b3a0ea5575067b4b5","fixed":"2373c6da34cd39ba58b3c1cf87cd32752bfa1612","status":"affected"},{"type":"git","introduced":"efec9c815e5da15fe671fe7b3a0ea5575067b4b5","fixed":"ae0ced91c40cbe86a5f5fc196f02df6d85aee77d","status":"affected"},{"type":"git","introduced":"efec9c815e5da15fe671fe7b3a0ea5575067b4b5","fixed":"3ba760923c0846e3ea2ab811d19d2ca29bf5b118","status":"affected"},{"type":"git","introduced":"efec9c815e5da15fe671fe7b3a0ea5575067b4b5","fixed":"72b9c63beb0151c917bdc538daaefb636f442b17","status":"affected"},{"type":"git","introduced":"efec9c815e5da15fe671fe7b3a0ea5575067b4b5","fixed":"f4bb5d4f446b6ae00a954003a0d9b7797a1b4197","status":"affected"},{"type":"git","introduced":"efec9c815e5da15fe671fe7b3a0ea5575067b4b5","fixed":"2532e9d2f8ccb330a9c924b1ee34c5629240d352","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.3","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.3","status":"unaffected"},{"type":"semver","introduced":"5.10.275","lastAffected":"5.10.*","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/69ae6d7be0d67ecdedbea49a658d284cb6035495","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/30fbc161c40c28f46f780f4222dbc8966d85af7c","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2373c6da34cd39ba58b3c1cf87cd32752bfa1612","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ae0ced91c40cbe86a5f5fc196f02df6d85aee77d","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3ba760923c0846e3ea2ab811d19d2ca29bf5b118","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/72b9c63beb0151c917bdc538daaefb636f442b17","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f4bb5d4f446b6ae00a954003a0d9b7797a1b4197","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2532e9d2f8ccb330a9c924b1ee34c5629240d352","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-139041","url":"https://www.cve.org/CVERecord?id=CVE-2026-139041","licence":"CVE Terms of Use","modified":"2026-11-30T13:27:19.257Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-139041","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139041","licence":"Public domain","modified":"2026-11-30T14:18:08.967Z"}],"updatedAt":"2026-11-30T14:32:45.325Z","epss":{"score":0.00388,"percentile":0.35015,"date":"2026-12-01T12:00:22.000Z"}}