diff options
| author | Harald Freudenberger <freude@linux.ibm.com> | 2026-10-06 17:46:03 +0200 |
|---|---|---|
| committer | Heiko Carstens <hca@linux.ibm.com> | 2026-10-09 15:54:04 +0200 |
| commit | 9fd7fca66735307fd7afa3450882a55ef80f2add (patch) | |
| tree | 8c98a4d15d8e7c8fce00a2761028aff3a033fdc5 /tools/lib/python | |
| parent | 7b88e8b6d714cd1b2b6185e2963c8ec4d98542d0 (diff) | |
| download | linux-next-9fd7fca66735307fd7afa3450882a55ef80f2add.tar.gz linux-next-9fd7fca66735307fd7afa3450882a55ef80f2add.zip | |
s390/zcrypt: Fix out-of-bounds ptr advance in cca_query_crypto_facility()
The FQ reply parser code blindly advanced the walk pointer by a length
value read directly from the hardware reply payload without checking
that the advance stayed within the allocated reply buffer. A corrupt
or malicious device response could push ptr beyond the cprbmem region,
causing an out-of-bounds dereference or kernel memory exposure via the
subsequent memcpy().
Fix this by tracking the remaining reply buffer space in a variable
and validating each device-supplied length field against it before
advancing or dereferencing the pointer.
Fixes: 2004b57cde6b ("s390/zcrypt: code cleanup")
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
