[lkml]   [2010]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[66/98] p54pci: rx frame length check
    2.6.32-stable review patch.  If anyone has any objections, please let us know.


    From: Christian Lamparter <>

    commit f5300e04df78feae8107c1846dd3a9e27c071b2f upstream.

    A long time ago, a user reported several crashes due to
    data corruptions which are likely the result of a
    not-100%-supported, or faulty? PCI bridge.
    ( )

    This patch fixes entry #1.
    "1. p54p_check_rx_ring - skb_over_panic: Under a ping flood
    or just left running for a bit would panic with a skb_over_panic."
    As described in the mail: The invalid frame length causes
    skb_put to bailout and trigger a crash.

    Simply dropping the frame is problematic, because if its content
    contains a tx feedback we would lose some portion of the device
    memory space.... And the driver/mac80211 should handle all other
    invalid data.

    Reported-by: Quintin Pitts <>
    Signed-off-by: Christian Lamparter <>
    Signed-off-by: John W. Linville <>
    Signed-off-by: Greg Kroah-Hartman <>

    drivers/net/wireless/p54/p54pci.c | 8 ++++++++
    1 file changed, 8 insertions(+)

    --- a/drivers/net/wireless/p54/p54pci.c
    +++ b/drivers/net/wireless/p54/p54pci.c
    @@ -205,6 +205,14 @@ static void p54p_check_rx_ring(struct ie
    i %= ring_limit;
    + if (unlikely(len > priv->common.rx_mtu)) {
    + if (net_ratelimit())
    + dev_err(&priv->pdev->dev, "rx'd frame size "
    + "exceeds length threshold.\n");
    + len = priv->common.rx_mtu;
    + }
    skb_put(skb, len);

    if (p54_rx(dev, skb)) {

     \ /
      Last update: 2010-05-12 10:17    [W:0.062 / U:6.168 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site