]> git.baikalelectronics.ru Git - kernel.git/commit
wext: fix potential private ioctl memory content leak
authorJohannes Berg <johannes.berg@intel.com>
Thu, 16 Sep 2010 22:38:25 +0000 (00:38 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 20 Sep 2010 17:41:40 +0000 (13:41 -0400)
commit2a9d685b735f4e90bd97be5e40ae999834dd5b62
tree7f0eadba6ca9d0cc19b26dc82ec61bc8df4c9fe2
parent9ddb47e4caa521e9dab378c568eb50e05dd8114e
wext: fix potential private ioctl memory content leak

When a driver doesn't fill the entire buffer, old
heap contents may remain, and if it also doesn't
update the length properly, this old heap content
will be copied back to userspace.

It is very unlikely that this happens in any of
the drivers using private ioctls since it would
show up as junk being reported by iwpriv, but it
seems better to be safe here, so use kzalloc.

Reported-by: Jeff Mahoney <jeffm@suse.com>
Cc: stable@kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/wireless/wext-priv.c