]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
mac80211: free skb fraglist before freeing the skb
authorSara Sharon <sara.sharon@intel.com>
Sat, 15 Dec 2018 09:03:06 +0000 (11:03 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit59389d6634be4521ead89e23015e5e03f6ca1250
tree1cec55885034ea3b7a74e429c3c147fedd5c1ba1
parent98f2d190f2b7e2176b04d4d0bdb8e02313b06dd1
mac80211: free skb fraglist before freeing the skb

BugLink: https://bugs.launchpad.net/bugs/1837477
[ Upstream commit 34b1e0e9efe101822e83cc62d22443ed3867ae7a ]

mac80211 uses the frag list to build AMSDU. When freeing
the skb, it may not be really freed, since someone is still
holding a reference to it.
In that case, when TCP skb is being retransmitted, the
pointer to the frag list is being reused, while the data
in there is no longer valid.
Since we will never get frag list from the network stack,
as mac80211 doesn't advertise the capability, we can safely
free and nullify it before releasing the SKB.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
net/mac80211/status.c