LVM2 segfault w/devfs on amd64

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

 



The LVM2 tools (e.g., vgscan) segfault on an x86_64/amd64 system if
devfs is used, unless /dev/md* are filtered out.  Also, after the
first attempt has segfaulted, subsequent attempts will hang, consuming
100% of CPU until killed; this continues until the system is
rebooted.  I can reproduce this reliably on a Gentoo system.

I have tracked the segfault down to line 71 of lib/filters/filter.c,
which in my version of the source is:

[...]
  if (!(((int *) f->private)[MAJOR(dev->dev)])) {
[...]

It appears that the code assumes that all device major numbers will be
< 256, and does not check that this is true before indexing that
array, and so when the device major number is >=256, as it can be with
devfs and also, I believe, udev, there is a segmentation fault.  I'm
not sure what's causing subsequent invocations to hang; I didn't
bother to dig into that.

Even though devfs is officially deprecated, I believe this issue
should definitely be fixed, since it could happen also with udev.
Shall I file a bug, or is this a known issue?

I initially filed this as a bug against Gentoo, which can be viewed
at: http://bugs.gentoo.org/show_bug.cgi?id=58798


Thanks,

Randall Nortman
_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux