[Bug 1072009] [NEW] mkinitramfs does not use cpio -L (--dereference)

Bela Lubkin 1072009 at bugs.launchpad.net
Sat Oct 27 08:18:15 UTC 2012


Public bug reported:

This may be related to LP#327106, which was recommending to remove
--dereference (but the resolution in that bug doesn't show it being
implemented at that time).  Problem is present in Ubuntu 11.10 and
12.04, all I have immediately handy at the moment to check; and appears
to be the same in current 13.04 developmental source.

Consequence: initrd on my 11.10 and 12.04 systems have dangling
symlinks:

$ xzcat /boot/initrd.img-3.2.0-32-generic | cpio -itv | grep '. -> /'
lrwxrwxrwx   1 root     root           41 Mar 13  2012 etc/modprobe.d/blacklist-oss.conf -> /lib/linux-sound-base/noOSS.modprobe.conf
lrwxrwxrwx   1 root     root           42 Jul 11  2011 etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf -> /etc/alternatives/x86_64-linux-gnu_gl_conf
lrwxrwxrwx   1 root     root           40 Mar 13  2012 etc/ld.so.conf.d/i386-linux-gnu_GL.conf -> /etc/alternatives/i386-linux-gnu_gl_conf
lrwxrwxrwx   1 root     root           12 Oct 19 02:50 sbin/mount.ntfs-3g -> /bin/ntfs-3g
lrwxrwxrwx   1 root     root           12 Oct 19 02:50 sbin/mount.ntfs -> /bin/ntfs-3g

The `mount.ntfs` links are fine as /bin/ntfs-3g itself exists in the
archive.  The other three point to files which do not exist.

I'm not sure if any of them have a *practical* impact.  But other
symlinks could exist, depending on system configuration, user meddling
etc.

LP#327106 included patch code which appears to completely fix this
issue.  It didn't just get rid of "--dereference", it replaced it with
shell code to reach out and copy the contents of files which would
otherwise have become dangling symlinks.  Suggest revisiting that part
of the patch (see
https://launchpadlibrarian.net/22398738/mkinitramfs.diff)

** Affects: initramfs-tools (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to initramfs-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1072009

Title:
  mkinitramfs does not use cpio -L (--dereference)

Status in “initramfs-tools” package in Ubuntu:
  New

Bug description:
  This may be related to LP#327106, which was recommending to remove
  --dereference (but the resolution in that bug doesn't show it being
  implemented at that time).  Problem is present in Ubuntu 11.10 and
  12.04, all I have immediately handy at the moment to check; and
  appears to be the same in current 13.04 developmental source.

  Consequence: initrd on my 11.10 and 12.04 systems have dangling
  symlinks:

  $ xzcat /boot/initrd.img-3.2.0-32-generic | cpio -itv | grep '. -> /'
  lrwxrwxrwx   1 root     root           41 Mar 13  2012 etc/modprobe.d/blacklist-oss.conf -> /lib/linux-sound-base/noOSS.modprobe.conf
  lrwxrwxrwx   1 root     root           42 Jul 11  2011 etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf -> /etc/alternatives/x86_64-linux-gnu_gl_conf
  lrwxrwxrwx   1 root     root           40 Mar 13  2012 etc/ld.so.conf.d/i386-linux-gnu_GL.conf -> /etc/alternatives/i386-linux-gnu_gl_conf
  lrwxrwxrwx   1 root     root           12 Oct 19 02:50 sbin/mount.ntfs-3g -> /bin/ntfs-3g
  lrwxrwxrwx   1 root     root           12 Oct 19 02:50 sbin/mount.ntfs -> /bin/ntfs-3g

  The `mount.ntfs` links are fine as /bin/ntfs-3g itself exists in the
  archive.  The other three point to files which do not exist.

  I'm not sure if any of them have a *practical* impact.  But other
  symlinks could exist, depending on system configuration, user meddling
  etc.

  LP#327106 included patch code which appears to completely fix this
  issue.  It didn't just get rid of "--dereference", it replaced it with
  shell code to reach out and copy the contents of files which would
  otherwise have become dangling symlinks.  Suggest revisiting that part
  of the patch (see
  https://launchpadlibrarian.net/22398738/mkinitramfs.diff)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1072009/+subscriptions




More information about the foundations-bugs mailing list