{"id":"CVE-2026-31699","aliases":["CVE-2026-31699"],"related":[],"kind":"vulnerability","state":"published","title":"crypto: ccp: Don't attempt to copy CSR to userspace if PSP command failed","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: ccp: Don't attempt to copy CSR to userspace if PSP command failed\n\nWhen retrieving the PEK CSR, don't attempt to copy the blob to userspace\nif the firmware command failed.  If the failure was due to an invalid\nlength, i.e. the userspace buffer+length was too small, copying the number\nof bytes _firmware_ requires will overflow the kernel-allocated buffer and\nleak data to userspace.\n\n  BUG: KASAN: slab-out-of-bounds in instrument_copy_to_user ../include/linux/instrumented.h:129 [inline]\n  BUG: KASAN: slab-out-of-bounds in _inline_copy_to_user ../include/linux/uaccess.h:205 [inline]\n  BUG: KASAN: slab-out-of-bounds in _copy_to_user+0x66/0xa0 ../lib/usercopy.c:26\n  Read of size 2084 at addr ffff898144612e20 by task syz.9.219/21405\n\n  CPU: 14 UID: 0 PID: 21405 Comm: syz.9.219 Tainted: G     U     O        7.0.0-smp-DEV #28 PREEMPTLAZY\n  Tainted: [U]=USER, [O]=OOT_MODULE\n  Hardware name: Google, Inc. Arcadia_IT_80/Arcadia_IT_80, BIOS 12.62.0-0 11/19/2025\n  Call Trace:\n   <TASK>\n   dump_stack_lvl+0xc5/0x110 ../lib/dump_stack.c:120\n   print_address_description ../mm/kasan/report.c:378 [inline]\n   print_report+0xbc/0x260 ../mm/kasan/report.c:482\n   kasan_report+0xa2/0xe0 ../mm/kasan/report.c:595\n   check_region_inline ../mm/kasan/generic.c:-1 [inline]\n   kasan_check_range+0x264/0x2c0 ../mm/kasan/generic.c:200\n   instrument_copy_to_user ../include/linux/instrumented.h:129 [inline]\n   _inline_copy_to_user ../include/linux/uaccess.h:205 [inline]\n   _copy_to_user+0x66/0xa0 ../lib/usercopy.c:26\n   copy_to_user ../include/linux/uaccess.h:236 [inline]\n   sev_ioctl_do_pek_csr+0x31f/0x590 ../drivers/crypto/ccp/sev-dev.c:1872\n   sev_ioctl+0x3a4/0x490 ../drivers/crypto/ccp/sev-dev.c:2562\n   vfs_ioctl ../fs/ioctl.c:51 [inline]\n   __do_sys_ioctl ../fs/ioctl.c:597 [inline]\n   __se_sys_ioctl+0x11d/0x1b0 ../fs/ioctl.c:583\n   do_syscall_x64 ../arch/x86/entry/syscall_64.c:63 [inline]\n   do_syscall_64+0xe0/0x800 ../arch/x86/entry/syscall_64.c:94\n   entry_SYSCALL_64_after_hwframe+0x76/0x7e\n   </TASK>\n\nWARN if the driver says the command succeeded, but the firmware error code\nsays otherwise, as __sev_do_cmd_locked() is expected to return -EIO on any\nfirwmware error.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: ccp: Don't attempt to copy CSR to userspace if PSP command failed\n\nWhen retrieving the PEK CSR, don't attempt to copy the blob to userspace\nif the firmware command failed.  If the failure was due to an invalid\nlength, i.e. the userspace buffer+length was too small, copying the number\nof bytes _firmware_ requires will overflow the kernel-allocated buffer and\nleak data to userspace.\n\n  BUG: KASAN: slab-out-of-bounds in instrument_copy_to_user ../include/linux/instrumented.h:129 [inline]\n  BUG: KASAN: slab-out-of-bounds in _inline_copy_to_user ../include/linux/uaccess.h:205 [inline]\n  BUG: KASAN: slab-out-of-bounds in _copy_to_user+0x66/0xa0 ../lib/usercopy.c:26\n  Read of size 2084 at addr ffff898144612e20 by task syz.9.219/21405\n\n  CPU: 14 UID: 0 PID: 21405 Comm: syz.9.219 Tainted: G     U     O        7.0.0-smp-DEV #28 PREEMPTLAZY\n  Tainted: [U]=USER, [O]=OOT_MODULE\n  Hardware name: Google, Inc. Arcadia_IT_80/Arcadia_IT_80, BIOS 12.62.0-0 11/19/2025\n  Call Trace:\n   <TASK>\n   dump_stack_lvl+0xc5/0x110 ../lib/dump_stack.c:120\n   print_address_description ../mm/kasan/report.c:378 [inline]\n   print_report+0xbc/0x260 ../mm/kasan/report.c:482\n   kasan_report+0xa2/0xe0 ../mm/kasan/report.c:595\n   check_region_inline ../mm/kasan/generic.c:-1 [inline]\n   kasan_check_range+0x264/0x2c0 ../mm/kasan/generic.c:200\n   instrument_copy_to_user ../include/linux/instrumented.h:129 [inline]\n   _inline_copy_to_user ../include/linux/uaccess.h:205 [inline]\n   _copy_to_user+0x66/0xa0 ../lib/usercopy.c:26\n   copy_to_user ../include/linux/uaccess.h:236 [inline]\n   sev_ioctl_do_pek_csr+0x31f/0x590 ../drivers/crypto/ccp/sev-dev.c:1872\n   sev_ioctl+0x3a4/0x490 ../drivers/crypto/ccp/sev-dev.c:2562\n   vfs_ioctl ../fs/ioctl.c:51 [inline]\n   __do_sys_ioctl ../fs/ioctl.c:597 [inline]\n   __se_sys_ioctl+0x11d/0x1b0 ../fs/ioctl.c:583\n   do_syscall_x64 ../arch/x86/entry/syscall_64.c:63 [inline]\n   do_syscall_64+0xe0/0x800 ../arch/x86/entry/syscall_64.c:94\n   entry_SYSCALL_64_after_hwframe+0x76/0x7e\n   </TASK>\n\nWARN if the driver says the command succeeded, but the firmware error code\nsays otherwise, as __sev_do_cmd_locked() is expected to return -EIO on any\nfirwmware error.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\ncrypto: ccp: No intente copiar el CSR al espacio de usuario si el comando PSP falló\n\nAl recuperar el CSR de PEK, no intente copiar el blob al espacio de usuario si el comando del firmware falló. Si el fallo se debió a una longitud no válida, es decir, el búfer+longitud del espacio de usuario era demasiado pequeño, copiar el número de bytes que el firmware requiere desbordará el búfer asignado por el kernel y filtrará datos al espacio de usuario.\n\n  ERROR: KASAN: desbordamiento de slab en instrument_copy_to_user .. / include/linux/instrumented.h:129 [inline]\n  ERROR: KASAN: desbordamiento de slab en _inline_copy_to_user .. / include/linux/uaccess.h:205 [inline]\n  ERROR: KASAN: desbordamiento de slab en _copy_to_user+0x66/0xa0 .. / lib/usercopy.c:26\n  Lectura de tamaño 2084 en la dirección ffff898144612e20 por la tarea syz.9.219/21405\n\n  CPU: 14 UID: 0 PID: 21405 Comm: syz.9.219 Tainted: G     U     O        7.0.0-smp-DEV #28 PREEMPTLAZY\n  Tainted: [U]=USER, [O]=OOT_MODULE\n  Nombre del hardware: Google, Inc. Arcadia_IT_80/Arcadia_IT_80, BIOS 12.62.0-0 11/19/2025\n  Rastro de llamada:\n   [TAREA]\n   dump_stack_lvl+0xc5/0x110 .. / lib/dump_stack.c:120\n   print_address_description .. / mm/kasan/report.c:378 [inline]\n   print_report+0xbc/0x260 .. / mm/kasan/report.c:482\n   kasan_report+0xa2/0xe0 .. / mm/kasan/report.c:595\n   check_region_inline .. / mm/kasan/generic.c:-1 [inline]\n   kasan_check_range+0x264/0x2c0 .. / mm/kasan/generic.c:200\n   instrument_copy_to_user .. / include/linux/instrumented.h:129 [inline]\n   _inline_copy_to_user .. / include/linux/uaccess.h:205 [inline]\n   _copy_to_user+0x66/0xa0 .. / lib/usercopy.c:26\n   copy_to_user .. / include/linux/uaccess.h:236 [inline]\n   sev_ioctl_do_pek_csr+0x31f/0x590 .. / drivers/crypto/ccp/sev-dev.c:1872\n   sev_ioctl+0x3a4/0x490 .. / drivers/crypto/ccp/sev-dev.c:2562\n   vfs_ioctl .. / fs/ioctl.c:51 [inline]\n   __do_sys_ioctl .. / fs/ioctl.c:597 [inline]\n   __se_sys_ioctl+0x11d/0x1b0 .. / fs/ioctl.c:583\n   do_syscall_x64 .. / arch/x86/entry/syscall_64.c:63 [inline]\n   do_syscall_64+0xe0/0x800 .. / arch/x86/entry/syscall_64.c:94\n   entry_SYSCALL_64_after_hwframe+0x76/0x7e\n   [/TAREA]\n\nADVERTENCIA si el controlador dice que el comando tuvo éxito, pero el código de error del firmware dice lo contrario, ya que se espera que __sev_do_cmd_locked() devuelva -EIO ante cualquier error del firmware.","source":"nvd"}],"published":"2026-05-01T13:55:59.520Z","modified":"2026-11-11T21:10:00.200Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","score":7.1,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","score":7.1,"rating":"HIGH"}],"cwes":["CWE-125","CWE-787"],"affected":[{"ranges":[{"type":"git","introduced":"e799035609e1526761aa2f896a974b233d04d36d","fixed":"502d10a1d9d477e6c7fc7021a2dac7018f4ab8b5","status":"affected"},{"type":"git","introduced":"e799035609e1526761aa2f896a974b233d04d36d","fixed":"0fb87e44b81385f940b482cba5b3f0bd18fb8185","status":"affected"},{"type":"git","introduced":"e799035609e1526761aa2f896a974b233d04d36d","fixed":"372116eece159adff631b1508344c8b85ebf9559","status":"affected"},{"type":"git","introduced":"e799035609e1526761aa2f896a974b233d04d36d","fixed":"607ba280f2adb5092cf5386c3935afac2ca0031a","status":"affected"},{"type":"git","introduced":"e799035609e1526761aa2f896a974b233d04d36d","fixed":"59e9ae81f8670ccc780bc75f45a355736f640ec9","status":"affected"},{"type":"git","introduced":"e799035609e1526761aa2f896a974b233d04d36d","fixed":"111dcc6d0f016076745824a787d25609d0022f4c","status":"affected"},{"type":"git","introduced":"e799035609e1526761aa2f896a974b233d04d36d","fixed":"3b4fd8f15765d9a3105b834dba8a05d025e5e16e","status":"affected"},{"type":"git","introduced":"e799035609e1526761aa2f896a974b233d04d36d","fixed":"abe4a6d6f606113251868c2c4a06ba904bb41eed","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.258","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.209","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.175","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.136","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.84","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.25","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.0.2","lastAffected":"7.0.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.1","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":"6.6.136"},{"status":"affected","introduced":"6.7","fixed":"6.12.84"},{"status":"affected","introduced":"6.13","fixed":"6.18.25"},{"status":"affected","introduced":"6.19","fixed":"7.0.2"},{"status":"affected","version":"7.1"},{"status":"affected","version":"7.1"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/502d10a1d9d477e6c7fc7021a2dac7018f4ab8b5","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0fb87e44b81385f940b482cba5b3f0bd18fb8185","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/372116eece159adff631b1508344c8b85ebf9559","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/607ba280f2adb5092cf5386c3935afac2ca0031a","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/59e9ae81f8670ccc780bc75f45a355736f640ec9","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/111dcc6d0f016076745824a787d25609d0022f4c","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3b4fd8f15765d9a3105b834dba8a05d025e5e16e","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/abe4a6d6f606113251868c2c4a06ba904bb41eed","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-784472.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-10-16T15:12:39.967Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-31699","url":"https://www.cve.org/CVERecord?id=CVE-2026-31699","licence":"CVE Terms of Use","modified":"2026-10-19T19:06:06.521Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-31699","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31699","licence":"Public domain","modified":"2026-11-11T21:10:00.200Z"}],"updatedAt":"2026-11-25T22:59:20.336Z","epss":{"score":0.00137,"percentile":0.03304,"date":"2026-12-01T12:00:22.000Z"}}