atm: clip: prevent NULL deref in clip_push()
Subsystems (3)
PATCH 1/1 atm: clip: prevent NULL deref in clip_push()
Blamed commit missed that vcc_destroy_socket() calls clip_push() with a NULL skb.
If clip_devs is NULL, clip_push() then crashes when reading skb->truesize.
Fixes 93a2014afbac ("atm: fix a UAF in lec_arp_clear_vccs()")
Reported-by [email protected]
Signed-off-by Eric Dumazet <[email protected]>
Cc Cong Wang <[email protected]>
Cc Gengming Liu <[email protected]>
--- net/atm/clip.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
net/atm/clip.c +5 -6
@@ -193,12 +193,6 @@ static void clip_push(struct atm_vcc *vcc, struct sk_buff *skb)pr_debug ("\n" ); -if (!clip_devs) { -atm_return (vcc, skb->truesize); -kfree_skb (skb); -return ; - } -if (!skb) {pr_debug ("removing VCC %p\n" , clip_vcc);if (clip_vcc->entry)
@@ -208,6 +202,11 @@ static void clip_push(struct atm_vcc *vcc, struct sk_buff *skb)return ; }atm_return (vcc, skb->truesize); +if (!clip_devs) { +kfree_skb (skb); +return ; + } + skb->dev = clip_vcc->entry ? clip_vcc->entry->neigh->dev : clip_devs;/* clip_vcc->entry == NULL if we don't have an IP address yet */ if (!skb->dev) {
Signature · 1 line
2.50.0.rc2.701.gf1e915cc24-goog
Quoted 6 lines · Eric Dumazet
Blamed commit missed that
vcc_destroy_socket()callsclip_push()with a NULL skb.If
clip_devsis NULL,clip_push()then crashes when readingskb->truesize.
Quoted 6 lines
Fixes 93a2014afbac ("atm: fix a UAF in lec_arp_clear_vccs()")Reported-by [email protected]Signed-off-by Eric Dumazet <[email protected]>Cc Cong Wang <[email protected]>Cc Gengming Liu <[email protected]>
Reviewed-by Simon Horman <[email protected]>
This patch was applied to netdev/net.git (main) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <[email protected]>:
Quoted 6 lines · On Fri, 20 Jun 2025 14:28:44 +0000 you wrote:
Blamed commit missed that
vcc_destroy_socket()callsclip_push()with a NULL skb.If
clip_devsis NULL,clip_push()then crashes when readingskb->truesize.
Quoted 8 lines
Fixes 93a2014afbac ("atm: fix a UAF in lec_arp_clear_vccs()")Reported-by [email protected]Signed-off-by Eric Dumazet <[email protected]>Cc Cong Wang <[email protected]>Cc Gengming Liu <[email protected]>[...]
Here is the summary with links:
- [net] atm: clip: prevent NULL deref in clip_push()
https://git.kernel.org/netdev/net/c/b993ea46b3b6
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html