Skip to content

Commit 18c9a99

Browse files
Dan Carpenterhtejun
authored andcommitted
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: 2133420 ("libata: handle power transition of ODD") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Tejun Heo <[email protected]> Cc: [email protected]
1 parent 4544e40 commit 18c9a99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/ata/libata-zpodd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ struct zpodd {
3535
static int eject_tray(struct ata_device *dev)
3636
{
3737
struct ata_taskfile tf;
38-
static const char cdb[] = { GPCMD_START_STOP_UNIT,
38+
static const char cdb[ATAPI_CDB_LEN] = { GPCMD_START_STOP_UNIT,
3939
0, 0, 0,
4040
0x02, /* LoEj */
4141
0, 0, 0, 0, 0, 0, 0,

0 commit comments

Comments
 (0)