group.of.nepali.translators team mailing list archive
-
group.of.nepali.translators team
-
Mailing list archive
-
Message #18837
[Bug 1471983] Re: USB HDD makes lshw seg-fault when run as root
This bug was fixed in the package lshw - 02.17-1.1ubuntu3.3
---------------
lshw (02.17-1.1ubuntu3.3) xenial; urgency=medium
* Fix situation where lshw segfaults, when there is an external
USB 3.0 drive connected to the system. (LP: #1471983)
- d/p/fix-701-SCSI-inquiry-fails-on-IA64.patch:
use uint8_t instead of char where unsigned is needed.
-- Dan Streetman <dan.streetman@xxxxxxxxxxxxx> Thu, 19 Oct 2017
10:19:02 -0400
** Changed in: lshw (Ubuntu Xenial)
Status: Fix Committed => Fix Released
--
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/1471983
Title:
USB HDD makes lshw seg-fault when run as root
Status in lshw package in Ubuntu:
Fix Released
Status in lshw source package in Trusty:
Fix Released
Status in lshw source package in Vivid:
Won't Fix
Status in lshw source package in Wily:
Fix Released
Status in lshw source package in Xenial:
Fix Released
Status in lshw source package in Artful:
Fix Released
Bug description:
[Impact]
Scenario #1:
* When there is an external USB External Drive[1] connected to the system, 'lshw' command segfaults.
Scenario #2:
* In the Landscape context, 'lshw' is use for Landscape clients[2] HW inventory ... if an USB External Drive[1] is connected on a Trusty Landscape client, lshw will segfault, thus Landcape inventory for this computer won't be reported/updated.
[1] - In this case :
Patriot 32GB Supersonic Rage Series USB 3.0 Flash Drive
[2] - landscape-client
landscape/manager/hardwareinfo.py: command = "/usr/bin/lshw"
[Test Case]
Scenario #1:
* Install Ubuntu Trusty/14.04 LTS
* Install lshw
- sudo apt-get install lshw -y
* Connect the USB 3.0 external drive to the system from where 'lshw' will be executed.
* Execute 'lshw' or any other tools that uses 'lshw' behind the scene. (Example : Landscape computer inventory, ...)
Scenario #2:
* Install Ubuntu Trusty/14.04 LTS
* Install landscape-client
* Register the computer to the Landscape (Dedicated server or hosted)
* Client HW inventory won't happen and system will store a 'lshw' crash file under /var/crash.
[Regression Potential]
* Risk is low, the upstream commit has been specifically made
upstream to fix this problem, and the fix is part of 'lshw' Ubuntu
package since 2015, Wily. I don't know why Trusty never been SRU'd at
the same time, but it's never too late to fix it now that we have
users facing this problem in Trusty/14.04 (LTS)
* It's been ~3 years now since the patch has been first introduced in
lshw upstream, and since then no known regression or else has been
reporter against this specific commit.
* Debian has the fix.
* The code changed by this patch handles querying the serial number,
so regression in this area may cause incorrect or missing serial
number(s) to be reported by lshw.
[Other Info]
* Upstream commits :
https://ezix.org/src/pkg/lshw/commit/d048d300b5daeb44887a7fc06ddeb120119cac8a
https://ezix.org/src/pkg/lshw/commit/7b57987bb21d8c178c9beba1f5a574eb0af18e54
* Bugs:
http://www.ezix.org/project/ticket/653
http://www.ezix.org/project/ticket/701
[Original Description]
The HDD enclosure causing this is the 'ORICO 2.5 inch USB 3.0'
As seen here http://www.amazon.co.uk/dp/B00BH83LYG/
When the enclosure is plugged in, the lshw command runs fine as a
plain user, but when run as root with either 'sudo su', 'sudo -i' or
just 'sudo' (I tried all to be sure), lshw starts the normal process
of scanning through the stuff it scans, but instead of outputting any
information, it seg-faults with the message "Segmentation Fault".
When I unplug the HDD enclosure, lshw then runs fine as root.
This problem occurs both with USB 3.0 and USB 2.0, and has been tested on an AMD 64-bit machine running Xubuntu 14.04 (upgraded from 12.04).
I also tested on an older Intel 32-bit machine running Xubuntu 14.04 and got the same problem, except this time the message was different;
"
terminate called after throwing an instance of 'std::length_error'
what(): basic_string::_S_create
"
I have pasted an extract from dmesg (from the AMD 64-bit machine) here:
http://pastebin.com/mTfJV04k
of which mentions lshw with some information about the USB device.
(this is my first ever bug report, so apologies in advanced if I made any mistakes)
(Package version lshw 02.16-2ubuntu1.2)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lshw/+bug/1471983/+subscriptions