Commit 8072908
committed
irqchip/gic-v4: Don't allow a VMOVP on a dying VPE
jira LE-2177
cve CVE-2024-50192
Rebuild_History Non-Buildable kernel-5.14.0-503.19.1.el9_5
commit-author Marc Zyngier <maz@kernel.org>
commit 1442ee0
Kunkun Jiang reported that there is a small window of opportunity for
userspace to force a change of affinity for a VPE while the VPE has already
been unmapped, but the corresponding doorbell interrupt still visible in
/proc/irq/.
Plug the race by checking the value of vmapp_count, which tracks whether
the VPE is mapped ot not, and returning an error in this case.
This involves making vmapp_count common to both GICv4.1 and its v4.0
ancestor.
Fixes: 64edfaa ("irqchip/gic-v4.1: Implement the v4.1 flavour of VMAPP")
Reported-by: Kunkun Jiang <jiangkunkun@huawei.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/c182ece6-2ba0-ce4f-3404-dba7a3ab6c52@huawei.com
Link: https://lore.kernel.org/all/20241002204959.2051709-1-maz@kernel.org
(cherry picked from commit 1442ee0)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>1 parent 8b484ed commit 8072908
File tree
2 files changed
+15
-7
lines changed- drivers/irqchip
- include/linux/irqchip
2 files changed
+15
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
794 | 794 | | |
795 | 795 | | |
796 | 796 | | |
| 797 | + | |
797 | 798 | | |
798 | | - | |
799 | 799 | | |
800 | 800 | | |
801 | 801 | | |
| |||
809 | 809 | | |
810 | 810 | | |
811 | 811 | | |
| 812 | + | |
| 813 | + | |
812 | 814 | | |
813 | 815 | | |
814 | 816 | | |
815 | 817 | | |
816 | 818 | | |
817 | | - | |
818 | | - | |
819 | 819 | | |
820 | 820 | | |
821 | 821 | | |
| |||
3820 | 3820 | | |
3821 | 3821 | | |
3822 | 3822 | | |
| 3823 | + | |
| 3824 | + | |
| 3825 | + | |
| 3826 | + | |
| 3827 | + | |
| 3828 | + | |
| 3829 | + | |
3823 | 3830 | | |
3824 | 3831 | | |
3825 | 3832 | | |
| |||
4453 | 4460 | | |
4454 | 4461 | | |
4455 | 4462 | | |
4456 | | - | |
4457 | | - | |
4458 | | - | |
| 4463 | + | |
| 4464 | + | |
4459 | 4465 | | |
4460 | 4466 | | |
4461 | 4467 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | 61 | | |
63 | 62 | | |
64 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
| |||
0 commit comments