{"id":"CVE-2026-31698","aliases":["CVE-2026-31698"],"related":[],"kind":"vulnerability","state":"published","title":"crypto: ccp: Don't attempt to copy PDH cert 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 PDH cert to userspace if PSP command failed\n\nWhen retrieving the PDH cert, don't attempt to copy the blobs 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 ffff8885c4ab8aa0 by task syz.0.186/21033\n\n  CPU: 51 UID: 0 PID: 21033 Comm: syz.0.186 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 34.84.12-0 11/17/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_pdh_export+0x3d3/0x7c0 ../drivers/crypto/ccp/sev-dev.c:2347\n   sev_ioctl+0x2a2/0x490 ../drivers/crypto/ccp/sev-dev.c:2568\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 PDH cert to userspace if PSP command failed\n\nWhen retrieving the PDH cert, don't attempt to copy the blobs 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 ffff8885c4ab8aa0 by task syz.0.186/21033\n\n  CPU: 51 UID: 0 PID: 21033 Comm: syz.0.186 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 34.84.12-0 11/17/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_pdh_export+0x3d3/0x7c0 ../drivers/crypto/ccp/sev-dev.c:2347\n   sev_ioctl+0x2a2/0x490 ../drivers/crypto/ccp/sev-dev.c:2568\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 certificado PDH al espacio de usuario si el comando PSP falló\n\nAl recuperar el certificado PDH, no intente copiar los blobs 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  BUG: KASAN: slab-out-of-bounds en instrument_copy_to_user .. / include/linux/instrumented.h:129 [inline]\n  BUG: KASAN: slab-out-of-bounds en _inline_copy_to_user .. / include/linux/uaccess.h:205 [inline]\n  BUG: KASAN: slab-out-of-bounds en _copy_to_user+0x66/0xa0 .. / lib/usercopy.c:26\n  Lectura de tamaño 2084 en la dirección ffff8885c4ab8aa0 por la tarea syz.0.186/21033\n\n  CPU: 51 UID: 0 PID: 21033 Comm: syz.0.186 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 34.84.12-0 11/17/2025\n  Traza de llamadas:\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_pdh_export+0x3d3/0x7c0 .. / drivers/crypto/ccp/sev-dev.c:2347\n   sev_ioctl+0x2a2/0x490 .. / drivers/crypto/ccp/sev-dev.c:2568\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:58.854Z","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":"76a2b524a4b1d6dc0f2421f9854a01d55d5e5436","fixed":"af67d35da744b6b678c7a0296d9c679658779829","status":"affected"},{"type":"git","introduced":"76a2b524a4b1d6dc0f2421f9854a01d55d5e5436","fixed":"854d7846e1d29f32f1bbeb2e869e794df12067f6","status":"affected"},{"type":"git","introduced":"76a2b524a4b1d6dc0f2421f9854a01d55d5e5436","fixed":"25d9b3446001185484209cf57951f3368462b631","status":"affected"},{"type":"git","introduced":"76a2b524a4b1d6dc0f2421f9854a01d55d5e5436","fixed":"b5c14bd4da1f376f385722fe1da993f1edab6472","status":"affected"},{"type":"git","introduced":"76a2b524a4b1d6dc0f2421f9854a01d55d5e5436","fixed":"78b97e43d0b3e674d9d49ae56937b11e2ba3fcaf","status":"affected"},{"type":"git","introduced":"76a2b524a4b1d6dc0f2421f9854a01d55d5e5436","fixed":"051e51aa55fd4cdc3e8283cf4476aeeb5f563274","status":"affected"},{"type":"git","introduced":"76a2b524a4b1d6dc0f2421f9854a01d55d5e5436","fixed":"50808c13452dae43a2c90b1bbbf9daa16501ce70","status":"affected"},{"type":"git","introduced":"76a2b524a4b1d6dc0f2421f9854a01d55d5e5436","fixed":"e76239fed3cffd6d304d8ca3ce23984fd24f57d3","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/af67d35da744b6b678c7a0296d9c679658779829","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/854d7846e1d29f32f1bbeb2e869e794df12067f6","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/25d9b3446001185484209cf57951f3368462b631","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b5c14bd4da1f376f385722fe1da993f1edab6472","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/78b97e43d0b3e674d9d49ae56937b11e2ba3fcaf","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/051e51aa55fd4cdc3e8283cf4476aeeb5f563274","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/50808c13452dae43a2c90b1bbbf9daa16501ce70","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e76239fed3cffd6d304d8ca3ce23984fd24f57d3","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:37.237Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-31698","url":"https://www.cve.org/CVERecord?id=CVE-2026-31698","licence":"CVE Terms of Use","modified":"2026-10-19T19:06:06.375Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-31698","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31698","licence":"Public domain","modified":"2026-11-11T21:10:00.200Z"}],"updatedAt":"2026-11-25T22:59:20.335Z","epss":{"score":0.00137,"percentile":0.03303,"date":"2026-12-01T12:00:22.000Z"}}