Commit 59f2394
committed
vfio/pci: Lock external INTx masking ops
jira LE-1907
cve CVE-2024-26810
Rebuild_History Non-Buildable kernel-5.14.0-427.33.1.el9_4
commit-author Alex Williamson <alex.williamson@redhat.com>
commit 810cd4b
Mask operations through config space changes to DisINTx may race INTx
configuration changes via ioctl. Create wrappers that add locking for
paths outside of the core interrupt code.
In particular, irq_type is updated holding igate, therefore testing
is_intx() requires holding igate. For example clearing DisINTx from
config space can otherwise race changes of the interrupt configuration.
This aligns interfaces which may trigger the INTx eventfd into two
camps, one side serialized by igate and the other only enabled while
INTx is configured. A subsequent patch introduces synchronization for
the latter flows.
Cc: <stable@vger.kernel.org>
Fixes: 89e1f7d ("vfio: Add PCI device driver")
Reported-by: Reinette Chatre <reinette.chatre@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Link: https://lore.kernel.org/r/20240308230557.805580-3-alex.williamson@redhat.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
(cherry picked from commit 810cd4b)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>1 parent 21a858e commit 59f2394
1 file changed
+28
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
| |||
143 | 145 | | |
144 | 146 | | |
145 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
146 | 159 | | |
147 | 160 | | |
148 | 161 | | |
| |||
194 | 207 | | |
195 | 208 | | |
196 | 209 | | |
197 | | - | |
| 210 | + | |
198 | 211 | | |
| 212 | + | |
| 213 | + | |
199 | 214 | | |
200 | 215 | | |
201 | 216 | | |
202 | 217 | | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
203 | 225 | | |
204 | 226 | | |
205 | 227 | | |
| |||
560 | 582 | | |
561 | 583 | | |
562 | 584 | | |
563 | | - | |
| 585 | + | |
564 | 586 | | |
565 | 587 | | |
566 | 588 | | |
567 | | - | |
| 589 | + | |
568 | 590 | | |
569 | 591 | | |
570 | 592 | | |
| |||
591 | 613 | | |
592 | 614 | | |
593 | 615 | | |
594 | | - | |
| 616 | + | |
595 | 617 | | |
596 | 618 | | |
597 | 619 | | |
598 | | - | |
| 620 | + | |
599 | 621 | | |
600 | 622 | | |
601 | 623 | | |
| |||
0 commit comments