{"id":"CVE-2025-40015","state":"PUBLISHED","title":"media: stm32-csi: Fix dereference before NULL check","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: stm32-csi: Fix dereference before NULL check\n\nIn 'stm32_csi_start', 'csidev->s_subdev' is dereferenced directly while\nassigning a value to the 'src_pad'. However the same value is being\nchecked against NULL at a later point of time indicating that there\nare chances that the value can be NULL.\n\nMove the dereference after the NULL check.","publishedAt":"2025-10-20T15:29:09.728Z","updatedAt":"2026-05-11T21:40:49.933Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"e7bad98c205d17c745de9d83ebf73e53cbf99d48","status":"affected","lessThan":"1f053d82e59c785b2b939cbed12f13657f84b296","versionType":"git"},{"version":"e7bad98c205d17c745de9d83ebf73e53cbf99d48","status":"affected","lessThan":"4eeafff163e80d576c5efc1360ae310c0ceedd02","versionType":"git"},{"version":"e7bad98c205d17c745de9d83ebf73e53cbf99d48","status":"affected","lessThan":"80eaf32672871bd2623ce6ba13ffc1f018756580","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/media/platform/st/stm32/stm32-csi.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.15","versionType":"semver"},{"version":"6.16.11","status":"unaffected","lessThanOrEqual":"6.16.*","versionType":"semver"},{"version":"6.17.1","status":"unaffected","lessThanOrEqual":"6.17.*","versionType":"semver"},{"version":"6.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/media/platform/st/stm32/stm32-csi.c"]}],"references":["https://git.kernel.org/stable/c/1f053d82e59c785b2b939cbed12f13657f84b296","https://git.kernel.org/stable/c/4eeafff163e80d576c5efc1360ae310c0ceedd02","https://git.kernel.org/stable/c/80eaf32672871bd2623ce6ba13ffc1f018756580"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/40xxx/CVE-2025-40015.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-40015","state":"PUBLISHED","datePublished":"2025-10-20T15:29:09.728Z","dateUpdated":"2026-05-11T21:40:49.933Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T07:20:57.151Z"},"containers":{"cna":{"title":"media: stm32-csi: Fix dereference before NULL check","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: stm32-csi: Fix dereference before NULL check\n\nIn 'stm32_csi_start', 'csidev->s_subdev' is dereferenced directly while\nassigning a value to the 'src_pad'. However the same value is being\nchecked against NULL at a later point of time indicating that there\nare chances that the value can be NULL.\n\nMove the dereference after the NULL check."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"e7bad98c205d17c745de9d83ebf73e53cbf99d48","status":"affected","lessThan":"1f053d82e59c785b2b939cbed12f13657f84b296","versionType":"git"},{"version":"e7bad98c205d17c745de9d83ebf73e53cbf99d48","status":"affected","lessThan":"4eeafff163e80d576c5efc1360ae310c0ceedd02","versionType":"git"},{"version":"e7bad98c205d17c745de9d83ebf73e53cbf99d48","status":"affected","lessThan":"80eaf32672871bd2623ce6ba13ffc1f018756580","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/media/platform/st/stm32/stm32-csi.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.15","versionType":"semver"},{"version":"6.16.11","status":"unaffected","lessThanOrEqual":"6.16.*","versionType":"semver"},{"version":"6.17.1","status":"unaffected","lessThanOrEqual":"6.17.*","versionType":"semver"},{"version":"6.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/media/platform/st/stm32/stm32-csi.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/1f053d82e59c785b2b939cbed12f13657f84b296"},{"url":"https://git.kernel.org/stable/c/4eeafff163e80d576c5efc1360ae310c0ceedd02"},{"url":"https://git.kernel.org/stable/c/80eaf32672871bd2623ce6ba13ffc1f018756580"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T21:40:49.933Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"6.16.11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"6.17.1"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"6.18"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}