{"id":"CVE-2026-31697","aliases":["CVE-2026-31697"],"related":[],"kind":"vulnerability","state":"published","title":"crypto: ccp: Don't attempt to copy ID 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 ID to userspace if PSP command failed\n\nWhen retrieving the ID for the CPU, don't attempt to copy the ID blob to\nuserspace if the firmware command failed.  If the failure was due to an\ninvalid length, i.e. the userspace buffer+length was too small, copying\nthe number of bytes _firmware_ requires will overflow the kernel-allocated\nbuffer and leak 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 64 at addr ffff8881867f5960 by task syz.0.906/24388\n\n  CPU: 130 UID: 0 PID: 24388 Comm: syz.0.906 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_get_id2+0x361/0x490 ../drivers/crypto/ccp/sev-dev.c:2222\n   sev_ioctl+0x25f/0x490 ../drivers/crypto/ccp/sev-dev.c:2575\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 ID to userspace if PSP command failed\n\nWhen retrieving the ID for the CPU, don't attempt to copy the ID blob to\nuserspace if the firmware command failed.  If the failure was due to an\ninvalid length, i.e. the userspace buffer+length was too small, copying\nthe number of bytes _firmware_ requires will overflow the kernel-allocated\nbuffer and leak 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 64 at addr ffff8881867f5960 by task syz.0.906/24388\n\n  CPU: 130 UID: 0 PID: 24388 Comm: syz.0.906 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_get_id2+0x361/0x490 ../drivers/crypto/ccp/sev-dev.c:2222\n   sev_ioctl+0x25f/0x490 ../drivers/crypto/ccp/sev-dev.c:2575\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 la ID al espacio de usuario si el comando PSP falló\n\nAl recuperar la ID para la CPU, no intente copiar el blob de ID al espacio de usuario si el comando del firmware falló. Si el fallo se debió a una longitud invá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 [en línea]\n  ERROR: KASAN: desbordamiento de slab en _inline_copy_to_user .. / include/linux/uaccess.h:205 [en línea]\n  ERROR: KASAN: desbordamiento de slab en _copy_to_user+0x66/0xa0 .. / lib/usercopy.c:26\n  Lectura de tamaño 64 en la dirección ffff8881867f5960 por la tarea syz.0.906/24388\n\n  CPU: 130 UID: 0 PID: 24388 Comm: syz.0.906 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  Traza de llamada:\n   [TAREA]\n   dump_stack_lvl+0xc5/0x110 .. / lib/dump_stack.c:120\n   print_address_description .. / mm/kasan/report.c:378 [en línea]\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 [en línea]\n   kasan_check_range+0x264/0x2c0 .. / mm/kasan/generic.c:200\n   instrument_copy_to_user .. / include/linux/instrumented.h:129 [en línea]\n   _inline_copy_to_user .. / include/linux/uaccess.h:205 [en línea]\n   _copy_to_user+0x66/0xa0 .. / lib/usercopy.c:26\n   copy_to_user .. / include/linux/uaccess.h:236 [en línea]\n   sev_ioctl_do_get_id2+0x361/0x490 .. / drivers/crypto/ccp/sev-dev.c:2222\n   sev_ioctl+0x25f/0x490 .. / drivers/crypto/ccp/sev-dev.c:2575\n   vfs_ioctl .. / fs/ioctl.c:51 [en línea]\n   __do_sys_ioctl .. / fs/ioctl.c:597 [en línea]\n   __se_sys_ioctl+0x11d/0x1b0 .. / fs/ioctl.c:583\n   do_syscall_x64 .. / arch/x86/entry/syscall_64.c:63 [en línea]\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:58.184Z","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":"d6112ea0cb344d6f5ed519991e24f69ba4b43d0e","fixed":"99bae2e3c3f9ba8f854c938ed2c811b6a63b28e4","status":"affected"},{"type":"git","introduced":"d6112ea0cb344d6f5ed519991e24f69ba4b43d0e","fixed":"a21ae9f8769e5f75433bb0a85ac3868b2100ef5b","status":"affected"},{"type":"git","introduced":"d6112ea0cb344d6f5ed519991e24f69ba4b43d0e","fixed":"0f1f2f9894893dc8a28af1b9e9dbc0abf453eb52","status":"affected"},{"type":"git","introduced":"d6112ea0cb344d6f5ed519991e24f69ba4b43d0e","fixed":"09427bcb1715fb20a80b6acd5156dbf15ab5c363","status":"affected"},{"type":"git","introduced":"d6112ea0cb344d6f5ed519991e24f69ba4b43d0e","fixed":"1fbac0429a42adec830491757a2b53956dd797ea","status":"affected"},{"type":"git","introduced":"d6112ea0cb344d6f5ed519991e24f69ba4b43d0e","fixed":"2937f17bbeefb8e7608ff1f78cffbeb3d0281e5e","status":"affected"},{"type":"git","introduced":"d6112ea0cb344d6f5ed519991e24f69ba4b43d0e","fixed":"06f06d88c05ce176c61fff8c72c372847b0dd2b5","status":"affected"},{"type":"git","introduced":"d6112ea0cb344d6f5ed519991e24f69ba4b43d0e","fixed":"4f685dbfa87c546e51d9dc6cab379d20f275e114","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.2","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.2","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":"5.2","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/99bae2e3c3f9ba8f854c938ed2c811b6a63b28e4","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a21ae9f8769e5f75433bb0a85ac3868b2100ef5b","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0f1f2f9894893dc8a28af1b9e9dbc0abf453eb52","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/09427bcb1715fb20a80b6acd5156dbf15ab5c363","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1fbac0429a42adec830491757a2b53956dd797ea","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2937f17bbeefb8e7608ff1f78cffbeb3d0281e5e","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/06f06d88c05ce176c61fff8c72c372847b0dd2b5","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4f685dbfa87c546e51d9dc6cab379d20f275e114","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:34.967Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-31697","url":"https://www.cve.org/CVERecord?id=CVE-2026-31697","licence":"CVE Terms of Use","modified":"2026-10-19T18:56:05.156Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-31697","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31697","licence":"Public domain","modified":"2026-11-11T21:10:00.200Z"}],"updatedAt":"2026-11-25T22:59:20.334Z","epss":{"score":0.00137,"percentile":0.03303,"date":"2026-12-01T12:00:22.000Z"}}