media: ti-vpe: cal: Fix a NULL pointer dereference in cal_ctx_v4l2_init_formats() (Linux Linux)

CVE-2022-49254
MEDIUM 5.5

At a glance

Source
NVD
EPSS
EPSS 0.27 % · percentile 19 ()
State
PUBLISHED
Published
Updated
Assigner
Linux
NVD status
Analyzed

Description

In the Linux kernel, the following vulnerability has been resolved: media: ti-vpe: cal: Fix a NULL pointer dereference in cal_ctx_v4l2_init_formats() In cal_ctx_v4l2_init_formats(), devm_kzalloc() is assigned to ctx->active_fmt 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.

Weaknesses (CWE)

  • CWE-476 — NULL Pointer Dereference

References

Scores

VersionScoreVectorScored by
CVSS 3.1MEDIUM 5.5CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HNVD · nvd@nist.gov (Primary)

European references

CERT-FR advisories

Affected configurations (NVD CPE)

Affected products

ProductVersions
Linux · Linuxaffected 7168155002cf7aadbfaa14a28f037c880a214764 < aa613ac270292e102503e9767882e39200efe608 ; affected 7168155002cf7aadbfaa14a28f037c880a214764 < 91e2805579ab0783eed53acc2bf9fb553e939004 ; affected 7168155002cf7aadbfaa14a28f037c880a214764 < 1381f1a629a090c251965edb56f849ad648414a4 ; affected 7168155002cf7aadbfaa14a28f037c880a214764 < abd77889851d2ead0d0c9c4d29f1808801477b00
Linux · Linuxaffected 5.12 ; unaffected 0 < 5.12 ; unaffected 5.15.33 ≤ 5.15.* ; unaffected 5.16.19 ≤ 5.16.* ; unaffected 5.17.2 ≤ 5.17.* ; unaffected 5.18 ≤ *

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD