In the Linux kernel, the following vulnerability has been resolved:
crypto: ccree - Fix use after free in cccipherexit()
kfreesensitive(ctxp->user.key) will free the ctxp->user.key. But ctxp->user.key is still used in the next line, which will lead to a use after free.
We can call kfreesensitive() after devdbg() to avoid the uaf.
{ "vanir_signatures": [ { "signature_version": "v1", "digest": { "threshold": 0.9, "line_hashes": [ "192816333084374312359007094608579095355", "34711546963732039957272708731027156050", "276455102558962704563499797841881532377", "11666085992282760787820744815014270790", "209439711515995235339361622365279701428" ] }, "deprecated": false, "id": "CVE-2022-49258-18f6637f", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@25c358efee5153dfd240d4e0d3169d5bebe9cacd", "signature_type": "Line", "target": { "file": "drivers/crypto/ccree/cc_cipher.c" } }, { "signature_version": "v1", "digest": { "threshold": 0.9, "line_hashes": [ "192816333084374312359007094608579095355", "34711546963732039957272708731027156050", "276455102558962704563499797841881532377", "11666085992282760787820744815014270790", "209439711515995235339361622365279701428" ] }, "deprecated": false, "id": "CVE-2022-49258-34c30288", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cffb5382bd8d3cf21b874ab5b84bf7618932286b", "signature_type": "Line", "target": { "file": "drivers/crypto/ccree/cc_cipher.c" } }, { "signature_version": "v1", "digest": { "length": 862.0, "function_hash": "76520089364207465624932245757036249802" }, "deprecated": false, "id": "CVE-2022-49258-3d8ae8be", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@25c358efee5153dfd240d4e0d3169d5bebe9cacd", "signature_type": "Function", "target": { "function": "cc_cipher_exit", "file": "drivers/crypto/ccree/cc_cipher.c" } }, { "signature_version": "v1", "digest": { "length": 862.0, "function_hash": "76520089364207465624932245757036249802" }, "deprecated": false, "id": "CVE-2022-49258-5350c591", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@335bf1fc74f775a8255257aa3e33763f2257b676", "signature_type": "Function", "target": { "function": "cc_cipher_exit", "file": "drivers/crypto/ccree/cc_cipher.c" } }, { "signature_version": "v1", "digest": { "length": 862.0, "function_hash": "76520089364207465624932245757036249802" }, "deprecated": false, "id": "CVE-2022-49258-5ad41e37", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cffb5382bd8d3cf21b874ab5b84bf7618932286b", "signature_type": "Function", "target": { "function": "cc_cipher_exit", "file": "drivers/crypto/ccree/cc_cipher.c" } }, { "signature_version": "v1", "digest": { "threshold": 0.9, "line_hashes": [ "192816333084374312359007094608579095355", "34711546963732039957272708731027156050", "276455102558962704563499797841881532377", "11666085992282760787820744815014270790", "209439711515995235339361622365279701428" ] }, "deprecated": false, "id": "CVE-2022-49258-6894b746", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@335bf1fc74f775a8255257aa3e33763f2257b676", "signature_type": "Line", "target": { "file": "drivers/crypto/ccree/cc_cipher.c" } }, { "signature_version": "v1", "digest": { "threshold": 0.9, "line_hashes": [ "192816333084374312359007094608579095355", "34711546963732039957272708731027156050", "276455102558962704563499797841881532377", "11666085992282760787820744815014270790", "209439711515995235339361622365279701428" ] }, "deprecated": false, "id": "CVE-2022-49258-980c6437", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3d950c34074ed74d2713c3856ba01264523289e6", "signature_type": "Line", "target": { "file": "drivers/crypto/ccree/cc_cipher.c" } }, { "signature_version": "v1", "digest": { "length": 862.0, "function_hash": "76520089364207465624932245757036249802" }, "deprecated": false, "id": "CVE-2022-49258-c387f6a0", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3d950c34074ed74d2713c3856ba01264523289e6", "signature_type": "Function", "target": { "function": "cc_cipher_exit", "file": "drivers/crypto/ccree/cc_cipher.c" } }, { "signature_version": "v1", "digest": { "threshold": 0.9, "line_hashes": [ "192816333084374312359007094608579095355", "34711546963732039957272708731027156050", "276455102558962704563499797841881532377", "11666085992282760787820744815014270790", "209439711515995235339361622365279701428" ] }, "deprecated": false, "id": "CVE-2022-49258-e497a993", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c93017c8d5ebf55a4e453ac7c84cc84cf92ab570", "signature_type": "Line", "target": { "file": "drivers/crypto/ccree/cc_cipher.c" } }, { "signature_version": "v1", "digest": { "length": 862.0, "function_hash": "76520089364207465624932245757036249802" }, "deprecated": false, "id": "CVE-2022-49258-f4c8c821", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c93017c8d5ebf55a4e453ac7c84cc84cf92ab570", "signature_type": "Function", "target": { "function": "cc_cipher_exit", "file": "drivers/crypto/ccree/cc_cipher.c" } } ] }