Skip to content

Commit

Permalink
[PATCH] Use after free in net/tulip/de2104x.c
Browse files Browse the repository at this point in the history
hi,

this fixes coverity bug #912, where skb is freed first,
and dereferenced a few lines later with skb->len.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Eric Sesterhenn authored and Jeff Garzik committed Mar 23, 2006
1 parent 494aced commit 5185c7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/tulip/de2104x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1327,11 +1327,11 @@ static void de_clean_rings (struct de_private *de)
struct sk_buff *skb = de->tx_skb[i].skb;
if ((skb) && (skb != DE_DUMMY_SKB)) {
if (skb != DE_SETUP_SKB) {
dev_kfree_skb(skb);
de->net_stats.tx_dropped++;
pci_unmap_single(de->pdev,
de->tx_skb[i].mapping,
skb->len, PCI_DMA_TODEVICE);
dev_kfree_skb(skb);
} else {
pci_unmap_single(de->pdev,
de->tx_skb[i].mapping,
Expand Down

0 comments on commit 5185c7c

Please sign in to comment.