Commit 11e8e55
xen-blkback: don't leak stack data via response ring
commit 089bc0143f489bd3a4578bdff5f4ca68fb26f341 upstream.
Rather than constructing a local structure instance on the stack, fill
the fields directly on the shared ring, just like other backends do.
Build on the fact that all response structure flavors are actually
identical (the old code did make this assumption too).
This is XSA-216.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
[bwh: Backported to 4.4: adjust context]
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 49630dd commit 11e8e55
2 files changed
Lines changed: 17 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1407 | 1407 | | |
1408 | 1408 | | |
1409 | 1409 | | |
1410 | | - | |
| 1410 | + | |
1411 | 1411 | | |
1412 | 1412 | | |
1413 | 1413 | | |
1414 | 1414 | | |
1415 | | - | |
1416 | | - | |
1417 | | - | |
1418 | | - | |
1419 | 1415 | | |
1420 | 1416 | | |
1421 | 1417 | | |
1422 | 1418 | | |
1423 | | - | |
1424 | | - | |
| 1419 | + | |
| 1420 | + | |
1425 | 1421 | | |
1426 | 1422 | | |
1427 | | - | |
1428 | | - | |
| 1423 | + | |
| 1424 | + | |
1429 | 1425 | | |
1430 | 1426 | | |
1431 | | - | |
1432 | | - | |
| 1427 | + | |
| 1428 | + | |
1433 | 1429 | | |
1434 | 1430 | | |
1435 | 1431 | | |
1436 | 1432 | | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
1437 | 1438 | | |
1438 | 1439 | | |
1439 | 1440 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
| 77 | + | |
| 78 | + | |
80 | 79 | | |
81 | 80 | | |
82 | 81 | | |
| |||
128 | 127 | | |
129 | 128 | | |
130 | 129 | | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | 130 | | |
140 | 131 | | |
141 | 132 | | |
| |||
192 | 183 | | |
193 | 184 | | |
194 | 185 | | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | 186 | | |
202 | | - | |
| 187 | + | |
203 | 188 | | |
204 | | - | |
| 189 | + | |
205 | 190 | | |
206 | | - | |
| 191 | + | |
207 | 192 | | |
208 | 193 | | |
209 | 194 | | |
| |||
0 commit comments