alistair23-linux/net/wireless
Eric Dumazet 158f323b98 net: adjust skb->truesize in pskb_expand_head()
Slava Shwartsman reported a warning in skb_try_coalesce(), when we
detect skb->truesize is completely wrong.

In his case, issue came from IPv6 reassembly coping with malicious
datagrams, that forced various pskb_may_pull() to reallocate a bigger
skb->head than the one allocated by NIC driver before entering GRO
layer.

Current code does not change skb->truesize, leaving this burden to
callers if they care enough.

Blindly changing skb->truesize in pskb_expand_head() is not
easy, as some producers might track skb->truesize, for example
in xmit path for back pressure feedback (sk->sk_wmem_alloc)

We can detect the cases where it should be safe to change
skb->truesize :

1) skb is not attached to a socket.
2) If it is attached to a socket, destructor is sock_edemux()

My audit gave only two callers doing their own skb->truesize
manipulation.

I had to remove skb parameter in sock_edemux macro when
CONFIG_INET is not set to avoid a compile error.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Slava Shwartsman <slavash@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-01-27 12:03:29 -05:00
..
.gitignore wireless: support internal statically compiled regulatory database 2009-12-21 18:56:10 -05:00
ap.c cfg80211: export interface stopping function 2014-05-06 15:16:34 +02:00
chan.c cfg80211: add start / stop NAN commands 2016-09-30 13:21:14 +02:00
core.c cfg80211: NL80211_ATTR_SOCKET_OWNER support for CMD_CONNECT 2017-01-09 13:08:47 +01:00
core.h cfg80211: Specify the reason for connect timeout 2017-01-13 09:46:18 +01:00
db.txt wireless: support internal statically compiled regulatory database 2009-12-21 18:56:10 -05:00
debugfs.c cfg80211: remove enum ieee80211_band 2016-04-12 15:56:15 +02:00
debugfs.h
ethtool.c cfg80211: make ethtool the driver's responsibility 2014-06-23 11:05:33 +02:00
genregdb.awk wireless: fixup genregdb.awk for remove of antenna gain from wireless-regd 2014-07-21 12:24:20 +02:00
ibss.c cfg80211: Add support for static WEP in the driver 2016-09-30 13:19:10 +02:00
Kconfig cfg80211: Fix some linguistics in Kconfig 2016-02-24 09:04:23 +01:00
lib80211.c lib80211: remove unused print_ssid() 2014-10-14 02:18:27 +02:00
lib80211_crypt_ccmp.c lib80211: ratelimit key index mismatch 2015-12-04 14:43:32 +01:00
lib80211_crypt_tkip.c wireless: fix bogus maybe-uninitialized warning 2016-11-17 08:46:38 +02:00
lib80211_crypt_wep.c lib80211: Use skcipher and ahash 2016-01-27 20:36:03 +08:00
Makefile For 4.11, we seem to have more than in the past few releases: 2017-01-14 12:02:15 -05:00
mesh.c cfg80211: mesh: track (and thus validate) beacon interval 2016-10-27 09:08:45 +02:00
mlme.c cfg80211: Specify the reason for connect timeout 2017-01-13 09:46:18 +01:00
nl80211.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-01-17 15:19:37 -05:00
nl80211.h cfg80211: Specify the reason for connect timeout 2017-01-13 09:46:18 +01:00
ocb.c cfg80211: ocb: Fix null pointer deref if join_ocb is unimplemented 2015-12-04 14:43:32 +01:00
of.c cfg80211: support ieee80211-freq-limit DT property 2017-01-06 14:01:13 +01:00
radiotap.c cfg80211: add radiotap VHT info to rtap_namespace_sizes 2016-02-24 09:04:41 +01:00
rdev-ops.h cfg80211: Add support to update connection parameters 2016-10-27 16:03:28 +02:00
reg.c cfg80211: move function checking range fit to util.c 2017-01-06 13:54:04 +01:00
reg.h cfg80211: remove enum ieee80211_band 2016-04-12 15:56:15 +02:00
regdb.h cfg80211: relicense reg.c reg.h and genregdb.awk to ISC 2012-01-04 14:30:41 -05:00
scan.c nl80211: rework {sched_,}scan event related functions 2016-12-16 13:32:31 +01:00
sme.c cfg80211: Specify the reason for connect timeout 2017-01-13 09:46:18 +01:00
sysfs.c cfg80211: sysfs: use wiphy_name() 2017-01-04 08:24:49 +01:00
sysfs.h net: misc: Remove extern from function prototypes 2013-10-19 19:12:11 -04:00
trace.c cfg80211: add tracing to rdev-ops 2012-10-18 10:53:37 +02:00
trace.h cfg80211: Add support to update connection parameters 2016-10-27 16:03:28 +02:00
util.c net: adjust skb->truesize in pskb_expand_head() 2017-01-27 12:03:29 -05:00
wext-compat.c cfg80211: Add support for static WEP in the driver 2016-09-30 13:19:10 +02:00
wext-compat.h cfg80211-wext: export symbols only when needed 2015-02-28 21:31:09 +01:00
wext-core.c wext: uninline stream addition functions 2017-01-13 09:38:42 +01:00
wext-priv.c wext: fix potential private ioctl memory content leak 2010-09-20 13:41:40 -04:00
wext-proc.c net: proc: change proc_net_remove to remove_proc_entry 2013-02-18 14:53:08 -05:00
wext-sme.c cfg80211: wext does not need to set monitor channel in managed mode 2017-01-11 14:10:44 +01:00
wext-spy.c wireless: Convert compare_ether_addr to ether_addr_equal 2012-05-09 20:49:19 -04:00