{"id":"CVE-2020-36785","state":"PUBLISHED","title":"media: atomisp: Fix use after free in atomisp_alloc_css_stat_bufs()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: atomisp: Fix use after free in atomisp_alloc_css_stat_bufs()\n\nThe \"s3a_buf\" is freed along with all the other items on the\n\"asd->s3a_stats\" list.  It leads to a double free and a use after free.","publishedAt":"2024-02-28T08:13:06.032Z","updatedAt":"2026-08-26T11:00:34.375Z","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":"a49d25364dfb9f8a64037488a39ab1f56c5fa419","status":"affected","lessThan":"51b8dc5163d2ff2bf04019f8bf7e3bd0e75bb654","versionType":"git"},{"version":"ad85094b293e40e7a2f831b0311a389d952ebd5e","status":"affected","lessThan":"d218c7a0284f6b92a7b82d2e19706e18663b4193","versionType":"git"},{"version":"ad85094b293e40e7a2f831b0311a389d952ebd5e","status":"affected","lessThan":"801c1d505894008c888bc71d08d5cff5d87f8aba","versionType":"git"},{"version":"ad85094b293e40e7a2f831b0311a389d952ebd5e","status":"affected","lessThan":"8267ccd7b9df7ab682043507dd682fe0621cf045","versionType":"git"},{"version":"ad85094b293e40e7a2f831b0311a389d952ebd5e","status":"affected","lessThan":"ba11bbf303fafb33989e95473e409f6ab412b18d","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/staging/media/atomisp/pci/atomisp_ioctl.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.12","status":"affected"},{"version":"5.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.12","versionType":"semver"},{"version":"4.18","status":"unaffected","lessThan":"5.8","versionType":"semver"},{"version":"5.10.37","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.11.21","status":"unaffected","lessThanOrEqual":"5.11.*","versionType":"semver"},{"version":"5.12.4","status":"unaffected","lessThanOrEqual":"5.12.*","versionType":"semver"},{"version":"5.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/staging/media/atomisp/pci/atomisp_ioctl.c"]}],"references":["https://git.kernel.org/stable/c/51b8dc5163d2ff2bf04019f8bf7e3bd0e75bb654","https://git.kernel.org/stable/c/d218c7a0284f6b92a7b82d2e19706e18663b4193","https://git.kernel.org/stable/c/801c1d505894008c888bc71d08d5cff5d87f8aba","https://git.kernel.org/stable/c/8267ccd7b9df7ab682043507dd682fe0621cf045","https://git.kernel.org/stable/c/ba11bbf303fafb33989e95473e409f6ab412b18d"],"weaknesses":[],"ingestedAt":"2026-10-29T19:47:24.909Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2020/36xxx/CVE-2020-36785.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2020-36785","state":"PUBLISHED","datePublished":"2024-02-28T08:13:06.032Z","dateUpdated":"2026-08-26T11:00:34.375Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-02-26T17:07:27.435Z"},"containers":{"cna":{"title":"media: atomisp: Fix use after free in atomisp_alloc_css_stat_bufs()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: atomisp: Fix use after free in atomisp_alloc_css_stat_bufs()\n\nThe \"s3a_buf\" is freed along with all the other items on the\n\"asd->s3a_stats\" list.  It leads to a double free and a use after free."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"a49d25364dfb9f8a64037488a39ab1f56c5fa419","status":"affected","lessThan":"51b8dc5163d2ff2bf04019f8bf7e3bd0e75bb654","versionType":"git"},{"version":"ad85094b293e40e7a2f831b0311a389d952ebd5e","status":"affected","lessThan":"d218c7a0284f6b92a7b82d2e19706e18663b4193","versionType":"git"},{"version":"ad85094b293e40e7a2f831b0311a389d952ebd5e","status":"affected","lessThan":"801c1d505894008c888bc71d08d5cff5d87f8aba","versionType":"git"},{"version":"ad85094b293e40e7a2f831b0311a389d952ebd5e","status":"affected","lessThan":"8267ccd7b9df7ab682043507dd682fe0621cf045","versionType":"git"},{"version":"ad85094b293e40e7a2f831b0311a389d952ebd5e","status":"affected","lessThan":"ba11bbf303fafb33989e95473e409f6ab412b18d","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/staging/media/atomisp/pci/atomisp_ioctl.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.12","status":"affected"},{"version":"5.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.12","versionType":"semver"},{"version":"4.18","status":"unaffected","lessThan":"5.8","versionType":"semver"},{"version":"5.10.37","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.11.21","status":"unaffected","lessThanOrEqual":"5.11.*","versionType":"semver"},{"version":"5.12.4","status":"unaffected","lessThanOrEqual":"5.12.*","versionType":"semver"},{"version":"5.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/staging/media/atomisp/pci/atomisp_ioctl.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/51b8dc5163d2ff2bf04019f8bf7e3bd0e75bb654"},{"url":"https://git.kernel.org/stable/c/d218c7a0284f6b92a7b82d2e19706e18663b4193"},{"url":"https://git.kernel.org/stable/c/801c1d505894008c888bc71d08d5cff5d87f8aba"},{"url":"https://git.kernel.org/stable/c/8267ccd7b9df7ab682043507dd682fe0621cf045"},{"url":"https://git.kernel.org/stable/c/ba11bbf303fafb33989e95473e409f6ab412b18d"}],"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 - Exploitation requires opening the AtomISP V4L2 `/dev/video*` node and issuing local ioctls (VIDIOC_REQBUFS / format setup) that call atomisp_alloc_css_stat_bufs(); it is not reachable via network or adjacent-protocol packets.\nAC:L - An attacker who can open the device can enable both S3A and DIS grids through normal camera configuration and force the dis_buf kzalloc failure (e.g., memory exhaustion), reliably hitting the deterministic double-free error path.\nPR:L - atomisp_open and the VIDIOC_REQBUFS path perform no CAP_SYS_ADMIN/root checks; access only needs an unprivileged local user with video-group or camera-permission access to the device node.\nUI:N - The attacker opens the device and issues the ioctls themselves; no separate victim interaction is required.\nS:U - Impact is kernel memory corruption within the host kernel privilege boundary (local privilege escalation/DoS), not a VM, IOMMU, or other cross-authority escape.\nC:H - Double-free/use-after-free of the list-linked s3a_buf enables heap reuse and arbitrary kernel memory reads once the freed object is reclaimed.\nI:H - The UAF/double-free allows heap spraying and corruption of freed kernel objects, enabling arbitrary write or control-flow hijacking primitives.\nA:H - The double-free/UAF reliably causes kernel oops, panic, or hang even without full exploitation."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-26T11:00:34.375Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.12","versionEndExcluding":"4.18"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"5.10.37"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"5.11.21"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"5.12.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"5.13"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/d218c7a0284f6b92a7b82d2e19706e18663b4193","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/801c1d505894008c888bc71d08d5cff5d87f8aba","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/8267ccd7b9df7ab682043507dd682fe0621cf045","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/ba11bbf303fafb33989e95473e409f6ab412b18d","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-04T17:37:07.332Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2024-08-08T19:00:20.730320Z","id":"CVE-2020-36785","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-08-08T19:00:31.766Z"}}]}}}