Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net80211 Update the pointer after m_pullup, otherwise po...
details: https://anonhg.NetBSD.org/src/rev/bb5eaca21db8
branches: trunk
changeset: 358066:bb5eaca21db8
user: maxv <maxv%NetBSD.org@localhost>
date: Sun Dec 10 08:48:15 2017 +0000
description:
Update the pointer after m_pullup, otherwise possible use-after-free.
diffstat:
sys/net80211/ieee80211_input.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 5ea52ed0807e -r bb5eaca21db8 sys/net80211/ieee80211_input.c
--- a/sys/net80211/ieee80211_input.c Sun Dec 10 05:36:25 2017 +0000
+++ b/sys/net80211/ieee80211_input.c Sun Dec 10 08:48:15 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ieee80211_input.c,v 1.89 2017/09/26 07:42:06 knakahara Exp $ */
+/* $NetBSD: ieee80211_input.c,v 1.90 2017/12/10 08:48:15 maxv Exp $ */
/*-
* Copyright (c) 2001 Atsushi Onoe
* Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
@@ -36,7 +36,7 @@
__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_input.c,v 1.81 2005/08/10 16:22:29 sam Exp $");
#endif
#ifdef __NetBSD__
-__KERNEL_RCSID(0, "$NetBSD: ieee80211_input.c,v 1.89 2017/09/26 07:42:06 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ieee80211_input.c,v 1.90 2017/12/10 08:48:15 maxv Exp $");
#endif
#ifdef _KERNEL_OPT
@@ -358,6 +358,8 @@
ic->ic_stats.is_rx_tooshort++;
goto out; /* XXX */
}
+ wh = mtod(m, struct ieee80211_frame *);
+
switch (ic->ic_opmode) {
case IEEE80211_M_STA:
if (dir != IEEE80211_FC1_DIR_FROMDS) {
Home |
Main Index |
Thread Index |
Old Index