summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorHarald Freudenberger <freude@linux.ibm.com>2026-10-06 17:46:02 +0200
committerHeiko Carstens <hca@linux.ibm.com>2026-10-09 15:54:04 +0200
commit7b88e8b6d714cd1b2b6185e2963c8ec4d98542d0 (patch)
tree49836df24a4faff190e183d997e939a0781acd83 /tools/lib/python
parent87c3772e1adcbfa220635b7db8086cbc2067f09d (diff)
downloadlinux-next-7b88e8b6d714cd1b2b6185e2963c8ec4d98542d0.tar.gz
linux-next-7b88e8b6d714cd1b2b6185e2963c8ec4d98542d0.zip
s390/zcrypt: Guard domain index uses against speculative bypass
The previous array_index_nospec() placement only covered the admin permission check, leaving ap_test_config_usage_domain() and ap_test_config_ctrl_domain() in the CCA path exposed to speculative execution. Move the sanitization to before all permission and config checks in both the CCA and EP11 paths. Hold the sanitized domain value in another variable so that the later use can choose to use either the original value (subject to speculative execution) or the sanitized value (which may in case of AUTOSEL_DOM reflect the wrong value). Before that, check the domain value to be either AUTOSEL_DOM or in range 0...AP_DOMAINS-1 and return with -EINVAL in case this check does not pass. Fixes: e935cd525af4 ("s390/zcrypt: Close speculative mem read possibility") Signed-off-by: Harald Freudenberger <freude@linux.ibm.com> Cc: stable@vger.kernel.org Reviewed-by: Holger Dengler <dengler@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions