Skip to content

Commit

Permalink
[ATM] CLIP: Do not refer freed skbuff in clip_mkip().
Browse files Browse the repository at this point in the history
In clip_mkip(), skb->dev is dereferenced after clip_push(),
which frees up skb.

Advisory: AD_LAB-06009 (<adlab@venustech.com.cn>).

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
YOSHIFUJI Hideaki authored and David S. Miller committed Sep 18, 2006
1 parent d7811e6 commit fe26109
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/atm/clip.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,11 @@ static int clip_mkip(struct atm_vcc *vcc, int timeout)
} else {
unsigned int len = skb->len;

skb_get(skb);
clip_push(vcc, skb);
PRIV(skb->dev)->stats.rx_packets--;
PRIV(skb->dev)->stats.rx_bytes -= len;
kfree_skb(skb);
}
return 0;
}
Expand Down

0 comments on commit fe26109

Please sign in to comment.