DescriptionEugene Teo (Security Response)
2010-09-13 04:10:09 UTC
Description of problem:
http://lkml.org/lkml/2010/9/11/169
The DE4X5_GET_REG device ioctl allows unprivileged users to read 32 bytes of uninitialized stack memory, because it copies the uninitialized "addr" member instead of the intended "lval" member.
Comment 2Eugene Teo (Security Response)
2010-09-16 02:37:26 UTC
From Jeff Mahoney, 'tmp' is a union, not a struct. Writes to lval are the same as writes to addr. The length is correctly determined so that only initialized memory is used.
static int
de4x5_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{
struct de4x5_private *lp = netdev_priv(dev);
struct de4x5_ioctl *ioc = (struct de4x5_ioctl *) &rq->ifr_ifru;
u_long iobase = dev->base_addr;
int i, j, status = 0;
s32 omr;
union {
u8 addr[144];
u16 sval[72];
u32 lval[36];
} tmp;
[...]
Comment 3Eugene Teo (Security Response)
2010-09-20 08:06:21 UTC