The patch titled drivers/scsi/mpt2sas: prevent heap overflows has been removed from the -mm tree. Its filename was drivers-scsi-mpt2sas-prevent-heap-overflows.patch This patch was dropped because an updated version will be merged The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: drivers/scsi/mpt2sas: prevent heap overflows From: Dan Rosenberg <drosenberg@xxxxxxxxxxxxx> At two points in handling device ioctls via /dev/mpt2ctl, user-supplied length values are used to copy data from userspace into heap buffers without any bounds checking at all, allowing controllable heap corruption and subsequently privilege escalation. This patch should fix these instances (please review). Signed-off-by: Dan Rosenberg <drosenberg@xxxxxxxxxxxxx> Cc: Eric Moore <eric.moore@xxxxxxx> Cc: Desai Kashyap <kashyap.desai@xxxxxxx> Cc: Eugene Teo <eugeneteo@xxxxxxxxx> Cc: James Bottomley <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx> Cc: <stable@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/scsi/mpt2sas/mpt2sas_ctl.c | 6 ++++++ 1 file changed, 6 insertions(+) diff -puN drivers/scsi/mpt2sas/mpt2sas_ctl.c~drivers-scsi-mpt2sas-prevent-heap-overflows drivers/scsi/mpt2sas/mpt2sas_ctl.c --- a/drivers/scsi/mpt2sas/mpt2sas_ctl.c~drivers-scsi-mpt2sas-prevent-heap-overflows +++ a/drivers/scsi/mpt2sas/mpt2sas_ctl.c @@ -688,6 +688,12 @@ _ctl_do_mpt_command(struct MPT2SAS_ADAPT goto out; } + if (karg.data_sge_offset * 4 > ioc->request_sz || + karg.data_sge_offset > (UINT_MAX / 4)) { + ret = -EINVAL; + goto out; + } + /* copy in request message frame from user */ if (copy_from_user(mpi_request, mf, karg.data_sge_offset*4)) { printk(KERN_ERR "failure at %s:%d/%s()!\n", __FILE__, __LINE__, _ Patches currently in -mm which might be from drosenberg@xxxxxxxxxxxxx are net-convert-%p-usage-to-%pk.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