Skip to contentSkip to conversation

+ block-compat_ioctlc-do-not-leak-info-to-user-space.patch added to -mm tree

PATCH [email protected] 1 participant 1 message May 22, 2013 Block layer

lore
Share & tools
lore
#0 lore raw

Subject: + block-compat_ioctlc-do-not-leak-info-to-user-space.patch added to -mm tree
To: [email protected],[email protected]
From: [email protected]
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 <[email protected]>
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.

---

 block/compat_ioctl.c |    1 +
 1 file changed, 1 insertion(+)
block/compat_ioctl.c renamed from block/compat_ioctl.c~block-compat_ioctlc-do-not-leak-info-to-user-space +1 -0
diff -puN block/compat_ioctl.c~block-compat_ioctlc-do-not-leak-info-to-user-space 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 [email protected] are

linux-next.patch block-compat_ioctlc-do-not-leak-info-to-user-space.patch