linux/net/tipc
Jon Maloy a9e2971b8c tipc: Unclone message at secondary destination lookup
When a bundling message is received, the function tipc_link_input()
calls function tipc_msg_extract() to unbundle all inner messages of
the bundling message before adding them to input queue.

The function tipc_msg_extract() just clones all inner skb for all
inner messagges from the bundling skb. This means that the skb
headroom of an inner message overlaps with the data part of the
preceding message in the bundle.

If the message in question is a name addressed message, it may be
subject to a secondary destination lookup, and eventually be sent out
on one of the interfaces again. But, since what is perceived as headroom
by the device driver in reality is the last bytes of the preceding
message in the bundle, the latter will be overwritten by the MAC
addresses of the L2 header. If the preceding message has not yet been
consumed by the user, it will evenually be delivered with corrupted
contents.

This commit fixes this by uncloning all messages passing through the
function tipc_msg_lookup_dest(), hence ensuring that the headroom
is always valid when the message is passed on.

Signed-off-by: Tung Nguyen <tung.q.nguyen@dektech.com.au>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-08 21:13:23 -07:00
..
addr.c
addr.h
bcast.c tipc: correct initialization of skb list 2017-10-08 21:13:23 -07:00
bcast.h
bearer.c tipc: remove unnecessary call to dev_net() 2017-09-06 21:25:52 -07:00
bearer.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-09-01 17:42:05 -07:00
core.c
core.h
discover.c
discover.h
eth_media.c
ib_media.c
Kconfig
link.c
link.h
Makefile
monitor.c
monitor.h
msg.c tipc: Unclone message at secondary destination lookup 2017-10-08 21:13:23 -07:00
msg.h
name_distr.c
name_distr.h
name_table.c
name_table.h
net.c
net.h
netlink.c
netlink.h
netlink_compat.c net: tipc: constify genl_ops 2017-08-23 22:31:38 -07:00
node.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-09-01 17:42:05 -07:00
node.h
server.c
server.h
socket.c tipc: Fix tipc_sk_reinit handling of -EAGAIN 2017-08-24 14:02:26 -07:00
socket.h
subscr.c tipc: fix a race condition of releasing subscriber object 2017-08-22 14:25:02 -07:00
subscr.h
sysctl.c
udp_media.c
udp_media.h