[lkml]   [2014]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[BUG] rtl8192se: panic accessing unmapped memory in skb

I have a RTL8192SE wireless card, attached via PCI. Usually it works with no
issues, but I recently had a kernel panic occur in the rtl8192se driver. The
kernel version is 3.18. Based on my analysis of the panic dump, the panic was
caused by a memory access violation in this block of code in

if (stats->decrypted) {
hdr = (struct ieee80211_hdr *)(skb->data +
stats->rx_drvinfo_size + stats->rx_bufshift);

if ((_ieee80211_is_robust_mgmt_frame(hdr)) &&
rx_status->flag &= ~RX_FLAG_DECRYPTED;
rx_status->flag |= RX_FLAG_DECRYPTED;

Specifically, the violation occurred the first time hdr->frame_control was
accessed, as part of _ieee80211_is_robust_mgmt_frame().

The panic occurred when the system was under heavy filesystem load but seemingly
is not easily reproducible.

There was recently a NULL check that was removed from this exact place in the
code, but it was certainly useless. Instead, what's much more suspect to me is
that inside _rtl_pci_rx_interrupt(), there is no error checking of the return
value of _rtl_pci_init_one_rxdesc(), which might fail if the skb couldn't be
allocated. I am wondering if this could be causing the problem.


 \ /
  Last update: 2014-12-21 18:41    [W:0.034 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site