d7d8bbb40a
The complete size ("total_size") of the fragmented packet is stored in the
fragment header and in the size of the fragment chain. When the fragments
are ready for merge, the skbuff's tail of the first fragment is expanded to
have enough room after the data pointer for at least total_size. This means
that it gets expanded by total_size - first_skb->len.
But this is ignoring the fact that after expanding the buffer, the fragment
header is pulled by from this buffer. Assuming that the tailroom of the
buffer was already 0, the buffer after the data pointer of the skbuff is
now only total_size - len(fragment_header) large. When the merge function
is then processing the remaining fragments, the code to copy the data over
to the merged skbuff will cause an skb_over_panic when it tries to actually
put enough data to fill the total_size bytes of the packet.
The size of the skb_pull must therefore also be taken into account when the
buffer's tailroom is expanded.
Fixes:
|
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
bat_algo.c | ||
bat_algo.h | ||
bat_iv_ogm.c | ||
bat_iv_ogm.h | ||
bat_v.c | ||
bat_v.h | ||
bat_v_elp.c | ||
bat_v_elp.h | ||
bat_v_ogm.c | ||
bat_v_ogm.h | ||
bitarray.c | ||
bitarray.h | ||
bridge_loop_avoidance.c | ||
bridge_loop_avoidance.h | ||
debugfs.c | ||
debugfs.h | ||
distributed-arp-table.c | ||
distributed-arp-table.h | ||
fragmentation.c | ||
fragmentation.h | ||
gateway_client.c | ||
gateway_client.h | ||
gateway_common.c | ||
gateway_common.h | ||
hard-interface.c | ||
hard-interface.h | ||
hash.c | ||
hash.h | ||
icmp_socket.c | ||
icmp_socket.h | ||
log.c | ||
log.h | ||
main.c | ||
main.h | ||
multicast.c | ||
multicast.h | ||
netlink.c | ||
netlink.h | ||
network-coding.c | ||
network-coding.h | ||
originator.c | ||
originator.h | ||
routing.c | ||
routing.h | ||
send.c | ||
send.h | ||
soft-interface.c | ||
soft-interface.h | ||
sysfs.c | ||
sysfs.h | ||
tp_meter.c | ||
tp_meter.h | ||
trace.c | ||
trace.h | ||
translation-table.c | ||
translation-table.h | ||
tvlv.c | ||
tvlv.h | ||
types.h |