cve-2024-53089
Vulnerability from cvelistv5
Published
2024-11-21 18:17
Modified
2024-12-19 09:38
Severity ?
EPSS score ?
Summary
In the Linux kernel, the following vulnerability has been resolved:
LoongArch: KVM: Mark hrtimer to expire in hard interrupt context
Like commit 2c0d278f3293f ("KVM: LAPIC: Mark hrtimer to expire in hard
interrupt context") and commit 9090825fa9974 ("KVM: arm/arm64: Let the
timer expire in hardirq context on RT"), On PREEMPT_RT enabled kernels
unmarked hrtimers are moved into soft interrupt expiry mode by default.
Then the timers are canceled from an preempt-notifier which is invoked
with disabled preemption which is not allowed on PREEMPT_RT.
The timer callback is short so in could be invoked in hard-IRQ context.
So let the timer expire on hard-IRQ context even on -RT.
This fix a "scheduling while atomic" bug for PREEMPT_RT enabled kernels:
BUG: scheduling while atomic: qemu-system-loo/1011/0x00000002
Modules linked in: amdgpu rfkill nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat ns
CPU: 1 UID: 0 PID: 1011 Comm: qemu-system-loo Tainted: G W 6.12.0-rc2+ #1774
Tainted: [W]=WARN
Hardware name: Loongson Loongson-3A5000-7A1000-1w-CRB/Loongson-LS3A5000-7A1000-1w-CRB, BIOS vUDK2018-LoongArch-V2.0.0-prebeta9 10/21/2022
Stack : ffffffffffffffff 0000000000000000 9000000004e3ea38 9000000116744000
90000001167475a0 0000000000000000 90000001167475a8 9000000005644830
90000000058dc000 90000000058dbff8 9000000116747420 0000000000000001
0000000000000001 6a613fc938313980 000000000790c000 90000001001c1140
00000000000003fe 0000000000000001 000000000000000d 0000000000000003
0000000000000030 00000000000003f3 000000000790c000 9000000116747830
90000000057ef000 0000000000000000 9000000005644830 0000000000000004
0000000000000000 90000000057f4b58 0000000000000001 9000000116747868
900000000451b600 9000000005644830 9000000003a13998 0000000010000020
00000000000000b0 0000000000000004 0000000000000000 0000000000071c1d
...
Call Trace:
[<9000000003a13998>] show_stack+0x38/0x180
[<9000000004e3ea34>] dump_stack_lvl+0x84/0xc0
[<9000000003a71708>] __schedule_bug+0x48/0x60
[<9000000004e45734>] __schedule+0x1114/0x1660
[<9000000004e46040>] schedule_rtlock+0x20/0x60
[<9000000004e4e330>] rtlock_slowlock_locked+0x3f0/0x10a0
[<9000000004e4f038>] rt_spin_lock+0x58/0x80
[<9000000003b02d68>] hrtimer_cancel_wait_running+0x68/0xc0
[<9000000003b02e30>] hrtimer_cancel+0x70/0x80
[<ffff80000235eb70>] kvm_restore_timer+0x50/0x1a0 [kvm]
[<ffff8000023616c8>] kvm_arch_vcpu_load+0x68/0x2a0 [kvm]
[<ffff80000234c2d4>] kvm_sched_in+0x34/0x60 [kvm]
[<9000000003a749a0>] finish_task_switch.isra.0+0x140/0x2e0
[<9000000004e44a70>] __schedule+0x450/0x1660
[<9000000004e45cb0>] schedule+0x30/0x180
[<ffff800002354c70>] kvm_vcpu_block+0x70/0x120 [kvm]
[<ffff800002354d80>] kvm_vcpu_halt+0x60/0x3e0 [kvm]
[<ffff80000235b194>] kvm_handle_gspr+0x3f4/0x4e0 [kvm]
[<ffff80000235f548>] kvm_handle_exit+0x1c8/0x260 [kvm]
References
Impacted products
{ "containers": { "cna": { "affected": [ { "defaultStatus": "unaffected", "product": "Linux", "programFiles": [ "arch/loongarch/kvm/timer.c", "arch/loongarch/kvm/vcpu.c" ], "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "vendor": "Linux", "versions": [ { "lessThan": "1e4c384a4be9ed1e069e24f388ab2ee9951b77b5", "status": "affected", "version": "fa96b57c149061f71a70bd6582d995f6424fbbf4", "versionType": "git" }, { "lessThan": "73adbd92f3223dc0c3506822b71c6b259d5d537b", "status": "affected", "version": "fa96b57c149061f71a70bd6582d995f6424fbbf4", "versionType": "git" } ] }, { "defaultStatus": "affected", "product": "Linux", "programFiles": [ "arch/loongarch/kvm/timer.c", "arch/loongarch/kvm/vcpu.c" ], "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "vendor": "Linux", "versions": [ { "status": "affected", "version": "5.19" }, { "lessThan": "5.19", "status": "unaffected", "version": "0", "versionType": "semver" }, { "lessThanOrEqual": "6.11.*", "status": "unaffected", "version": "6.11.9", "versionType": "semver" }, { "lessThanOrEqual": "*", "status": "unaffected", "version": "6.12", "versionType": "original_commit_for_fix" } ] } ], "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nLoongArch: KVM: Mark hrtimer to expire in hard interrupt context\n\nLike commit 2c0d278f3293f (\"KVM: LAPIC: Mark hrtimer to expire in hard\ninterrupt context\") and commit 9090825fa9974 (\"KVM: arm/arm64: Let the\ntimer expire in hardirq context on RT\"), On PREEMPT_RT enabled kernels\nunmarked hrtimers are moved into soft interrupt expiry mode by default.\nThen the timers are canceled from an preempt-notifier which is invoked\nwith disabled preemption which is not allowed on PREEMPT_RT.\n\nThe timer callback is short so in could be invoked in hard-IRQ context.\nSo let the timer expire on hard-IRQ context even on -RT.\n\nThis fix a \"scheduling while atomic\" bug for PREEMPT_RT enabled kernels:\n\n BUG: scheduling while atomic: qemu-system-loo/1011/0x00000002\n Modules linked in: amdgpu rfkill nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat ns\n CPU: 1 UID: 0 PID: 1011 Comm: qemu-system-loo Tainted: G W 6.12.0-rc2+ #1774\n Tainted: [W]=WARN\n Hardware name: Loongson Loongson-3A5000-7A1000-1w-CRB/Loongson-LS3A5000-7A1000-1w-CRB, BIOS vUDK2018-LoongArch-V2.0.0-prebeta9 10/21/2022\n Stack : ffffffffffffffff 0000000000000000 9000000004e3ea38 9000000116744000\n 90000001167475a0 0000000000000000 90000001167475a8 9000000005644830\n 90000000058dc000 90000000058dbff8 9000000116747420 0000000000000001\n 0000000000000001 6a613fc938313980 000000000790c000 90000001001c1140\n 00000000000003fe 0000000000000001 000000000000000d 0000000000000003\n 0000000000000030 00000000000003f3 000000000790c000 9000000116747830\n 90000000057ef000 0000000000000000 9000000005644830 0000000000000004\n 0000000000000000 90000000057f4b58 0000000000000001 9000000116747868\n 900000000451b600 9000000005644830 9000000003a13998 0000000010000020\n 00000000000000b0 0000000000000004 0000000000000000 0000000000071c1d\n ...\n Call Trace:\n [\u003c9000000003a13998\u003e] show_stack+0x38/0x180\n [\u003c9000000004e3ea34\u003e] dump_stack_lvl+0x84/0xc0\n [\u003c9000000003a71708\u003e] __schedule_bug+0x48/0x60\n [\u003c9000000004e45734\u003e] __schedule+0x1114/0x1660\n [\u003c9000000004e46040\u003e] schedule_rtlock+0x20/0x60\n [\u003c9000000004e4e330\u003e] rtlock_slowlock_locked+0x3f0/0x10a0\n [\u003c9000000004e4f038\u003e] rt_spin_lock+0x58/0x80\n [\u003c9000000003b02d68\u003e] hrtimer_cancel_wait_running+0x68/0xc0\n [\u003c9000000003b02e30\u003e] hrtimer_cancel+0x70/0x80\n [\u003cffff80000235eb70\u003e] kvm_restore_timer+0x50/0x1a0 [kvm]\n [\u003cffff8000023616c8\u003e] kvm_arch_vcpu_load+0x68/0x2a0 [kvm]\n [\u003cffff80000234c2d4\u003e] kvm_sched_in+0x34/0x60 [kvm]\n [\u003c9000000003a749a0\u003e] finish_task_switch.isra.0+0x140/0x2e0\n [\u003c9000000004e44a70\u003e] __schedule+0x450/0x1660\n [\u003c9000000004e45cb0\u003e] schedule+0x30/0x180\n [\u003cffff800002354c70\u003e] kvm_vcpu_block+0x70/0x120 [kvm]\n [\u003cffff800002354d80\u003e] kvm_vcpu_halt+0x60/0x3e0 [kvm]\n [\u003cffff80000235b194\u003e] kvm_handle_gspr+0x3f4/0x4e0 [kvm]\n [\u003cffff80000235f548\u003e] kvm_handle_exit+0x1c8/0x260 [kvm]" } ], "providerMetadata": { "dateUpdated": "2024-12-19T09:38:54.869Z", "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux" }, "references": [ { "url": "https://git.kernel.org/stable/c/1e4c384a4be9ed1e069e24f388ab2ee9951b77b5" }, { "url": "https://git.kernel.org/stable/c/73adbd92f3223dc0c3506822b71c6b259d5d537b" } ], "title": "LoongArch: KVM: Mark hrtimer to expire in hard interrupt context", "x_generator": { "engine": "bippy-5f407fcff5a0" } } }, "cveMetadata": { "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "assignerShortName": "Linux", "cveId": "CVE-2024-53089", "datePublished": "2024-11-21T18:17:06.640Z", "dateReserved": "2024-11-19T17:17:24.981Z", "dateUpdated": "2024-12-19T09:38:54.869Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1", "vulnerability-lookup:meta": { "nvd": "{\"cve\":{\"id\":\"CVE-2024-53089\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-11-21T19:15:11.817\",\"lastModified\":\"2024-12-24T14:48:13.423\",\"vulnStatus\":\"Analyzed\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nLoongArch: KVM: Mark hrtimer to expire in hard interrupt context\\n\\nLike commit 2c0d278f3293f (\\\"KVM: LAPIC: Mark hrtimer to expire in hard\\ninterrupt context\\\") and commit 9090825fa9974 (\\\"KVM: arm/arm64: Let the\\ntimer expire in hardirq context on RT\\\"), On PREEMPT_RT enabled kernels\\nunmarked hrtimers are moved into soft interrupt expiry mode by default.\\nThen the timers are canceled from an preempt-notifier which is invoked\\nwith disabled preemption which is not allowed on PREEMPT_RT.\\n\\nThe timer callback is short so in could be invoked in hard-IRQ context.\\nSo let the timer expire on hard-IRQ context even on -RT.\\n\\nThis fix a \\\"scheduling while atomic\\\" bug for PREEMPT_RT enabled kernels:\\n\\n BUG: scheduling while atomic: qemu-system-loo/1011/0x00000002\\n Modules linked in: amdgpu rfkill nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat ns\\n CPU: 1 UID: 0 PID: 1011 Comm: qemu-system-loo Tainted: G W 6.12.0-rc2+ #1774\\n Tainted: [W]=WARN\\n Hardware name: Loongson Loongson-3A5000-7A1000-1w-CRB/Loongson-LS3A5000-7A1000-1w-CRB, BIOS vUDK2018-LoongArch-V2.0.0-prebeta9 10/21/2022\\n Stack : ffffffffffffffff 0000000000000000 9000000004e3ea38 9000000116744000\\n 90000001167475a0 0000000000000000 90000001167475a8 9000000005644830\\n 90000000058dc000 90000000058dbff8 9000000116747420 0000000000000001\\n 0000000000000001 6a613fc938313980 000000000790c000 90000001001c1140\\n 00000000000003fe 0000000000000001 000000000000000d 0000000000000003\\n 0000000000000030 00000000000003f3 000000000790c000 9000000116747830\\n 90000000057ef000 0000000000000000 9000000005644830 0000000000000004\\n 0000000000000000 90000000057f4b58 0000000000000001 9000000116747868\\n 900000000451b600 9000000005644830 9000000003a13998 0000000010000020\\n 00000000000000b0 0000000000000004 0000000000000000 0000000000071c1d\\n ...\\n Call Trace:\\n [\u003c9000000003a13998\u003e] show_stack+0x38/0x180\\n [\u003c9000000004e3ea34\u003e] dump_stack_lvl+0x84/0xc0\\n [\u003c9000000003a71708\u003e] __schedule_bug+0x48/0x60\\n [\u003c9000000004e45734\u003e] __schedule+0x1114/0x1660\\n [\u003c9000000004e46040\u003e] schedule_rtlock+0x20/0x60\\n [\u003c9000000004e4e330\u003e] rtlock_slowlock_locked+0x3f0/0x10a0\\n [\u003c9000000004e4f038\u003e] rt_spin_lock+0x58/0x80\\n [\u003c9000000003b02d68\u003e] hrtimer_cancel_wait_running+0x68/0xc0\\n [\u003c9000000003b02e30\u003e] hrtimer_cancel+0x70/0x80\\n [\u003cffff80000235eb70\u003e] kvm_restore_timer+0x50/0x1a0 [kvm]\\n [\u003cffff8000023616c8\u003e] kvm_arch_vcpu_load+0x68/0x2a0 [kvm]\\n [\u003cffff80000234c2d4\u003e] kvm_sched_in+0x34/0x60 [kvm]\\n [\u003c9000000003a749a0\u003e] finish_task_switch.isra.0+0x140/0x2e0\\n [\u003c9000000004e44a70\u003e] __schedule+0x450/0x1660\\n [\u003c9000000004e45cb0\u003e] schedule+0x30/0x180\\n [\u003cffff800002354c70\u003e] kvm_vcpu_block+0x70/0x120 [kvm]\\n [\u003cffff800002354d80\u003e] kvm_vcpu_halt+0x60/0x3e0 [kvm]\\n [\u003cffff80000235b194\u003e] kvm_handle_gspr+0x3f4/0x4e0 [kvm]\\n [\u003cffff80000235f548\u003e] kvm_handle_exit+0x1c8/0x260 [kvm]\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: LoongArch: KVM: Marcar hrtimer para que caduque en un contexto de interrupci\u00f3n dura Como en el commit 2c0d278f3293f (\\\"KVM: LAPIC: Marcar hrtimer para que caduque en un contexto de interrupci\u00f3n dura\\\") y el commit 9090825fa9974 (\\\"KVM: arm/arm64: Dejar que el temporizador caduque en un contexto de hardirq en RT\\\"), en los kernels con PREEMPT_RT habilitado, los hrtimers sin marcar se mueven al modo de caducidad de interrupci\u00f3n suave de forma predeterminada. Luego, los temporizadores se cancelan desde un notificador de preempci\u00f3n que se invoca con la preempci\u00f3n deshabilitada, lo que no est\u00e1 permitido en PREEMPT_RT. La devoluci\u00f3n de llamada del temporizador es corta, por lo que podr\u00eda invocarse en un contexto de hard-IRQ. Por lo tanto, deje que el temporizador caduque en un contexto de hard-IRQ incluso en -RT. Esto corrige un error de \\\"programaci\u00f3n mientras es at\u00f3mico\\\" para los kernels con PREEMPT_RT habilitado: ERROR: programaci\u00f3n mientras es at\u00f3mico: qemu-system-loo/1011/0x00000002 M\u00f3dulos vinculados en: amdgpu rfkill nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat ns CPU: 1 UID: 0 PID: 1011 Comm: qemu-system-loo Contaminado: GW 6.12.0-rc2+ #1774 Contaminado: [W]=WARN Nombre del hardware: Loongson Loongson-3A5000-7A1000-1w-CRB/Loongson-LS3A5000-7A1000-1w-CRB, BIOS vUDK2018-LoongArch-V2.0.0-prebeta9 21/10/2022 Pila: ffffffffffffffffff 0000000000000000 9000000004e3ea38 9000000116744000 90000001167475a0 0000000000000000 90000001167475a8 9000000005644830 90000000058dc000 90000000058dbff8 9000000116747420 000000000000001 0000000000000001 6a613fc938313980 000000000790c000 90000001001c1140 00000000000003fe 0000000000000001 000000000000000d 0000000000000003 0000000000000030 00000000000003f3 000000000790c000 9000000116747830 90000000057ef000 0000000000000000 900000005644830 0000000000000004 0000000000000000 90000000057f4b58 0000000000000001 9000000116747868 900000000451b600 9000000005644830 900000003a13998 0000000010000020 00000000000000b0 0000000000000004 0000000000000000 0000000000071c1d ... Seguimiento de llamadas: [\u0026lt;9000000003a13998\u0026gt;] show_stack+0x38/0x180 [\u0026lt;9000000004e3ea34\u0026gt;] dump_stack_lvl+0x84/0xc0 [\u0026lt;9000000003a71708\u0026gt;] __schedule_bug+0x48/0x60 [\u0026lt;9000000004e45734\u0026gt;] __schedule+0x1114/0x1660 [\u0026lt;9000000004e46040\u0026gt;] schedule_rtlock+0x20/0x60 [\u0026lt;9000000004e4e330\u0026gt;] rtlock_slowlock_locked+0x3f0/0x10a0 [\u0026lt;9000000004e4f038\u0026gt;] rt_spin_lock+0x58/0x80 [\u0026lt;9000000003b02d68\u0026gt;] hrtimer_cancel_wait_running+0x68/0xc0 [\u0026lt;9000000003b02e30\u0026gt;] hrtimer_cancel+0x70/0x80 [] kvm_restore_timer+0x50/0x1a0 [kvm] [] kvm_arch_vcpu_load+0x68/0x2a0 [kvm] [] kvm_sched_in+0x34/0x60 [kvm] [\u0026lt;9000000003a749a0\u0026gt;] finalizar_conmutaci\u00f3n_de_tareas.isra.0+0x140/0x2e0 [\u0026lt;9000000004e44a70\u0026gt;] __programaci\u00f3n+0x450/0x1660 [\u0026lt;9000000004e45cb0\u0026gt;] programaci\u00f3n+0x30/0x180 [] kvm_vcpu_block+0x70/0x120 [kvm] [] kvm_vcpu_halt+0x60/0x3e0 [kvm] [] kvm_handle_gspr+0x3f4/0x4e0 [kvm] [] kvm_handle_exit+0x1c8/0x260 [kvm]\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H\",\"baseScore\":5.5,\"baseSeverity\":\"MEDIUM\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":3.6}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"NVD-CWE-noinfo\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionEndExcluding\":\"6.11.9\",\"matchCriteriaId\":\"5163F80F-8D8E-4FFD-B327-624A8CAF902D\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.12:rc1:*:*:*:*:*:*\",\"matchCriteriaId\":\"7F361E1D-580F-4A2D-A509-7615F73167A1\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.12:rc2:*:*:*:*:*:*\",\"matchCriteriaId\":\"925478D0-3E3D-4E6F-ACD5-09F28D5DF82C\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.12:rc3:*:*:*:*:*:*\",\"matchCriteriaId\":\"3C95E234-D335-4B6C-96BF-E2CEBD8654ED\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.12:rc4:*:*:*:*:*:*\",\"matchCriteriaId\":\"E0F717D8-3014-4F84-8086-0124B2111379\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/1e4c384a4be9ed1e069e24f388ab2ee9951b77b5\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/73adbd92f3223dc0c3506822b71c6b259d5d537b\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]}]}}" } }
Loading…
Loading…
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.