Re: HIDDEV: potential NULL dereference

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

 



On Thu, 9 Sep 2010, anil joshi wrote:

> 
> 
> On Thu, Sep 9, 2010 at 7:59 PM, anil joshi <anilsjoshi123@xxxxxxxxx> wrote:
>        hid->dev.parent is "usb_interfae"  pointer is kfree  in  usb_release_interfece 
> hid_to_usb_dev(dev) accessing hid->dev.parent 
> 
> I have tested this,while removing  hid device  
> 
> usb_release_interfece is belonging to khubd  process 
> 
> I get many use full information  from  Jiri Kosina, Markus Trippelsdorf, regarding this issue
> from http://kerneltrap.org/mailarchive/linux-kernel/2010/8/12/4606155/thread#mid-4606155
> 
> To avoid  NULL deference problem 
> 
> hiddev->exist is zero before usb_deregister_dev  call in  hiddev_disconnected  function there fore
> we could use
> static long hiddev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
> {
> 
> 
>      if (hiddev->exist) {
>          hid_to_usb_dev(dev);
>        } else {
>             return -EIO
>    }
> 
> 
> Thanks to Markus Trippelsdorf , Jiri Kosina 

Hi Anil,

could you please send a proper patch (diff against current kernel) and a 
short changelog entry with the explanation, so that I could easily 
understand what you are proposing?

Thanks!

-- 
Jiri Kosina
SUSE Labs, Novell Inc.
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux