fix buf of assigning skb->tail to network_header
Subsystems (3)
PATCH 1/1 fix buf of assigning skb->tail to network_header
in the case of NET_SKBUFF_DATA_USES_OFFSET, direct pointer assignment to skb->network_header is a dangerous bug.
Signed-off-by Hong Zhiguo <[email protected]>
--- net/ipv4/ipmr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/ipmr.c +1 -1
@@ -980,7 +980,7 @@ static int ipmr_cache_report(struct mr_table *mrt,/* Copy the IP header */ - skb->network_header = skb->tail; +skb_set_network_header (skb, skb->tail - skb->data);skb_put (skb, ihl);skb_copy_to_linear_data (skb, pkt->data, ihl);ip_hdr (skb)->protocol =0 ;/* Flag to the kernel this is a route add */
Signature · 1 line
1.7.10.4
Quoted 2 lines · Hong Zhiguo
in the case of
NET_SKBUFF_DATA_USES_OFFSET, direct pointer assignment toskb->network_headeris a dangerous bug.
But skb->tail is not a pointer.
Really you need to explain more than this confusing changelog