lkml.org 
[lkml]   [2012]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[ 59/73] ath9k: stop on rates with idx -1 in ath9k rate controls .tx_status
    3.0-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Pavel Roskin <proski@gnu.org>

    commit 2504a6423b9ab4c36df78227055995644de19edb upstream.

    Rate control algorithms are supposed to stop processing when they
    encounter a rate with the index -1. Checking for rate->count not being
    zero is not enough.

    Allowing a rate with negative index leads to memory corruption in
    ath_debug_stat_rc().

    One consequence of the bug is discussed at
    https://bugzilla.redhat.com/show_bug.cgi?id=768639

    Signed-off-by: Pavel Roskin <proski@gnu.org>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/net/wireless/ath/ath9k/rc.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/drivers/net/wireless/ath/ath9k/rc.c
    +++ b/drivers/net/wireless/ath/ath9k/rc.c
    @@ -1328,7 +1328,7 @@ static void ath_tx_status(void *priv, st
    fc = hdr->frame_control;
    for (i = 0; i < sc->hw->max_rates; i++) {
    struct ieee80211_tx_rate *rate = &tx_info->status.rates[i];
    - if (!rate->count)
    + if (rate->idx < 0 || !rate->count)
    break;

    final_ts_idx = i;



    \
     
     \ /
      Last update: 2012-02-28 02:35    [W:0.031 / U:0.528 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site