In the Linux kernel, the following vulnerability has been resolved:
media: ti-vpe: cal: Fix a NULL pointer dereference in calctxv4l2initformats()
In calctxv4l2initformats(), devmkzalloc() is assigned to ctx->activefmt and there is a dereference of it after that, which could lead to NULL pointer dereference on failure of devm_kzalloc().
Fix this bug by adding a NULL check of ctx->active_fmt.
This bug was found by a static analyzer.
Builds with 'make allyesconfig' show no new warnings, and our static analyzer no longer warns about this code.
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49254.json"
}[
{
"signature_version": "v1",
"digest": {
"line_hashes": [
"261433836143785562009442742549996198041",
"204365175678467386673063171077059878974",
"175606881990670197618130277728988269584",
"44336555203488671205375130396178040270"
],
"threshold": 0.9
},
"signature_type": "Line",
"target": {
"file": "drivers/media/platform/ti-vpe/cal-video.c"
},
"deprecated": false,
"id": "CVE-2022-49254-27281e8e",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@abd77889851d2ead0d0c9c4d29f1808801477b00"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "171804286128438949003575404418954532175",
"length": 1707.0
},
"signature_type": "Function",
"target": {
"file": "drivers/media/platform/ti-vpe/cal-video.c",
"function": "cal_ctx_v4l2_init_formats"
},
"deprecated": false,
"id": "CVE-2022-49254-361e39f1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@aa613ac270292e102503e9767882e39200efe608"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "171804286128438949003575404418954532175",
"length": 1707.0
},
"signature_type": "Function",
"target": {
"file": "drivers/media/platform/ti-vpe/cal-video.c",
"function": "cal_ctx_v4l2_init_formats"
},
"deprecated": false,
"id": "CVE-2022-49254-3a7572b7",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@91e2805579ab0783eed53acc2bf9fb553e939004"
},
{
"signature_version": "v1",
"digest": {
"line_hashes": [
"261433836143785562009442742549996198041",
"204365175678467386673063171077059878974",
"175606881990670197618130277728988269584",
"44336555203488671205375130396178040270"
],
"threshold": 0.9
},
"signature_type": "Line",
"target": {
"file": "drivers/media/platform/ti-vpe/cal-video.c"
},
"deprecated": false,
"id": "CVE-2022-49254-72026145",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1381f1a629a090c251965edb56f849ad648414a4"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "171804286128438949003575404418954532175",
"length": 1707.0
},
"signature_type": "Function",
"target": {
"file": "drivers/media/platform/ti-vpe/cal-video.c",
"function": "cal_ctx_v4l2_init_formats"
},
"deprecated": false,
"id": "CVE-2022-49254-79675e04",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@abd77889851d2ead0d0c9c4d29f1808801477b00"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "171804286128438949003575404418954532175",
"length": 1707.0
},
"signature_type": "Function",
"target": {
"file": "drivers/media/platform/ti-vpe/cal-video.c",
"function": "cal_ctx_v4l2_init_formats"
},
"deprecated": false,
"id": "CVE-2022-49254-ae76cdeb",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1381f1a629a090c251965edb56f849ad648414a4"
},
{
"signature_version": "v1",
"digest": {
"line_hashes": [
"261433836143785562009442742549996198041",
"204365175678467386673063171077059878974",
"175606881990670197618130277728988269584",
"44336555203488671205375130396178040270"
],
"threshold": 0.9
},
"signature_type": "Line",
"target": {
"file": "drivers/media/platform/ti-vpe/cal-video.c"
},
"deprecated": false,
"id": "CVE-2022-49254-d76a13cc",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@aa613ac270292e102503e9767882e39200efe608"
},
{
"signature_version": "v1",
"digest": {
"line_hashes": [
"261433836143785562009442742549996198041",
"204365175678467386673063171077059878974",
"175606881990670197618130277728988269584",
"44336555203488671205375130396178040270"
],
"threshold": 0.9
},
"signature_type": "Line",
"target": {
"file": "drivers/media/platform/ti-vpe/cal-video.c"
},
"deprecated": false,
"id": "CVE-2022-49254-ed985dca",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@91e2805579ab0783eed53acc2bf9fb553e939004"
}
]