android_kernel_motorola_sm6225/net/wireless
David S. Miller 0a06ea8718 [WIRELESS] WEXT: Fix userspace corruption on 64-bit.
On 64-bit systems sizeof(struct ifreq) is 8 bytes larger than
sizeof(struct iwreq).

For GET calls, the wireless extension code copies back into userspace
using sizeof(struct ifreq) but userspace and elsewhere only allocates
a "struct iwreq".  Thus, this copy writes past the end of the iwreq
object and corrupts whatever sits after it in memory.

Fix the copy_to_user() length.

This particularly hurts the compat case because the wireless compat
code uses compat_alloc_userspace() and right after this allocated
buffer is the current bottom of the user stack, and that's what gets
overwritten by the copy_to_user() call.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-20 03:29:53 -08:00
..
core.c [NL80211]: add netlink interface to cfg80211 2007-10-10 16:52:14 -07:00
core.h [NL80211]: add netlink interface to cfg80211 2007-10-10 16:52:14 -07:00
Kconfig [WIRELESS]: Fix Kconfig. 2007-10-10 16:52:52 -07:00
Makefile [NL80211]: add netlink interface to cfg80211 2007-10-10 16:52:14 -07:00
nl80211.c [NL80211]: add netlink interface to cfg80211 2007-10-10 16:52:14 -07:00
nl80211.h [NL80211]: add netlink interface to cfg80211 2007-10-10 16:52:14 -07:00
radiotap.c [WIRELESS] radiotap parser: accept all other fields 2007-10-10 16:47:43 -07:00
sysfs.c Driver core: change add_uevent_var to use a struct 2007-10-12 14:51:01 -07:00
sysfs.h [WIRELESS] cfg80211: New wireless config infrastructure. 2007-04-25 22:29:41 -07:00
wext.c [WIRELESS] WEXT: Fix userspace corruption on 64-bit. 2007-11-20 03:29:53 -08:00