{"id":"CVE-2022-50226","aliases":["CVE-2022-50226"],"related":[],"kind":"vulnerability","state":"published","title":"crypto: ccp - Use kzalloc for sev ioctl interfaces to prevent kernel memory leak","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: ccp - Use kzalloc for sev ioctl interfaces to prevent kernel memory leak\n\nFor some sev ioctl interfaces, input may be passed that is less than or\nequal to SEV_FW_BLOB_MAX_SIZE, but larger than the data that PSP\nfirmware returns. In this case, kmalloc will allocate memory that is the\nsize of the input rather than the size of the data. Since PSP firmware\ndoesn't fully overwrite the buffer, the sev ioctl interfaces with the\nissue may return uninitialized slab memory.\n\nCurrently, all of the ioctl interfaces in the ccp driver are safe, but\nto prevent future problems, change all ioctl interfaces that allocate\nmemory with kmalloc to use kzalloc and memset the data buffer to zero\nin sev_ioctl_do_platform_status.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: ccp - Use kzalloc for sev ioctl interfaces to prevent kernel memory leak\n\nFor some sev ioctl interfaces, input may be passed that is less than or\nequal to SEV_FW_BLOB_MAX_SIZE, but larger than the data that PSP\nfirmware returns. In this case, kmalloc will allocate memory that is the\nsize of the input rather than the size of the data. Since PSP firmware\ndoesn't fully overwrite the buffer, the sev ioctl interfaces with the\nissue may return uninitialized slab memory.\n\nCurrently, all of the ioctl interfaces in the ccp driver are safe, but\nto prevent future problems, change all ioctl interfaces that allocate\nmemory with kmalloc to use kzalloc and memset the data buffer to zero\nin sev_ioctl_do_platform_status.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: crypto: ccp - Use kzalloc para interfaces sev ioctl para evitar fugas de memoria en el kernel Para algunas interfaces sev ioctl, se puede pasar una entrada menor o igual a SEV_FW_BLOB_MAX_SIZE, pero mayor que los datos que devuelve el firmware de PSP. En este caso, kmalloc asignará memoria que sea del tamaño de la entrada en lugar del tamaño de los datos. Dado que el firmware de PSP no sobrescribe completamente el búfer, las interfaces sev ioctl con el problema pueden devolver memoria slab sin inicializar. Actualmente, todas las interfaces ioctl en el controlador ccp son seguras, pero para evitar problemas futuros, cambie todas las interfaces ioctl que asignan memoria con kmalloc para usar kzalloc y memset el búfer de datos a cero en sev_ioctl_do_platform_status.","source":"nvd"}],"published":"2025-06-18T11:03:59.275Z","modified":"2026-06-17T05:23:01.160Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-401"],"affected":[{"ranges":[{"type":"git","introduced":"e799035609e1526761aa2f896a974b233d04d36d","fixed":"4c5300f6f5e18b11c02a92f136e69b98fddba15e","status":"affected"},{"type":"git","introduced":"e799035609e1526761aa2f896a974b233d04d36d","fixed":"f2a920daa780956b987c14b9f23de7c3c8915bf2","status":"affected"},{"type":"git","introduced":"e799035609e1526761aa2f896a974b233d04d36d","fixed":"caa395aa16e7c9193fd7fa6cde462dd8229d4953","status":"affected"},{"type":"git","introduced":"e799035609e1526761aa2f896a974b233d04d36d","fixed":"e11fb0a3a39bb42da35fa662c46ce7391f277436","status":"affected"},{"type":"git","introduced":"e799035609e1526761aa2f896a974b233d04d36d","fixed":"13dc15a3f5fd7f884e4bfa8c011a0ae868df12ae","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.16","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.16","status":"unaffected"},{"type":"semver","introduced":"5.10.173","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.61","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"5.18.18","lastAffected":"5.18.*","status":"unaffected"},{"type":"semver","introduced":"5.19.2","lastAffected":"5.19.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.0","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"4.16","fixed":"5.10.173"},{"status":"affected","introduced":"5.11","fixed":"5.15.61"},{"status":"affected","introduced":"5.16","fixed":"5.18.18"},{"status":"affected","introduced":"5.19","fixed":"5.19.2"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/4c5300f6f5e18b11c02a92f136e69b98fddba15e","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f2a920daa780956b987c14b9f23de7c3c8915bf2","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/caa395aa16e7c9193fd7fa6cde462dd8229d4953","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e11fb0a3a39bb42da35fa662c46ce7391f277436","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/13dc15a3f5fd7f884e4bfa8c011a0ae868df12ae","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-50226","url":"https://www.cve.org/CVERecord?id=CVE-2022-50226","licence":"CVE Terms of Use","modified":"2026-05-11T19:15:14.936Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-50226","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50226","licence":"Public domain","modified":"2026-06-17T05:23:01.160Z"}],"updatedAt":"2026-11-25T22:58:21.114Z","epss":{"score":0.00245,"percentile":0.16859,"date":"2026-12-01T12:00:22.000Z"}}