mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 01:49:36 +00:00
3c515: Write outside array bounds
if dev_alloc_skb() fails on the first iteration, a write to cp->rx_ring[-1] occurs. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
2a8aaacda5
commit
3d54015b75
1 changed files with 3 additions and 1 deletions
|
@ -832,7 +832,9 @@ static int corkscrew_open(struct net_device *dev)
|
|||
skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */
|
||||
vp->rx_ring[i].addr = isa_virt_to_bus(skb->data);
|
||||
}
|
||||
vp->rx_ring[i - 1].next = isa_virt_to_bus(&vp->rx_ring[0]); /* Wrap the ring. */
|
||||
if (i != 0)
|
||||
vp->rx_ring[i - 1].next =
|
||||
isa_virt_to_bus(&vp->rx_ring[0]); /* Wrap the ring. */
|
||||
outl(isa_virt_to_bus(&vp->rx_ring[0]), ioaddr + UpListPtr);
|
||||
}
|
||||
if (vp->full_bus_master_tx) { /* Boomerang bus master Tx. */
|
||||
|
|
Loading…
Reference in a new issue