Subject: + block-compat_ioctlc-do-not-leak-info-to-user-space.patch added to -mm tree To: amwang@xxxxxxxxxx,axboe@xxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Wed, 22 May 2013 14:07:38 -0700 The patch titled Subject: block/compat_ioctl.c: do not leak info to user-space has been added to the -mm tree. Its filename is block-compat_ioctlc-do-not-leak-info-to-user-space.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: Cong Wang <amwang@xxxxxxxxxx> Subject: block/compat_ioctl.c: do not leak info to user-space There is a hole in struct hd_geometry, so we have to zero the struct on stack before copying it to user-space. Signed-off-by: Cong Wang <amwang@xxxxxxxxxx> Cc: Jens Axboe <axboe@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- block/compat_ioctl.c | 1 + 1 file changed, 1 insertion(+) diff -puN block/compat_ioctl.c~block-compat_ioctlc-do-not-leak-info-to-user-space block/compat_ioctl.c --- a/block/compat_ioctl.c~block-compat_ioctlc-do-not-leak-info-to-user-space +++ a/block/compat_ioctl.c @@ -59,6 +59,7 @@ static int compat_hdio_getgeo(struct gen if (!disk->fops->getgeo) return -ENOTTY; + memset(&geo, 0, sizeof(geo)); /* * We need to set the startsect first, the driver may * want to override it. _ Patches currently in -mm which might be from amwang@xxxxxxxxxx are linux-next.patch block-compat_ioctlc-do-not-leak-info-to-user-space.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