KVM: s390: Fix old_data leak in guest debug error path
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 27291e2165b6de70c476b7b675308113edd69a60 · < f55e4d415d95342d5753e528e05a1e8623992c3f| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
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.
From the CVE record · Linux
KVM on s390 fails to free watchpoint backup buffers when a later watchpoint in the same KVM_SET_GUEST_DEBUG request fails to import. Repeated failed requests can leak kernel memory. The input does not specify authentication or user-interaction requirements.
Operators running Linux kernels with KVM on s390 should check whether their kernel includes the fix; affected versions are not specified.