diff options
| author | Christian Borntraeger <borntraeger@linux.ibm.com> | 2026-08-05 13:04:52 +0200 |
|---|---|---|
| committer | Claudio Imbrenda <imbrenda@linux.ibm.com> | 2026-08-11 10:45:27 +0200 |
| commit | aa9c8e8baf1e765fa65b93212522c636f25d846f (patch) | |
| tree | e3223a271470ca65763fa91ec99b9c59a9acfb52 /scripts/objdiff | |
| parent | 121ea1de927c8b9bfdf53c31cad27b86d5de0293 (diff) | |
| download | linux-aa9c8e8baf1e765fa65b93212522c636f25d846f.tar.gz linux-aa9c8e8baf1e765fa65b93212522c636f25d846f.zip | |
KVM: s390: Fix old_data leak in guest debug error path
__import_wp_info() allocates a per-watchpoint old_data buffer to back up
the original guest memory contents. If a later watchpoint of the same
KVM_SET_GUEST_DEBUG request fails to import, kvm_s390_import_bp_data()
jumps to the error label, which frees the wp_info array but not the
old_data buffers of the entries that were imported successfully. Up to
MAX_BP_COUNT - 1 buffers of up to MAX_WP_SIZE bytes are leaked per failed
request, and the request can be repeated.
Create error handling for cleaning up all created old_data memory
areas.
Fixes: 27291e2165b6 ("KVM: s390: hardware support for guest debugging")
Cc: stable@vger.kernel.org
Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Message-ID: <20260805110455.7200-6-borntraeger@linux.ibm.com>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions
