summaryrefslogtreecommitdiff
path: root/drivers/staging/android/ion
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2014-02-01 00:16:23 +0100
committerPatrick Tjin <pattjin@google.com>2017-01-18 15:40:47 -0800
commit437ed3156d3a8bba7e33518d23d20be95975c321 (patch)
tree08269882e849bc98031cf09597e706dfb9aa2596 /drivers/staging/android/ion
parentc3378a37c46706c81ca4d20abd038bd4519da246 (diff)
downloadx86_64-437ed3156d3a8bba7e33518d23d20be95975c321.tar.gz
mac80211: fix fragmentation code, particularly for encryption
The "new" fragmentation code (since my rewrite almost 5 years ago) erroneously sets skb->len rather than using skb_trim() to adjust the length of the first fragment after copying out all the others. This leaves the skb tail pointer pointing to after where the data originally ended, and thus causes the encryption MIC to be written at that point, rather than where it belongs: immediately after the data. The impact of this is that if software encryption is done, then a) encryption doesn't work for the first fragment, the connection becomes unusable as the first fragment will never be properly verified at the receiver, the MIC is practically guaranteed to be wrong b) we leak up to 8 bytes of plaintext (!) of the packet out into the air This is only mitigated by the fact that many devices are capable of doing encryption in hardware, in which case this can't happen as the tail pointer is irrelevant in that case. Additionally, fragmentation is not used very frequently and would normally have to be configured manually. Fix this by using skb_trim() properly. Cc: stable@vger.kernel.org Fixes: 2de8e0d999b8 ("mac80211: rewrite fragmentation") Reported-by: Jouni Malinen <j@w1.fi> Bug: 34077221 Signed-off-by: Johannes Berg <johannes.berg@intel.com> Change-Id: I74c73cdc79b85f3cd450c96dc9580549416dea2a
Diffstat (limited to 'drivers/staging/android/ion')
0 files changed, 0 insertions, 0 deletions