mirror of https://gitlab.com/qemu-project/qemu
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
![]() qcow2_refresh_limits() assumes that s->crypto is non-NULL whenever bs->encrypted is true. This is actually not the case: qcow2_do_open() allows to open an image with a missing crypto header for BDRV_O_NO_IO, and then bs->encrypted is true, but s->crypto is still NULL. It doesn't make sense to open an invalid image, so remove the exception for BDRV_O_NO_IO. This catches the problem early and any code that makes the same assumption is safe now. At the same time, in the name of defensive programming, we shouldn't make the assumption in the first place. Let qcow2_refresh_limits() check s->crypto rather than bs->encrypted. If s->crypto is NULL, it also can't make any requirement on request alignment. Finally, start a qcow2-encryption test case that only serves as a regression test for this crash for now. Reported-by: Leonid Reviakin <L.reviakin@fobos-nt.ru> Reported-by: Denis Rastyogin <gerben@altlinux.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-ID: <20250318201143.70657-1-kwolf@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> |
3 weeks ago | |
---|---|---|
.. | ||
sample_images | ||
tests | 3 weeks ago | |
001 | ||
001.out | ||
002 | ||
002.out | ||
003 | ||
003.out | ||
004 | ||
004.out | ||
005 | ||
005.out | ||
007 | ||
007.out | ||
008 | ||
008.out | ||
009 | ||
009.out | ||
010 | ||
010.out | ||
011 | ||
011.out | ||
012 | ||
012.out | ||
013 | ||
013.out | ||
014 | ||
014.out | ||
015 | ||
015.out | ||
017 | ||
017.out | ||
018 | ||
018.out | ||
019 | ||
019.out | ||
020 | ||
020.out | ||
021 | ||
021.out | ||
022 | ||
022.out | ||
023 | ||
023.out | ||
024 | 9 months ago | |
024.out | 9 months ago | |
025 | ||
025.out | ||
026 | ||
026.out | ||
026.out.nocache | ||
027 | ||
027.out | ||
028 | ||
028.out | ||
029 | 2 years ago | |
029.out | ||
030 | 2 years ago | |
030.out | ||
031 | ||
031.out | ||
032 | ||
032.out | ||
033 | 1 year ago | |
033.out | ||
034 | ||
034.out | ||
035 | ||
035.out | ||
036 | ||
036.out | ||
037 | ||
037.out | ||
038 | ||
038.out | ||
039 | ||
039.out | ||
040 | 2 years ago | |
040.out | ||
041 | 3 months ago | |
041.out | ||
042 | ||
042.out | ||
043 | ||
043.out | ||
044 | ||
044.out | ||
045 | 2 years ago | |
045.out | ||
046 | 2 years ago | |
046.out | ||
047 | ||
047.out | ||
048 | ||
048.out | ||
049 | ||
049.out | 2 years ago | |
050 | ||
050.out | ||
051 | ||
051.out | 2 years ago | |
051.pc.out | 1 month ago | |
052 | ||
052.out | ||
053 | ||
053.out | ||
054 | ||
054.out | ||
055 | 2 years ago | |
055.out | ||
056 | 2 years ago | |
056.out | ||
057 | ||
057.out | ||
058 | ||
058.out | ||
059 | 1 year ago | |
059.out | 1 year ago | |
060 | ||
060.out | 1 year ago | |
061 | 10 months ago | |
061.out | 10 months ago | |
062 | ||
062.out | ||
063 | ||
063.out | ||
064 | ||
064.out | ||
065 | ||
065.out | ||
066 | 1 year ago | |
066.out | ||
068 | ||
068.out | ||
069 | ||
069.out | ||
070 | ||
070.out | ||
071 | 2 years ago | |
071.out | 1 year ago | |
072 | ||
072.out | ||
073 | ||
073.out | ||
074 | ||
074.out | ||
075 | ||
075.out | ||
076 | ||
076.out | ||
077 | ||
077.out | ||
078 | ||
078.out | ||
079 | ||
079.out | ||
080 | ||
080.out | 2 years ago | |
081 | ||
081.out | 1 year ago | |
082 | ||
082.out | ||
083 | ||
083.out | ||
084 | ||
084.out | ||
085 | ||
085.out | ||
086 | ||
086.out | ||
087 | ||
087.out | 1 year ago | |
088 | ||
088.out | ||
089 | ||
089.out | ||
090 | ||
090.out | ||
091 | ||
091.out | ||
092 | ||
092.out | ||
093 | 2 years ago | |
093.out | ||
094 | ||
094.out | ||
095 | ||
095.out | ||
096 | ||
096.out | ||
097 | ||
097.out | ||
098 | ||
098.out | ||
099 | ||
099.out | ||
101 | ||
101.out | ||
102 | ||
102.out | ||
103 | ||
103.out | ||
104 | ||
104.out | ||
105 | ||
105.out | ||
106 | ||
106.out | ||
107 | ||
107.out | ||
108 | ||
108.out | 1 year ago | |
109 | 1 year ago | |
109.out | 1 year ago | |
110 | ||
110.out | ||
111 | ||
111.out | ||
112 | ||
112.out | 2 years ago | |
113 | ||
113.out | ||
114 | 1 year ago | |
114.out | ||
115 | ||
115.out | ||
116 | ||
116.out | ||
117 | ||
117.out | 1 year ago | |
118 | 2 years ago | |
118.out | ||
119 | ||
119.out | ||
120 | ||
120.out | 1 year ago | |
121 | ||
121.out | ||
122 | ||
122.out | 2 years ago | |
123 | ||
123.out | ||
124 | 2 years ago | |
124.out | ||
125 | ||
125.out | ||
126 | ||
126.out | ||
127 | ||
127.out | 1 year ago | |
128 | ||
128.out | ||
129 | 2 years ago | |
129.out | ||
130 | 1 year ago | |
130.out | ||
131 | 2 years ago | |
131.out | 2 years ago | |
132 | 2 years ago | |
132.out | ||
133 | ||
133.out | ||
134 | 1 year ago | |
134.out | ||
135 | ||
135.out | ||
136 | ||
136.out | ||
137 | ||
137.out | ||
138 | ||
138.out | ||
139 | 2 years ago | |
139.out | ||
140 | ||
140.out | 1 year ago | |
141 | 1 year ago | |
141.out | 1 year ago | |
142 | ||
142.out | ||
143 | ||
143.out | 1 year ago | |
144 | 1 year ago | |
144.out | 1 year ago | |
145 | ||
145.out | ||
146 | ||
146.out | 2 years ago | |
147 | 2 years ago | |
147.out | ||
148 | ||
148.out | ||
149 | 1 year ago | |
149.out | 1 year ago | |
150 | ||
150.out.qcow2 | ||
150.out.raw | ||
151 | 2 years ago | |
151.out | ||
152 | 2 years ago | |
152.out | ||
153 | ||
153.out | ||
154 | ||
154.out | 2 years ago | |
155 | 2 years ago | |
155.out | ||
156 | 1 year ago | |
156.out | 1 year ago | |
157 | 1 year ago | |
157.out | ||
158 | 1 year ago | |
158.out | ||
159 | ||
159.out | ||
160 | ||
160.out | ||
161 | ||
161.out | ||
162 | 3 weeks ago | |
162.out | ||
163 | ||
163.out | ||
165 | 3 months ago | |
165.out | ||
170 | ||
170.out | ||
171 | ||
171.out | ||
172 | 2 years ago | |
172.out | 2 months ago | |
173 | ||
173.out | ||
174 | ||
174.out | ||
175 | ||
175.out | ||
176 | ||
176.out | 1 year ago | |
177 | ||
177.out | ||
178 | ||
178.out.qcow2 | 2 years ago | |
178.out.raw | 2 years ago | |
179 | ||
179.out | 2 years ago | |
181 | 2 years ago | |
181.out | ||
182 | ||
182.out | 1 year ago | |
184 | ||
184.out | 3 months ago | |
185 | 1 year ago | |
185.out | 1 year ago | |
186 | ||
186.out | ||
187 | ||
187.out | ||
188 | 1 year ago | |
188.out | ||
189 | 1 year ago | |
189.out | ||
190 | ||
190.out | ||
191 | ||
191.out | 3 months ago | |
192 | ||
192.out | ||
194 | 2 years ago | |
194.out | 3 months ago | |
195 | ||
195.out | 1 year ago | |
196 | 2 years ago | |
196.out | ||
197 | 2 years ago | |
197.out | 2 years ago | |
198 | 1 year ago | |
198.out | 1 year ago | |
200 | ||
200.out | ||
201 | ||
201.out | ||
202 | 1 year ago | |
202.out | ||
203 | 1 year ago | |
203.out | 3 months ago | |
204 | ||
204.out | ||
205 | 2 years ago | |
205.out | ||
206 | ||
206.out | 1 year ago | |
207 | ||
207.out | ||
208 | ||
208.out | ||
209 | ||
209.out | 2 years ago | |
210 | ||
210.out | 1 year ago | |
211 | ||
211.out | 6 months ago | |
212 | ||
212.out | ||
213 | ||
213.out | ||
214 | ||
214.out | ||
215 | 2 years ago | |
215.out | ||
216 | ||
216.out | ||
217 | ||
217.out | ||
218 | 2 years ago | |
218.out | ||
219 | ||
219.out | ||
220 | ||
220.out | ||
221 | ||
221.out | 2 years ago | |
223 | ||
223.out | 1 year ago | |
224 | ||
224.out | ||
225 | ||
225.out | ||
226 | ||
226.out | ||
227 | 1 year ago | |
227.out | 1 year ago | |
228 | ||
228.out | ||
229 | ||
229.out | ||
231 | ||
231.out | ||
232 | ||
232.out | ||
233 | ||
233.out | 8 months ago | |
234 | ||
234.out | 3 months ago | |
235 | ||
235.out | ||
236 | ||
236.out | ||
237 | ||
237.out | ||
238 | ||
238.out | ||
239 | ||
239.out | ||
240 | ||
240.out | ||
241 | ||
241.out | 2 years ago | |
242 | ||
242.out | ||
243 | ||
243.out | ||
244 | 10 months ago | |
244.out | 2 years ago | |
245 | 10 months ago | |
245.out | 2 years ago | |
246 | ||
246.out | ||
247 | ||
247.out | 1 year ago | |
248 | ||
248.out | ||
249 | ||
249.out | ||
250 | ||
250.out | ||
251 | ||
251.out | ||
252 | ||
252.out | 2 years ago | |
253 | ||
253.out | 2 years ago | |
254 | ||
254.out | ||
255 | ||
255.out | ||
256 | 2 years ago | |
256.out | ||
257 | 2 years ago | |
257.out | 11 months ago | |
258 | ||
258.out | ||
259 | ||
259.out | ||
260 | ||
260.out | ||
261 | 1 year ago | |
261.out | ||
262 | ||
262.out | 3 months ago | |
263 | 1 year ago | |
263.out | ||
264 | 1 year ago | |
264.out | ||
265 | ||
265.out | ||
266 | ||
266.out | ||
267 | ||
267.out | 1 year ago | |
268 | ||
268.out | ||
270 | 10 months ago | |
270.out | ||
271 | 2 years ago | |
271.out | 2 years ago | |
272 | ||
272.out | ||
273 | ||
273.out | 3 months ago | |
274 | ||
274.out | 2 years ago | |
277 | 1 year ago | |
277.out | ||
279 | ||
279.out | ||
280 | ||
280.out | 3 months ago | |
281 | 2 years ago | |
281.out | ||
282 | ||
282.out | ||
283 | ||
283.out | ||
284 | 1 year ago | |
284.out | ||
286 | 1 year ago | |
286.out | 1 year ago | |
287 | ||
287.out | ||
288 | ||
288.out | ||
289 | ||
289.out | ||
290 | ||
290.out | ||
292 | ||
292.out | ||
293 | ||
293.out | ||
294 | ||
294.out | ||
295 | 2 years ago | |
295.out | ||
296 | 2 years ago | |
296.out | ||
297 | ||
297.out | ||
298 | 2 years ago | |
298.out | ||
299 | ||
299.out | ||
300 | 2 years ago | |
300.out | ||
301 | ||
301.out | ||
302 | 2 months ago | |
302.out | ||
303 | ||
303.out | ||
304 | ||
304.out | ||
305 | ||
305.out | ||
307 | ||
307.out | 2 years ago | |
308 | 1 year ago | |
308.out | 1 year ago | |
310 | ||
310.out | ||
312 | ||
312.out | ||
313 | ||
313.out | ||
314 | 2 years ago | |
314.out | 2 years ago | |
Makefile | ||
README | ||
check | 9 months ago | |
common.filter | 12 months ago | |
common.nbd | ||
common.pattern | ||
common.qemu | ||
common.rc | 2 years ago | |
common.tls | ||
fat16.py | 9 months ago | |
findtests.py | ||
iotests.py | 3 months ago | |
linters.py | 2 years ago | |
meson.build | 1 year ago | |
mypy.ini | ||
nbd-fault-injector.py | ||
pylintrc | 5 months ago | |
qcow2.py | ||
qcow2_format.py | ||
qed.py | ||
testenv.py | 6 months ago | |
testrunner.py | 10 months ago |
README
=== This is the QEMU I/O test suite === * Intro This package contains a simple test suite for the I/O layer of qemu. It does not require a guest, but only the qemu, qemu-img and qemu-io binaries. This does limit it to exercise the low-level I/O path only but no actual block drivers like ide, scsi or virtio. * Usage Just run ./check to run all tests for the raw image format, or ./check -qcow2 to test the qcow2 image format. The output of ./check -h explains additional options to test further image formats or I/O methods. * Feedback and patches Please send improvements to the test suite, general feedback or just reports of failing tests cases to qemu-devel@nongnu.org with a CC: to qemu-block@nongnu.org.