mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	libata: zpodd: small read overflow in eject_tray()
We read from the cdb[] buffer in ata_exec_internal_sg().  It has to be
ATAPI_CDB_LEN (16) bytes long, but this buffer is only 12 bytes.
Fixes: 213342053d ("libata: handle power transition of ODD")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: stable@vger.kernel.org
			
			
This commit is contained in:
		
							parent
							
								
									4544e403eb
								
							
						
					
					
						commit
						18c9a99bce
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -35,7 +35,7 @@ struct zpodd {
 | 
			
		|||
static int eject_tray(struct ata_device *dev)
 | 
			
		||||
{
 | 
			
		||||
	struct ata_taskfile tf;
 | 
			
		||||
	static const char cdb[] = {  GPCMD_START_STOP_UNIT,
 | 
			
		||||
	static const char cdb[ATAPI_CDB_LEN] = {  GPCMD_START_STOP_UNIT,
 | 
			
		||||
		0, 0, 0,
 | 
			
		||||
		0x02,     /* LoEj */
 | 
			
		||||
		0, 0, 0, 0, 0, 0, 0,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue