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.
[
{
"deprecated": false,
"id": "CVE-2022-49258-18f6637f",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@25c358efee5153dfd240d4e0d3169d5bebe9cacd",
"signature_version": "v1",
"target": {
"file": "drivers/crypto/ccree/cc_cipher.c"
},
"signature_type": "Line",
"digest": {
"line_hashes": [
"192816333084374312359007094608579095355",
"34711546963732039957272708731027156050",
"276455102558962704563499797841881532377",
"11666085992282760787820744815014270790",
"209439711515995235339361622365279701428"
],
"threshold": 0.9
}
},
{
"deprecated": false,
"id": "CVE-2022-49258-34c30288",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cffb5382bd8d3cf21b874ab5b84bf7618932286b",
"signature_version": "v1",
"target": {
"file": "drivers/crypto/ccree/cc_cipher.c"
},
"signature_type": "Line",
"digest": {
"line_hashes": [
"192816333084374312359007094608579095355",
"34711546963732039957272708731027156050",
"276455102558962704563499797841881532377",
"11666085992282760787820744815014270790",
"209439711515995235339361622365279701428"
],
"threshold": 0.9
}
},
{
"deprecated": false,
"id": "CVE-2022-49258-3d8ae8be",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@25c358efee5153dfd240d4e0d3169d5bebe9cacd",
"signature_version": "v1",
"target": {
"function": "cc_cipher_exit",
"file": "drivers/crypto/ccree/cc_cipher.c"
},
"signature_type": "Function",
"digest": {
"function_hash": "76520089364207465624932245757036249802",
"length": 862.0
}
},
{
"deprecated": false,
"id": "CVE-2022-49258-5350c591",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@335bf1fc74f775a8255257aa3e33763f2257b676",
"signature_version": "v1",
"target": {
"function": "cc_cipher_exit",
"file": "drivers/crypto/ccree/cc_cipher.c"
},
"signature_type": "Function",
"digest": {
"function_hash": "76520089364207465624932245757036249802",
"length": 862.0
}
},
{
"deprecated": false,
"id": "CVE-2022-49258-5ad41e37",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cffb5382bd8d3cf21b874ab5b84bf7618932286b",
"signature_version": "v1",
"target": {
"function": "cc_cipher_exit",
"file": "drivers/crypto/ccree/cc_cipher.c"
},
"signature_type": "Function",
"digest": {
"function_hash": "76520089364207465624932245757036249802",
"length": 862.0
}
},
{
"deprecated": false,
"id": "CVE-2022-49258-6894b746",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@335bf1fc74f775a8255257aa3e33763f2257b676",
"signature_version": "v1",
"target": {
"file": "drivers/crypto/ccree/cc_cipher.c"
},
"signature_type": "Line",
"digest": {
"line_hashes": [
"192816333084374312359007094608579095355",
"34711546963732039957272708731027156050",
"276455102558962704563499797841881532377",
"11666085992282760787820744815014270790",
"209439711515995235339361622365279701428"
],
"threshold": 0.9
}
},
{
"deprecated": false,
"id": "CVE-2022-49258-980c6437",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3d950c34074ed74d2713c3856ba01264523289e6",
"signature_version": "v1",
"target": {
"file": "drivers/crypto/ccree/cc_cipher.c"
},
"signature_type": "Line",
"digest": {
"line_hashes": [
"192816333084374312359007094608579095355",
"34711546963732039957272708731027156050",
"276455102558962704563499797841881532377",
"11666085992282760787820744815014270790",
"209439711515995235339361622365279701428"
],
"threshold": 0.9
}
},
{
"deprecated": false,
"id": "CVE-2022-49258-c387f6a0",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3d950c34074ed74d2713c3856ba01264523289e6",
"signature_version": "v1",
"target": {
"function": "cc_cipher_exit",
"file": "drivers/crypto/ccree/cc_cipher.c"
},
"signature_type": "Function",
"digest": {
"function_hash": "76520089364207465624932245757036249802",
"length": 862.0
}
},
{
"deprecated": false,
"id": "CVE-2022-49258-e497a993",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c93017c8d5ebf55a4e453ac7c84cc84cf92ab570",
"signature_version": "v1",
"target": {
"file": "drivers/crypto/ccree/cc_cipher.c"
},
"signature_type": "Line",
"digest": {
"line_hashes": [
"192816333084374312359007094608579095355",
"34711546963732039957272708731027156050",
"276455102558962704563499797841881532377",
"11666085992282760787820744815014270790",
"209439711515995235339361622365279701428"
],
"threshold": 0.9
}
},
{
"deprecated": false,
"id": "CVE-2022-49258-f4c8c821",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c93017c8d5ebf55a4e453ac7c84cc84cf92ab570",
"signature_version": "v1",
"target": {
"function": "cc_cipher_exit",
"file": "drivers/crypto/ccree/cc_cipher.c"
},
"signature_type": "Function",
"digest": {
"function_hash": "76520089364207465624932245757036249802",
"length": 862.0
}
}
]