Subject: [merged] drivers-scsi-megaraid-megaraid_mmc-missing-bounds-check-in-mimd_to_kioc.patch removed from -mm tree To: dan.carpenter@xxxxxxxxxx,fabs@xxxxxxxxx,keescook@xxxxxxxxxx,nico@xxxxxxxxx,mm-commits@xxxxxxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Thu, 20 Mar 2014 12:42:38 -0700 The patch titled Subject: drivers/scsi/megaraid/megaraid_mm.c: missing bounds check in mimd_to_kioc() has been removed from the -mm tree. Its filename was drivers-scsi-megaraid-megaraid_mmc-missing-bounds-check-in-mimd_to_kioc.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Subject: drivers/scsi/megaraid/megaraid_mm.c: missing bounds check in mimd_to_kioc() pthru32->dataxferlen comes from the user so we need to check that it's not too large so we don't overflow the buffer. Reported-by: Nico Golde <nico@xxxxxxxxx> Reported-by: Fabian Yamaguchi <fabs@xxxxxxxxx> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Cc: Kees Cook <keescook@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/scsi/megaraid/megaraid_mm.c | 2 ++ 1 file changed, 2 insertions(+) diff -puN drivers/scsi/megaraid/megaraid_mm.c~drivers-scsi-megaraid-megaraid_mmc-missing-bounds-check-in-mimd_to_kioc drivers/scsi/megaraid/megaraid_mm.c --- a/drivers/scsi/megaraid/megaraid_mm.c~drivers-scsi-megaraid-megaraid_mmc-missing-bounds-check-in-mimd_to_kioc +++ a/drivers/scsi/megaraid/megaraid_mm.c @@ -486,6 +486,8 @@ mimd_to_kioc(mimd_t __user *umimd, mraid pthru32->dataxferaddr = kioc->buf_paddr; if (kioc->data_dir & UIOC_WR) { + if (pthru32->dataxferlen > kioc->xferlen) + return -EINVAL; if (copy_from_user(kioc->buf_vaddr, kioc->user_data, pthru32->dataxferlen)) { return (-EFAULT); _ Patches currently in -mm which might be from dan.carpenter@xxxxxxxxxx are direct-io-remove-some-left-over-checks.patch ncpfs-cleanup-indenting-in-ncp_lookup.patch drivers-misc-sgi-gru-grukdumpc-cleanup-gru_dump_context-a-little.patch linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html