From: Dan Rosenberg Date: Fri, 17 Sep 2010 05:34:26 +0000 (-0700) Subject: drivers/net/tulip/de4x5.c: fix union member name in DE4X5_GET_REG ioctl X-Git-Tag: MMI-PSA29.97-13-9~21994^2~418 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0c796f91a518480fd6696ba2affed1167e840823;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git drivers/net/tulip/de4x5.c: fix union member name in DE4X5_GET_REG ioctl This was previously reported as a security issue due to leakage of uninitialized stack memory. Jeff Mahoney pointed out that this is incorrect since the copied data is from a union (rather than a struct). Therefore, this patch is only under consideration for the sake of correctness, and is not security relevant. Signed-off-by: Dan Rosenberg Acked-by: Grant Grundler Signed-off-by: David S. Miller --- diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c index 4f7503063446..1d9fef74b39b 100644 --- a/drivers/net/tulip/de4x5.c +++ b/drivers/net/tulip/de4x5.c @@ -5474,7 +5474,7 @@ de4x5_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) tmp.lval[6] = inl(DE4X5_STRR); j+=4; tmp.lval[7] = inl(DE4X5_SIGR); j+=4; ioc->len = j; - if (copy_to_user(ioc->data, tmp.addr, ioc->len)) return -EFAULT; + if (copy_to_user(ioc->data, tmp.lval, ioc->len)) return -EFAULT; break; #define DE4X5_DUMP 0x0f /* Dump the DE4X5 Status */