[Regression] crash in scan_dmi_sysfs when running as non-root
Bug #1590994 reported by
dann frazier
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lshw |
Unknown
|
Unknown
|
|||
lshw (Ubuntu) |
Fix Released
|
High
|
dann frazier | ||
Xenial |
Fix Released
|
High
|
dann frazier |
Bug Description
[Impact]
lshw crashes when run as non-root:
Though it does warn before crashing that it should be run as super-user, it should fail gracefully - not abort and dump core. A number of users have been hitting this since the regression has been introduced:
https:/
[Test Case]
ubuntu@lshw:~$ lshw
WARNING: you should run this program as super-user.
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Aborted (core dumped)
[Regression Risk]
The fix I've proposed[*] only comes into play when lshw is about to crash, so regression risk should be minimal.
To post a comment you must log in.
This impacts upstream; I've submitted a bug (stuck in moderation) and a pull request. I'll give upstream a day or so to digest to see if we can incorporate an upstream-accepted fix.