In the Linux kernel, the following vulnerability has been resolved:
mtd: rawnand: cadence: fix possible null-ptr-deref in cadencenanddt_probe()
It will cause null-ptr-deref when using 'res', if platformgetresource() returns NULL, so move using 'res' after devmioremapresource() that will check it to avoid null-ptr-deref. And use devmplatformgetandioremap_resource() to simplify code.
[ { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@069af5e27c1b0f7677ef76d8d3102e503ca4f80b", "target": { "function": "cadence_nand_dt_probe", "file": "drivers/mtd/nand/raw/cadence-nand-controller.c" }, "signature_version": "v1", "deprecated": false, "signature_type": "Function", "digest": { "function_hash": "142786640517340535029077624318549955276", "length": 1445.0 }, "id": "CVE-2022-49494-11b400c8" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@81f1ddffdc22ca5789e33b9d4712914e302090c1", "target": { "function": "cadence_nand_dt_probe", "file": "drivers/mtd/nand/raw/cadence-nand-controller.c" }, "signature_version": "v1", "deprecated": false, "signature_type": "Function", "digest": { "function_hash": "142786640517340535029077624318549955276", "length": 1445.0 }, "id": "CVE-2022-49494-1ab87646" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@81f1ddffdc22ca5789e33b9d4712914e302090c1", "target": { "file": "drivers/mtd/nand/raw/cadence-nand-controller.c" }, "signature_version": "v1", "deprecated": false, "signature_type": "Line", "digest": { "line_hashes": [ "269390356367171351878066556557259625098", "315562494251448214947174642054996044918", "231335816417077177123968638593060342107", "304220219225402584960559059722963330669", "133342046802052494434211178795059059644", "285874294398958309225633323825693355698", "333513254756247381206286297485342343889", "202704142252856435041202763192081722890" ], "threshold": 0.9 }, "id": "CVE-2022-49494-2a4c6be0" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0cfee868b89ffa945f3d535ee5c985cb40c5a0f8", "target": { "file": "drivers/mtd/nand/raw/cadence-nand-controller.c" }, "signature_version": "v1", "deprecated": false, "signature_type": "Line", "digest": { "line_hashes": [ "269390356367171351878066556557259625098", "315562494251448214947174642054996044918", "231335816417077177123968638593060342107", "304220219225402584960559059722963330669", "133342046802052494434211178795059059644", "285874294398958309225633323825693355698", "333513254756247381206286297485342343889", "202704142252856435041202763192081722890" ], "threshold": 0.9 }, "id": "CVE-2022-49494-517af488" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a28ed09dafee20da51eb26452950839633afd824", "target": { "function": "cadence_nand_dt_probe", "file": "drivers/mtd/nand/raw/cadence-nand-controller.c" }, "signature_version": "v1", "deprecated": false, "signature_type": "Function", "digest": { "function_hash": "142786640517340535029077624318549955276", "length": 1445.0 }, "id": "CVE-2022-49494-734364ba" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@13b60d3dc84b47307669edb66b633b18466014b4", "target": { "file": "drivers/mtd/nand/raw/cadence-nand-controller.c" }, "signature_version": "v1", "deprecated": false, "signature_type": "Line", "digest": { "line_hashes": [ "269390356367171351878066556557259625098", "315562494251448214947174642054996044918", "231335816417077177123968638593060342107", "304220219225402584960559059722963330669", "133342046802052494434211178795059059644", "285874294398958309225633323825693355698", "333513254756247381206286297485342343889", "202704142252856435041202763192081722890" ], "threshold": 0.9 }, "id": "CVE-2022-49494-91376f9e" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@069af5e27c1b0f7677ef76d8d3102e503ca4f80b", "target": { "file": "drivers/mtd/nand/raw/cadence-nand-controller.c" }, "signature_version": "v1", "deprecated": false, "signature_type": "Line", "digest": { "line_hashes": [ "269390356367171351878066556557259625098", "315562494251448214947174642054996044918", "231335816417077177123968638593060342107", "304220219225402584960559059722963330669", "133342046802052494434211178795059059644", "285874294398958309225633323825693355698", "333513254756247381206286297485342343889", "202704142252856435041202763192081722890" ], "threshold": 0.9 }, "id": "CVE-2022-49494-9a24eb0f" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0cfee868b89ffa945f3d535ee5c985cb40c5a0f8", "target": { "function": "cadence_nand_dt_probe", "file": "drivers/mtd/nand/raw/cadence-nand-controller.c" }, "signature_version": "v1", "deprecated": false, "signature_type": "Function", "digest": { "function_hash": "142786640517340535029077624318549955276", "length": 1445.0 }, "id": "CVE-2022-49494-aa62ea27" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@13b60d3dc84b47307669edb66b633b18466014b4", "target": { "function": "cadence_nand_dt_probe", "file": "drivers/mtd/nand/raw/cadence-nand-controller.c" }, "signature_version": "v1", "deprecated": false, "signature_type": "Function", "digest": { "function_hash": "142786640517340535029077624318549955276", "length": 1445.0 }, "id": "CVE-2022-49494-beb9b7e5" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a28ed09dafee20da51eb26452950839633afd824", "target": { "file": "drivers/mtd/nand/raw/cadence-nand-controller.c" }, "signature_version": "v1", "deprecated": false, "signature_type": "Line", "digest": { "line_hashes": [ "269390356367171351878066556557259625098", "315562494251448214947174642054996044918", "231335816417077177123968638593060342107", "304220219225402584960559059722963330669", "133342046802052494434211178795059059644", "285874294398958309225633323825693355698", "333513254756247381206286297485342343889", "202704142252856435041202763192081722890" ], "threshold": 0.9 }, "id": "CVE-2022-49494-f8ce55bf" } ]