Skip to content

Commit 5518b29

Browse files
Jiri Slabydavem330
authored andcommitted
ATM: mpc, fix use after free
Stanse found that mpc_push frees skb and then it dereferences it. It is a typo, new_skb should be dereferenced there. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent f1ee89d commit 5518b29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/atm/mpc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ static void mpc_push(struct atm_vcc *vcc, struct sk_buff *skb)
778778
eg->packets_rcvd++;
779779
mpc->eg_ops->put(eg);
780780

781-
memset(ATM_SKB(skb), 0, sizeof(struct atm_skb_data));
781+
memset(ATM_SKB(new_skb), 0, sizeof(struct atm_skb_data));
782782
netif_rx(new_skb);
783783
}
784784

0 commit comments

Comments
 (0)