Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1573792

Re: rtlwifi: rtl8192c_common: "BUG: KASAN: slab-out-of-bounds"

From Larry Finger <Larry.Finger@lwfinger.net>
Newsgroups linux.kernel
Subject Re: rtlwifi: rtl8192c_common: "BUG: KASAN: slab-out-of-bounds"
Date 2017-02-05 02:10 +0100
Message-ID <t7jv3-pw-3@gated-at.bofh.it> (permalink)
References <t7arL-2kx-9@gated-at.bofh.it> <t7bQS-3ae-17@gated-at.bofh.it> <t7dzj-4ww-1@gated-at.bofh.it> <t7elH-564-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 02/04/2017 01:32 PM, Dmitry Osipenko wrote:
> On 04.02.2017 21:41, Larry Finger wrote:
>> On 02/04/2017 10:58 AM, Dmitry Osipenko wrote:
>>> Seems the problem is caused by rtl92c_dm_*() casting .priv to "struct
>>> rtl_pci_priv", while it is "struct rtl_usb_priv".
>>
>> Those routines are shared by rtl8192ce and rtl8192cu, thus we need to make that
>> difference in cast to be immaterial. I think we need to move "struct
>> bt_coexist_info" to the beginning of both rtlpci_priv and rtl_usb_priv. Then it
>> should not matter.
>>
>> I do not have a gcc version new enough to turn KASAN testing on, thus the
>> attached patch is only compile tested. Does it fix the problem?
>
> Thank you for the patch, it indeed fixes the bug.
>
> I noticed that struct rtl_priv contains .btcoexist, isn't it duplicated in the
> struct rtl_pci_priv?

Thanks for testing. When I submit the patch, is it OK to cite your reporting and 
testing?

Yes, the bt_coexist_info structure is in two different places. I will change the 
code in rtl8192c-common and rtl8192ce to use only the one in rtlpriv. That 
should satisfy the problem you reported, as well as clean up the code.

Thanks again,

Larry

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

rtlwifi: rtl8192c_common: "BUG: KASAN: slab-out-of-bounds" Dmitry Osipenko <digetx@gmail.com> - 2017-02-04 16:30 +0100
  Re: rtlwifi: rtl8192c_common: "BUG: KASAN: slab-out-of-bounds" Dmitry Osipenko <digetx@gmail.com> - 2017-02-04 18:00 +0100
    Re: rtlwifi: rtl8192c_common: "BUG: KASAN: slab-out-of-bounds" Larry Finger <Larry.Finger@lwfinger.net> - 2017-02-04 19:50 +0100
      Re: rtlwifi: rtl8192c_common: "BUG: KASAN: slab-out-of-bounds" Dmitry Osipenko <digetx@gmail.com> - 2017-02-04 20:40 +0100
        Re: rtlwifi: rtl8192c_common: "BUG: KASAN: slab-out-of-bounds" Larry Finger <Larry.Finger@lwfinger.net> - 2017-02-05 02:10 +0100
          Re: rtlwifi: rtl8192c_common: "BUG: KASAN: slab-out-of-bounds" Dmitry Osipenko <digetx@gmail.com> - 2017-02-05 12:40 +0100
            Re: rtlwifi: rtl8192c_common: "BUG: KASAN: slab-out-of-bounds" Larry Finger <Larry.Finger@lwfinger.net> - 2017-02-05 18:40 +0100
              Re: rtlwifi: rtl8192c_common: "BUG: KASAN: slab-out-of-bounds" Dmitry Osipenko <digetx@gmail.com> - 2017-02-05 19:20 +0100
              Re: rtlwifi: rtl8192c_common: "BUG: KASAN: slab-out-of-bounds" Tobias Guggenmos <slartibartfas421@gmail.com> - 2017-02-07 18:30 +0100
                Re: rtlwifi: rtl8192c_common: "BUG: KASAN: slab-out-of-bounds" Dmitry Osipenko <digetx@gmail.com> - 2017-02-07 18:50 +0100
      Re: rtlwifi: rtl8192c_common: "BUG: KASAN: slab-out-of-bounds" Johannes Berg <johannes@sipsolutions.net> - 2017-02-06 11:30 +0100
        Re: rtlwifi: rtl8192c_common: "BUG: KASAN: slab-out-of-bounds" Larry Finger <Larry.Finger@lwfinger.net> - 2017-02-06 16:50 +0100
          Re: rtlwifi: rtl8192c_common: "BUG: KASAN: slab-out-of-bounds" Tobias Guggenmos <slartibartfas421@gmail.com> - 2017-02-07 18:00 +0100
            Re: rtlwifi: rtl8192c_common: "BUG: KASAN: slab-out-of-bounds" Dmitry Osipenko <digetx@gmail.com> - 2017-02-07 18:20 +0100
            Re: rtlwifi: rtl8192c_common: "BUG: KASAN: slab-out-of-bounds" Larry Finger <Larry.Finger@lwfinger.net> - 2017-02-08 02:00 +0100

csiph-web