Subject: + drivers-block-paride-pgc-underflow-bug-in-pg_write.patch added to -mm tree To: dan.carpenter@xxxxxxxxxx,axboe@xxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Thu, 17 Oct 2013 14:14:28 -0700 The patch titled Subject: drivers/block/paride/pg.c: underflow bug in pg_write() has been added to the -mm tree. Its filename is drivers-block-paride-pgc-underflow-bug-in-pg_write.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/drivers-block-paride-pgc-underflow-bug-in-pg_write.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/drivers-block-paride-pgc-underflow-bug-in-pg_write.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Subject: drivers/block/paride/pg.c: underflow bug in pg_write() The test here can underflow so we pass bogus lengths to the hardware. It's a static checker fix and I don't know the impact. Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Cc: Jens Axboe <axboe@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/block/paride/pg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/block/paride/pg.c~drivers-block-paride-pgc-underflow-bug-in-pg_write drivers/block/paride/pg.c --- a/drivers/block/paride/pg.c~drivers-block-paride-pgc-underflow-bug-in-pg_write +++ a/drivers/block/paride/pg.c @@ -581,7 +581,7 @@ static ssize_t pg_write(struct file *fil if (hdr.magic != PG_MAGIC) return -EINVAL; - if (hdr.dlen > PG_MAX_DATA) + if (hdr.dlen < 0 || hdr.dlen > PG_MAX_DATA) return -EINVAL; if ((count - hs) > PG_MAX_DATA) return -EINVAL; _ Patches currently in -mm which might be from dan.carpenter@xxxxxxxxxx are origin.patch ocfs2-add-missing-errno-in-ocfs2_ioctl_move_extents.patch drivers-block-paride-pgc-underflow-bug-in-pg_write.patch backlight-lm3630-signedness-bug-in-lm3630a_chip_init.patch backlight-lm3630-potential-null-deref-in-probe.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