Bug 826067
| Summary: | Use-after-free on CPU hotplug | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Roman Kagan <rvkagan> | ||||
| Component: | kernel | Assignee: | Igor Mammedov <imammedo> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 6.4 | CC: | areis, juzhang, michen, shuang, shu, tburke, xfu | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | kernel-2.6.32-306.el6 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2013-02-21 06:15:05 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 833569 | ||||||
| Attachments: |
|
||||||
|
Description
Roman Kagan
2012-05-29 14:02:30 UTC
commit ac909ec308ce8d5177963c780564824d12bc3fa2
Author: Petr Vandrovec <petr>
Date: Thu Mar 8 13:33:24 2012 -0800
ACPI: Fix use-after-free in acpi_map_lsapic
When processor is being hot-added to the system, acpi_map_lsapic invokes
ACPI _MAT method to find APIC ID and flags, verifies that returned structure
is indeed ACPI's local APIC structure, and that flags contain MADT_ENABLED
bit. Then saves APIC ID, frees structure - and accesses structure when
computing arguments for acpi_register_lapic call. Which sometime leads
to acpi_register_lapic call being made with second argument zero, failing
to bring processor online with error 'Unable to map lapic to logical cpu
number'.
As lapic->lapic_flags & ACPI_MADT_ENABLED was already confirmed to be non-zero
few lines above, we can just pass unconditional ACPI_MADT_ENABLED to the
acpi_register_lapic.
Signed-off-by: Petr Vandrovec <petr>
Signed-off-by: Alok N Kataria <akataria>
Reviewed-by: Toshi Kani <toshi.kani>
Signed-off-by: Len Brown <len.brown>
This request was not resolved in time for the current release. Red Hat invites you to ask your support representative to propose this request, if still desired, for consideration in the next release of Red Hat Enterprise Linux. This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development. This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4. This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux release for currently deployed products. This request is not yet committed for inclusion in a release. Can reproduce with qemu-kvm-302&2.6.32-294.el6 boot guest #/usr/libexec/qemu-kvm -cpu 1,maxcpus=160 #hot add vcpu repeatly. Created attachment 609475 [details]
[RHEL 6.4 PATCH] ACPI: Fix use-after-free in acpi_map_lsapic
Patch(es) available on kernel-2.6.32-306.el6 Verified on 2.6.32-351.el6.x86_64: 1. boot guest with -smp 2,maxcpus=4 2. in guest, following cmd failed taskset 0x00000004 echo 123 3. in qemu monitor (qemu) info cpus * CPU #0: pc=0xffffffff8103b90b (halted) thread_id=2346 CPU #1: pc=0xffffffff8103b90b (halted) thread_id=2347 (qemu) cpu_set 2 online 4. in guest, cat /proc/cpuinfo shows 3 cpu, no kernel log contains "Unable to map lapic to logical cpu number" 5. in guest, following cmd succeed. taskset 0x00000004 echo 123 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2013-0496.html |