8250_pci.c, parport_serial.c, __devinit and !CONFIG_HOTPLUG

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

 



Hi all,

I've spotted a case where functions marked as __devinit may be used
after being freed.

8250_pci.c contains find_quirk() which is accessing
pci_serial_quirks[]. The functions pointed to by
pci_serial_quirks[x].init are marked as __devinit.

8250_pci.c exports pciserial_init_ports() which is using find_quirk().
pciserial_init_ports() may be used after __devinit data has been freed
from the module.

If parport_serial gets loaded after 8250_pci and CONFIG_HOTPLUG is
disabled and the quirk table is matching then we might call a
non-existing function.

I may of course be wrong, but it does look like a use-after-free
problem to me. I discovered this by running modpost on a vmlinux that
contains relocation information.

/ magnus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux