Search Linux Wireless

Re: [PATCH] rfkill: Fix use-after-free in rfkill_resume()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2020-11-10 at 16:49 +0800, Claire Chang wrote:
> If a device is getting removed or reprobed during resume, use-after-free
> might happen. For example, h5_btrtl_resume()[drivers/bluetooth/hci_h5.c]
> schedules a work queue for device reprobing. During the reprobing, if
> rfkill_set_block() in rfkill_resume() is called after the corresponding
> *_unregister() and kfree() are called, there will be an use-after-free
> in hci_rfkill_set_block()[net/bluetooth/hci_core.c].


Not sure I understand. So you're saying

 * something (h5_btrtl_resume) schedules a worker
 * said worker run, when it runs, calls rfkill_unregister()
 * somehow rfkill_resume() still gets called after this

But that can't really be right, device_del() removes it from the PM
lists?

johannes





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux