 c05e4667be
			
		
	
	
		c05e4667be
		
	
	
	
	
		
			
			For the L1 table to loaded for an internal snapshot, the code allocated only enough memory to hold the currently active L1 table. If the snapshot's L1 table is actually larger than the current one, this leads to a buffer overflow. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
		
			
				
	
	
		
			28 lines
		
	
	
		
			961 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			961 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| QA output created by 029
 | |
| 
 | |
| Test loading internal snapshots where the L1 table of the snapshot
 | |
| is smaller than the current L1 table.
 | |
| 
 | |
| Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 
 | |
| wrote 4096/4096 bytes at offset 0
 | |
| 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 | |
| No errors were found on the image.
 | |
| Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=16777216 
 | |
| wrote 4194304/4194304 bytes at offset 0
 | |
| 4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 | |
| No errors were found on the image.
 | |
| 
 | |
| Try using a huge VM state
 | |
| 
 | |
| Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 
 | |
| wrote 4096/4096 bytes at offset 1099511627776
 | |
| 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 | |
| read 4096/4096 bytes at offset 1099511627776
 | |
| 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 | |
| No errors were found on the image.
 | |
| 
 | |
| qcow2_snapshot_load_tmp() should take the L1 size from the snapshot
 | |
| 
 | |
| Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 
 | |
| *** done
 |