• Tim Gardner's avatar
    brcmsmac: avoid 512 byte stack variable · 0d61c917
    Tim Gardner authored
    Dynamically allocate the probe response template which
    avoids potential stack corruption. Observed with smatch:
    
    drivers/net/wireless/brcm80211/brcmsmac/main.c:7412 brcms_c_bss_update_probe_resp()
     warn: 'prb_resp' puts 512 bytes on stack
    
    Cc: Brett Rudley <brudley@broadcom.com>
    Cc: Arend van Spriel <arend@broadcom.com>
    Cc: "Franky (Zhenhui) Lin" <frankyl@broadcom.com>
    Cc: Hante Meuleman <meuleman@broadcom.com>
    Cc: "John W. Linville" <linville@tuxdriver.com>
    Cc: Seth Forshee <seth.forshee@canonical.com>
    Cc: Pieter-Paul Giesberts <pieterpg@broadcom.com>
    Cc: Hauke Mehrtens <hauke@hauke-m.de>
    Cc: linux-wireless@vger.kernel.org
    Cc: brcm80211-dev-list@broadcom.com
    Cc: netdev@vger.kernel.org
    Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
    Acked-by: default avatarArend van Spriel <arend@broadcom.com>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    0d61c917
main.c 210 KB