Hello Phil, or anyone else affected,

Accepted lxc into noble-proposed. The package will build now and be
available at https://launchpad.net/ubuntu/+source/lxc/1:5.0.3-2ubuntu7.1
in a few hours, and then in the -proposed repository.

Please help us by testing this new package.  See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed.  Your feedback will aid us getting this
update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, what testing has been
performed on the package and change the tag from verification-needed-
noble to verification-done-noble. If it does not fix the bug for you,
please add a comment stating that, and change the tag to verification-
failed-noble. In either case, without details of your testing we will
not be able to proceed.

Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification .  Thank you in
advance for helping!

N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/2081762

Title:
  [SRU] lxc-excecute NULL pointer dereference causes segfault when
  sharing rootfs with host

Status in lxc:
  Fix Released
Status in lxc package in Ubuntu:
  Fix Released
Status in lxc source package in Noble:
  Fix Committed
Status in lxc source package in Oracular:
  Fix Committed
Status in lxc source package in Plucky:
  Fix Released
Status in lxc package in Debian:
  New

Bug description:
  [ Impact ]

  lxc-execute will crash with a segfault if the user tries to use the
  host rootfs as a shared rootfs.

  $ sudo lxc-execute -n lxc-test-1 -f lxc.conf -l TRACE -- ls /usr
  Segmentation fault

  [ Test Plan ]

  install lxc

  $ cat > lxc.conf <<EOF
  lxc.uts.name=lxc-test-1
  lxc.net.0.type = empty
  lxc.console.path = none
  lxc.tty.max = 1
  lxc.pty.max = 128
  lxc.mount.auto = proc:rw sys cgroup
  lxc.autodev = 1
  EOF

  $ sudo lxc-execute -n lxc-test-1 -f lxc.conf -l TRACE -- ls /usr

  If the package is fixed, it will display output from 'ls'.

  [ Where problems could occur ]

  This is an upstream patch which is only checking if a pointer is not
  NULL before dereferencing it. There is no other change in the code
  apart from this pointer check. There is very minimum chance of any
  regression due to this change.

  [ Other Info ]

  It is now fixed in Plucky.
  Even though Debian has an updated 1:6.0.2-1, but the issue is still 
reproducible on Debian.

  [ Original Bug Description ]

  lsb_release -rd:
  Description:  Ubuntu 24.04.1 LTS
  Release:      24.04

  lxc-start --version: 5.0.3

  Issue: lxc-execute segfaults when using a shared host rootfs due to a
  NULL pointer deference.

  In lxc/src/lxc/conf.c - lines 339 - 344

  The call to lxc_storage_prepare detects no rootfs path and returns
  without calling storage_init

  In lxc/src/lxc/conf.c - lines 293 - 310

  leaving rootfs->storage null.

  Then dereferencing rootfs->storage->type causes a segfault.

  Steps to reproduce:
  1. use lxc.conf:
     lxc.uts.name=lxc-test-1
     lxc.net.0.type = empty
     lxc.console.path = none
     lxc.tty.max = 1
     lxc.pty.max = 128
     lxc.mount.auto = proc:rw sys cgroup
     lxc.autodev = 1

  2. Run:
     $ sudo lxc-execute -n lxc-test-1 -f lxc.conf  -l TRACE -- ls /dev
     Segmentation fault

  I've attached a patch as a possible fix.  Running the same example
  above with the patch applied runs without crashing.

To manage notifications about this bug go to:
https://bugs.launchpad.net/lxc/+bug/2081762/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to