group.of.nepali.translators team mailing list archive
-
group.of.nepali.translators team
-
Mailing list archive
-
Message #16894
[Bug 1699161] Re: lshw crashes with SEGV in privileged containers
Update:
I've been asked to look at this problem
It does segfault on Xenial, but it is also reproducible using Zesty
privileged container.
In fact, it is a behavior not yet reported nor fix upstream. I can
confirm it by having tested the reproducer against the latest and
greatest compiled by hand lshw binary using Xenial privileged container.
It tries to open '/sys/kernel/debug/usb/devices' that exist but doesn't
have permission to be fopen and then try '/proc/bus/usb/devices' which
doesn't exist. I agree with Rafael that there must be a better mechanism
to be protected against this situation.
--
root@priv:/tmp/lshw# ls -altr /proc/bus/usb/devices
ls: cannot access '/proc/bus/usb/devices': No such file or directory
root@priv:/tmp/lshw# ls -altr /sys/kernel/debug/usb/devices
-r--r--r-- 1 root root 0 Oct 11 11:19 /sys/kernel/debug/usb/devices
root@priv:/tmp/lshw# cat /sys/kernel/debug/usb/devices
cat: /sys/kernel/debug/usb/devices: Permission denied
---
So this look like it'll need to be fix upstream first.
I'll start to look at it.
I tried to create a new ticket with ezIX without success, their tracker is giving me errors.
I have emailed Lyonel Vincent, so he can hopefully file the bug on our behalf.
- Eric
** Also affects: lshw (Ubuntu Artful)
Importance: Medium
Assignee: Rafael David Tinoco (inaddy)
Status: Confirmed
** Also affects: lshw (Ubuntu Zesty)
Importance: Undecided
Status: New
** Changed in: lshw (Ubuntu Zesty)
Status: New => Confirmed
** Changed in: lshw (Ubuntu Xenial)
Status: New => Confirmed
--
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1699161
Title:
lshw crashes with SEGV in privileged containers
Status in lshw package in Ubuntu:
Confirmed
Status in lshw source package in Xenial:
Confirmed
Status in lshw source package in Zesty:
Confirmed
Status in lshw source package in Artful:
Confirmed
Bug description:
When running lshw in a Xenial container, I'm getting a segmentation
fault. I'll attach the apport crash dump.
```
stgraber@castiana:~$ lxc launch ubuntu:16.04 priv -c security.privileged=true
Creating priv
Starting priv
stgraber@castiana:~$ lxc exec priv bash
root@priv:~# lshw
Segmentation fault
root@priv:~#
```
[strace of lshw]
open("/usr/share/hwdata/usb.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/usb.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/usb.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/share/usb.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/lshw-common/usb.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/usb.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/sys/kernel/debug/usb/devices", O_RDONLY) = -1 EACCES (Permission denied)
open("/proc/bus/usb/devices", O_RDONLY) = -1 ENOENT (No such file or directory)
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0} ---
+++ killed by SIGSEGV +++
Segmentation fault
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lshw/+bug/1699161/+subscriptions