From 0c796f91a518480fd6696ba2affed1167e840823 Mon Sep 17 00:00:00 2001 From: Dan Rosenberg Date: Thu, 16 Sep 2010 22:34:26 -0700 Subject: [PATCH] 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 --- drivers/net/tulip/de4x5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c index 4f750306344..1d9fef74b39 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 */ -- 2.39.3