{"id":"CVE-2024-50288","state":"PUBLISHED","title":"media: vivid: fix buffer overwrite when using > 32 buffers","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: vivid: fix buffer overwrite when using > 32 buffers\n\nThe maximum number of buffers that can be requested was increased to\n64 for the video capture queue. But video capture used a must_blank\narray that was still sized for 32 (VIDEO_MAX_FRAME). This caused an\nout-of-bounds write when using buffer indices >= 32.\n\nCreate a new define MAX_VID_CAP_BUFFERS that is used to access the\nmust_blank array and set max_num_buffers for the video capture queue.\n\nThis solves a crash reported by:\n\n\thttps://bugzilla.kernel.org/show_bug.cgi?id=219258","publishedAt":"2024-11-19T01:30:32.682Z","updatedAt":"2026-08-05T11:43:06.881Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"cea70ed416b428f8214be196d62cc7ffaa11f1b8","status":"affected","lessThan":"e6bacd8f2178b22859fe6d9f755f19dfcd9d3862","versionType":"git"},{"version":"cea70ed416b428f8214be196d62cc7ffaa11f1b8","status":"affected","lessThan":"96d8569563916fe2f8fe17317e20e43f54f9ba4b","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/media/test-drivers/vivid/vivid-core.c","drivers/media/test-drivers/vivid/vivid-core.h","drivers/media/test-drivers/vivid/vivid-ctrls.c","drivers/media/test-drivers/vivid/vivid-vid-cap.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.8","versionType":"semver"},{"version":"6.11.8","status":"unaffected","lessThanOrEqual":"6.11.*","versionType":"semver"},{"version":"6.12","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/media/test-drivers/vivid/vivid-core.c","drivers/media/test-drivers/vivid/vivid-core.h","drivers/media/test-drivers/vivid/vivid-ctrls.c","drivers/media/test-drivers/vivid/vivid-vid-cap.c"]}],"references":["https://git.kernel.org/stable/c/e6bacd8f2178b22859fe6d9f755f19dfcd9d3862","https://git.kernel.org/stable/c/96d8569563916fe2f8fe17317e20e43f54f9ba4b"],"weaknesses":["CWE-787"],"ingestedAt":"2026-10-29T20:07:56.516Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/50xxx/CVE-2024-50288.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-50288","state":"PUBLISHED","datePublished":"2024-11-19T01:30:32.682Z","dateUpdated":"2026-08-05T11:43:06.881Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-10-21T19:36:19.984Z"},"containers":{"cna":{"title":"media: vivid: fix buffer overwrite when using > 32 buffers","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: vivid: fix buffer overwrite when using > 32 buffers\n\nThe maximum number of buffers that can be requested was increased to\n64 for the video capture queue. But video capture used a must_blank\narray that was still sized for 32 (VIDEO_MAX_FRAME). This caused an\nout-of-bounds write when using buffer indices >= 32.\n\nCreate a new define MAX_VID_CAP_BUFFERS that is used to access the\nmust_blank array and set max_num_buffers for the video capture queue.\n\nThis solves a crash reported by:\n\n\thttps://bugzilla.kernel.org/show_bug.cgi?id=219258"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"cea70ed416b428f8214be196d62cc7ffaa11f1b8","status":"affected","lessThan":"e6bacd8f2178b22859fe6d9f755f19dfcd9d3862","versionType":"git"},{"version":"cea70ed416b428f8214be196d62cc7ffaa11f1b8","status":"affected","lessThan":"96d8569563916fe2f8fe17317e20e43f54f9ba4b","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/media/test-drivers/vivid/vivid-core.c","drivers/media/test-drivers/vivid/vivid-core.h","drivers/media/test-drivers/vivid/vivid-ctrls.c","drivers/media/test-drivers/vivid/vivid-vid-cap.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.8","versionType":"semver"},{"version":"6.11.8","status":"unaffected","lessThanOrEqual":"6.11.*","versionType":"semver"},{"version":"6.12","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/media/test-drivers/vivid/vivid-core.c","drivers/media/test-drivers/vivid/vivid-core.h","drivers/media/test-drivers/vivid/vivid-ctrls.c","drivers/media/test-drivers/vivid/vivid-vid-cap.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/e6bacd8f2178b22859fe6d9f755f19dfcd9d3862"},{"url":"https://git.kernel.org/stable/c/96d8569563916fe2f8fe17317e20e43f54f9ba4b"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The bug is reached only through V4L2 ioctls (`VIDIOC_REQBUFS`/`VIDIOC_QBUF`/`VIDIOC_STREAMON`) on a local `/dev/videoN` character device exported by the vivid driver. There is no network-facing path to `vivid_fillbuff()`.\nAC:L - Exploitation is fully deterministic and attacker-controlled: request 64 buffers, queue a buffer whose index falls in the 36-43 range, and start streaming, and the capture kthread writes past `must_blank[32]` on the very first frame. No race must be won and no uncontrolled memory layout is involved — the corrupted offset within `struct vivid_dev` is chosen directly by the buffer index.\nPR:L - The attacker only needs to open the vivid video node, which requires no capability check whatsoever — on desktop, kiosk, CI and media-development systems the logged-in/local user gets access via the `video` group or the udev `uaccess` ACL. No CAP_SYS_ADMIN or root is needed for REQBUFS/QBUF/STREAMON.\nUI:N - The attacking process performs every step itself — open, allocate buffers, queue a high-index buffer, stream on. No victim action or cooperation is required.\nS:U - The out-of-bounds write stays within the kernel's own heap-allocated `struct vivid_dev` and its downstream effects remain inside the kernel security authority. This is a conventional in-kernel corruption, not a VM, IOMMU or sandbox boundary crossing.\nC:H - The OOB reads at `vivid-kthread-cap.c:220`/`:423` disclose adjacent struct bytes, and corrupting `fmt_cap` makes the driver interpret arbitrary kernel memory as a `vivid_fmt` descriptor, driving `data_offset`/`bit_depth`/`planes` values that cause kernel memory to be copied into the userspace-mmap'd capture buffer. That yields a kernel memory disclosure primitive.\nI:H - An unprivileged user gets an out-of-bounds write at a chosen offset that corrupts the `fmt_cap` pointer, which is then dereferenced to supply the size argument to `memset(vbuf, ..., dev->fmt_cap->data_offset[p])` and to compute plane geometry — turning a one-byte overflow into a large, uncontrolled kernel write suitable for heap grooming and control-flow hijacking.\nA:H - The reported real-world symptom is a kernel crash (bugzilla 219258): the zeroed `fmt_cap` pointer becomes non-canonical or misaligned and its dereference oopses the capture kthread, and the oversized `memset` overruns the video buffer. Any local user can trigger this repeatedly to panic the machine."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:43:06.881Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.8","versionEndExcluding":"6.11.8"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.8","versionEndExcluding":"6.12"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":5.5,"attackVector":"LOCAL","baseSeverity":"MEDIUM","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","integrityImpact":"NONE","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"NONE"}},{"other":{"type":"ssvc","content":{"id":"CVE-2024-50288","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2025-10-01T20:14:27.609582Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-787","lang":"en","type":"CWE","description":"CWE-787 Out-of-bounds Write"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-10-01T20:17:21.514Z"}}]}}}