In the Linux kernel, the following vulnerability has been resolved:
KVM: SVM: Use kzalloc for sev ioctl interfaces to prevent kernel data leak
For some sev ioctl interfaces, the length parameter that is passed maybe less than or equal to SEVFWBLOBMAXSIZE, but larger than the data that PSP firmware returns. In this case, kmalloc will allocate memory that is the size of the input rather than the size of the data. Since PSP firmware doesn't fully overwrite the allocated buffer, these sev ioctl interface may return uninitialized kernel slab memory.
[
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@57a01725339f9d82b099102ba2751621b1caab93",
"target": {
"function": "__sev_dbg_decrypt_user",
"file": "arch/x86/kvm/svm/sev.c"
},
"id": "CVE-2022-49556-08364904",
"signature_type": "Function",
"digest": {
"function_hash": "325553642690391476686904381151465277053",
"length": 617.0
},
"deprecated": false,
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d22d2474e3953996f03528b84b7f52cc26a39403",
"target": {
"function": "__sev_dbg_decrypt_user",
"file": "arch/x86/kvm/svm/sev.c"
},
"id": "CVE-2022-49556-1376741a",
"signature_type": "Function",
"digest": {
"function_hash": "325553642690391476686904381151465277053",
"length": 617.0
},
"deprecated": false,
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@401bef1f95de92c3a8c6eece46e02fa88d7285ee",
"target": {
"function": "__sev_dbg_decrypt_user",
"file": "arch/x86/kvm/svm/sev.c"
},
"id": "CVE-2022-49556-1b61c8b8",
"signature_type": "Function",
"digest": {
"function_hash": "127367559039518722202854099225282968225",
"length": 646.0
},
"deprecated": false,
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d8fdb4b24097472ff6b3c0559448200d420b1418",
"target": {
"file": "arch/x86/kvm/svm/sev.c"
},
"id": "CVE-2022-49556-4758df80",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"301593091141085725522867326441497244526",
"84226526777935096499641184849992505510",
"270810830032187316424946074941740971260",
"270409947300602221003814122554023303589",
"8215244962627597590770202061770958182",
"208294351833411952062309394248392415929",
"114553288686536001904191828525196356019",
"321458554424280224484410648802889527824",
"301593091141085725522867326441497244526",
"84226526777935096499641184849992505510",
"270810830032187316424946074941740971260",
"270409947300602221003814122554023303589",
"335801199714531628277069677766535405747",
"94304711810066346105986392128917259367",
"71436295648949302713060830279302616643",
"107126571142153639763338874510521342101",
"111262797889503066855482504667650987441",
"271973218526533361465072372392028585529",
"247864165094874840627240814949472755083",
"242741217556998357215900475295071172491",
"179626619313761921687277055290185073564",
"124261348456224276103732151137783505777",
"24038551755954943558319800353685130637"
]
},
"deprecated": false,
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bbdcc644b59e01e98c68894a9fab42b9687f42b0",
"target": {
"file": "arch/x86/kvm/svm/sev.c"
},
"id": "CVE-2022-49556-63fa2629",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"301593091141085725522867326441497244526",
"84226526777935096499641184849992505510",
"270810830032187316424946074941740971260",
"270409947300602221003814122554023303589",
"8215244962627597590770202061770958182",
"208294351833411952062309394248392415929",
"114553288686536001904191828525196356019",
"321458554424280224484410648802889527824",
"301593091141085725522867326441497244526",
"84226526777935096499641184849992505510",
"270810830032187316424946074941740971260",
"270409947300602221003814122554023303589",
"335801199714531628277069677766535405747",
"94304711810066346105986392128917259367",
"71436295648949302713060830279302616643",
"107126571142153639763338874510521342101",
"111262797889503066855482504667650987441",
"271973218526533361465072372392028585529",
"247864165094874840627240814949472755083",
"242741217556998357215900475295071172491",
"179626619313761921687277055290185073564",
"124261348456224276103732151137783505777",
"24038551755954943558319800353685130637"
]
},
"deprecated": false,
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d22d2474e3953996f03528b84b7f52cc26a39403",
"target": {
"file": "arch/x86/kvm/svm/sev.c"
},
"id": "CVE-2022-49556-71489706",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"301593091141085725522867326441497244526",
"84226526777935096499641184849992505510",
"270810830032187316424946074941740971260",
"270409947300602221003814122554023303589",
"8215244962627597590770202061770958182",
"208294351833411952062309394248392415929",
"114553288686536001904191828525196356019",
"321458554424280224484410648802889527824",
"301593091141085725522867326441497244526",
"84226526777935096499641184849992505510",
"270810830032187316424946074941740971260",
"270409947300602221003814122554023303589",
"335801199714531628277069677766535405747",
"94304711810066346105986392128917259367",
"71436295648949302713060830279302616643",
"107126571142153639763338874510521342101",
"111262797889503066855482504667650987441",
"271973218526533361465072372392028585529",
"247864165094874840627240814949472755083",
"242741217556998357215900475295071172491",
"179626619313761921687277055290185073564",
"124261348456224276103732151137783505777",
"24038551755954943558319800353685130637"
]
},
"deprecated": false,
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d8fdb4b24097472ff6b3c0559448200d420b1418",
"target": {
"function": "__sev_dbg_decrypt_user",
"file": "arch/x86/kvm/svm/sev.c"
},
"id": "CVE-2022-49556-c7aeb6c8",
"signature_type": "Function",
"digest": {
"function_hash": "325553642690391476686904381151465277053",
"length": 617.0
},
"deprecated": false,
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bbdcc644b59e01e98c68894a9fab42b9687f42b0",
"target": {
"function": "__sev_dbg_decrypt_user",
"file": "arch/x86/kvm/svm/sev.c"
},
"id": "CVE-2022-49556-d917c9dc",
"signature_type": "Function",
"digest": {
"function_hash": "325553642690391476686904381151465277053",
"length": 617.0
},
"deprecated": false,
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@57a01725339f9d82b099102ba2751621b1caab93",
"target": {
"file": "arch/x86/kvm/svm/sev.c"
},
"id": "CVE-2022-49556-e8bf8b4b",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"301593091141085725522867326441497244526",
"84226526777935096499641184849992505510",
"270810830032187316424946074941740971260",
"270409947300602221003814122554023303589",
"8215244962627597590770202061770958182",
"208294351833411952062309394248392415929",
"114553288686536001904191828525196356019",
"321458554424280224484410648802889527824",
"301593091141085725522867326441497244526",
"84226526777935096499641184849992505510",
"270810830032187316424946074941740971260",
"270409947300602221003814122554023303589",
"335801199714531628277069677766535405747",
"94304711810066346105986392128917259367",
"71436295648949302713060830279302616643",
"107126571142153639763338874510521342101",
"111262797889503066855482504667650987441",
"271973218526533361465072372392028585529",
"247864165094874840627240814949472755083",
"242741217556998357215900475295071172491",
"179626619313761921687277055290185073564",
"124261348456224276103732151137783505777",
"24038551755954943558319800353685130637"
]
},
"deprecated": false,
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@401bef1f95de92c3a8c6eece46e02fa88d7285ee",
"target": {
"file": "arch/x86/kvm/svm/sev.c"
},
"id": "CVE-2022-49556-ebad7f74",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"107971916989092694560315584280626054677",
"175435853197531679921538668072338250701",
"283992836168814775200253651784155337115",
"257940386544347944319371739827218877186",
"8215244962627597590770202061770958182",
"208294351833411952062309394248392415929",
"114553288686536001904191828525196356019",
"321458554424280224484410648802889527824"
]
},
"deprecated": false,
"signature_version": "v1"
}
]