LXC-unshare network namespace segfaulting
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxc (Ubuntu) |
Fix Released
|
Medium
|
Serge Hallyn | ||
Precise |
Fix Released
|
Undecided
|
Unassigned | ||
Quantal |
Fix Released
|
Medium
|
Serge Hallyn |
Bug Description
============ SRU justification ============
Impact: lxc-unshare segfaults when run with no command
Development fix: exit with a failure message if no command is givne.
Stable fix: same as development fix
Test case:
sudo lxc-unshare -s MOUNT
dmesg | tail
without the fix, the command will silently return, while dmesg
will show a segfault. With the fix, lxc-unshare will warn that
a command is required.
Regression potential:
None.
=======
root@ubuntu:~# lxc-unshare -s NETWORK
root@ubuntu:~# tail -1 /var/log/syslog
Jun 11 14:54:07 ubuntu kernel: [ 9386.305870] lxc-unshare[21539]: segfault at 0 ip 00007f0fc03aea52 sp 00007fff63819f00 error 4 in libc-2.
and is not creating a new network namespace
Changed in lxc (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → High |
importance: | High → Medium |
Changed in lxc (Ubuntu Quantal): | |
assignee: | nobody → Serge Hallyn (serge-hallyn) |
status: | Triaged → In Progress |
description: | updated |
Thanks for reporting this bug.
The problem is (I believe) that lxc-unshare isn't properly handling the case where no arguments are specified. As a workaround, do
lxc-unshare -s NETWORK /bin/bash
and you'll get a root prompt in the new namespace.