projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ce5cce
)
l2tp: fix a potential skb leak in l2tp_xmit_skb()
author
Eric Dumazet
<eric.dumazet@gmail.com>
Fri, 7 Oct 2011 05:35:46 +0000
(
05:35
+0000)
committer
David S. Miller
<davem@davemloft.net>
Wed, 19 Oct 2011 03:32:00 +0000
(23:32 -0400)
l2tp_xmit_skb() can leak one skb if skb_cow_head() returns an error.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/l2tp/l2tp_core.c
patch
|
blob
|
blame
|
history
diff --git
a/net/l2tp/l2tp_core.c
b/net/l2tp/l2tp_core.c
index ad4ac2601a569ccb7b95e36a9c83fac58fc4693b..34b2ddeacb673b3b8d4f3e92bf726fc567c49a81 100644
(file)
--- a/
net/l2tp/l2tp_core.c
+++ b/
net/l2tp/l2tp_core.c
@@
-1045,8
+1045,10
@@
int l2tp_xmit_skb(struct l2tp_session *session, struct sk_buff *skb, int hdr_len
headroom = NET_SKB_PAD + sizeof(struct iphdr) +
uhlen + hdr_len;
old_headroom = skb_headroom(skb);
- if (skb_cow_head(skb, headroom))
+ if (skb_cow_head(skb, headroom)) {
+ dev_kfree_skb(skb);
goto abort;
+ }
new_headroom = skb_headroom(skb);
skb_orphan(skb);