{"id":"CVE-2022-49254","state":"PUBLISHED","title":"media: ti-vpe: cal: Fix a NULL pointer dereference in cal_ctx_v4l2_init_formats()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: ti-vpe: cal: Fix a NULL pointer dereference in cal_ctx_v4l2_init_formats()\n\nIn cal_ctx_v4l2_init_formats(), devm_kzalloc() is assigned to\nctx->active_fmt and there is a dereference of it after that, which could\nlead to NULL pointer dereference on failure of devm_kzalloc().\n\nFix this bug by adding a NULL check of ctx->active_fmt.\n\nThis bug was found by a static analyzer.\n\nBuilds with 'make allyesconfig' show no new warnings, and our static\nanalyzer no longer warns about this code.","publishedAt":"2025-02-26T01:56:09.619Z","updatedAt":"2026-05-11T18:56:09.147Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"7168155002cf7aadbfaa14a28f037c880a214764","status":"affected","lessThan":"aa613ac270292e102503e9767882e39200efe608","versionType":"git"},{"version":"7168155002cf7aadbfaa14a28f037c880a214764","status":"affected","lessThan":"91e2805579ab0783eed53acc2bf9fb553e939004","versionType":"git"},{"version":"7168155002cf7aadbfaa14a28f037c880a214764","status":"affected","lessThan":"1381f1a629a090c251965edb56f849ad648414a4","versionType":"git"},{"version":"7168155002cf7aadbfaa14a28f037c880a214764","status":"affected","lessThan":"abd77889851d2ead0d0c9c4d29f1808801477b00","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/media/platform/ti-vpe/cal-video.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.12","versionType":"semver"},{"version":"5.15.33","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.16.19","status":"unaffected","lessThanOrEqual":"5.16.*","versionType":"semver"},{"version":"5.17.2","status":"unaffected","lessThanOrEqual":"5.17.*","versionType":"semver"},{"version":"5.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/ti-vpe/cal-video.c"]}],"references":["https://git.kernel.org/stable/c/aa613ac270292e102503e9767882e39200efe608","https://git.kernel.org/stable/c/91e2805579ab0783eed53acc2bf9fb553e939004","https://git.kernel.org/stable/c/1381f1a629a090c251965edb56f849ad648414a4","https://git.kernel.org/stable/c/abd77889851d2ead0d0c9c4d29f1808801477b00"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/49xxx/CVE-2022-49254.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-49254","state":"PUBLISHED","datePublished":"2025-02-26T01:56:09.619Z","dateUpdated":"2026-05-11T18:56:09.147Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-02-26T01:49:39.295Z"},"containers":{"cna":{"title":"media: ti-vpe: cal: Fix a NULL pointer dereference in cal_ctx_v4l2_init_formats()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: ti-vpe: cal: Fix a NULL pointer dereference in cal_ctx_v4l2_init_formats()\n\nIn cal_ctx_v4l2_init_formats(), devm_kzalloc() is assigned to\nctx->active_fmt and there is a dereference of it after that, which could\nlead to NULL pointer dereference on failure of devm_kzalloc().\n\nFix this bug by adding a NULL check of ctx->active_fmt.\n\nThis bug was found by a static analyzer.\n\nBuilds with 'make allyesconfig' show no new warnings, and our static\nanalyzer no longer warns about this code."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"7168155002cf7aadbfaa14a28f037c880a214764","status":"affected","lessThan":"aa613ac270292e102503e9767882e39200efe608","versionType":"git"},{"version":"7168155002cf7aadbfaa14a28f037c880a214764","status":"affected","lessThan":"91e2805579ab0783eed53acc2bf9fb553e939004","versionType":"git"},{"version":"7168155002cf7aadbfaa14a28f037c880a214764","status":"affected","lessThan":"1381f1a629a090c251965edb56f849ad648414a4","versionType":"git"},{"version":"7168155002cf7aadbfaa14a28f037c880a214764","status":"affected","lessThan":"abd77889851d2ead0d0c9c4d29f1808801477b00","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/media/platform/ti-vpe/cal-video.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.12","versionType":"semver"},{"version":"5.15.33","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.16.19","status":"unaffected","lessThanOrEqual":"5.16.*","versionType":"semver"},{"version":"5.17.2","status":"unaffected","lessThanOrEqual":"5.17.*","versionType":"semver"},{"version":"5.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/ti-vpe/cal-video.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/aa613ac270292e102503e9767882e39200efe608"},{"url":"https://git.kernel.org/stable/c/91e2805579ab0783eed53acc2bf9fb553e939004"},{"url":"https://git.kernel.org/stable/c/1381f1a629a090c251965edb56f849ad648414a4"},{"url":"https://git.kernel.org/stable/c/abd77889851d2ead0d0c9c4d29f1808801477b00"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T18:56:09.147Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.12","versionEndExcluding":"5.15.33"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.12","versionEndExcluding":"5.16.19"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.12","versionEndExcluding":"5.17.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.12","versionEndExcluding":"5.18"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}