** Also affects: lxc (Ubuntu Noble) Importance: Undecided Status: New
** Also affects: lxc (Ubuntu Oracular) Importance: Undecided Status: New ** Also affects: lxc (Ubuntu Plucky) Importance: Undecided Assignee: Sudip Mukherjee (sudipmuk) Status: In Progress ** Changed in: lxc (Ubuntu Noble) Status: New => In Progress ** Changed in: lxc (Ubuntu Oracular) Status: New => In Progress ** Changed in: lxc (Ubuntu Noble) Assignee: (unassigned) => Sudip Mukherjee (sudipmuk) ** Changed in: lxc (Ubuntu Oracular) Assignee: (unassigned) => Sudip Mukherjee (sudipmuk) -- 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: lxc-excecute NULL pointer dereference causes segfault when sharing rootfs with host Status in lxc: Fix Released Status in lxc package in Ubuntu: In Progress Status in lxc source package in Noble: In Progress Status in lxc source package in Oracular: In Progress Status in lxc source package in Plucky: In Progress Status in lxc package in Debian: New 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