lscpu crashs when /dev/mem is not stable to read

Bug #1674258 reported by Ike Panhc
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
util-linux (Ubuntu)
Fix Released
Undecided
Ike Panhc
Xenial
Fix Released
Undecided
Ike Panhc
Yakkety
Fix Released
Undecided
Ike Panhc
Zesty
Fix Released
Undecided
Ike Panhc

Bug Description

[Impact]

 * Read from /dev/mem and scan DMI tables is dangerous, if /dev/mem is not stable to read, it will cause lscpu crash.

[Test Case]

 * `sudo lscpu` shall not cause Segmentation fault (core dumped)

[Regression Potential]

 * Reading from DMI tables is sysfs is more stable then reading from /dev/mem and if DMI tables is not available lscpu will use the old way to search in /dev/mem. I believe its low regression risk

Ike Panhc (ikepanhc)
Changed in util-linux (Ubuntu):
assignee: nobody → Ike Panhc (ikepanhc)
Revision history for this message
Ike Panhc (ikepanhc) wrote :
Changed in util-linux (Ubuntu):
status: New → In Progress
Ike Panhc (ikepanhc)
Changed in util-linux (Ubuntu Xenial):
status: New → In Progress
Changed in util-linux (Ubuntu Yakkety):
status: New → In Progress
Changed in util-linux (Ubuntu Zesty):
status: New → In Progress
assignee: nobody → Ike Panhc (ikepanhc)
Changed in util-linux (Ubuntu Yakkety):
assignee: nobody → Ike Panhc (ikepanhc)
Changed in util-linux (Ubuntu Xenial):
assignee: nobody → Ike Panhc (ikepanhc)
Ike Panhc (ikepanhc)
description: updated
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package util-linux - 2.29-1ubuntu3

---------------
util-linux (2.29-1ubuntu3) artful; urgency=medium

  * Cherrypick upstream fix to prevent lscpu crash on arm64 by
    accessing DMI in sysfs instead of /dev/mem. LP: #1674258

 -- Ike Panhc <email address hidden> Thu, 18 May 2017 10:49:34 +0800

Changed in util-linux (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Ike, or anyone else affected,

Accepted util-linux into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/util-linux/2.27.1-6ubuntu3.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in util-linux (Ubuntu Xenial):
status: In Progress → Fix Committed
Changed in util-linux (Ubuntu Yakkety):
status: In Progress → Fix Committed
Revision history for this message
Chris J Arges (arges) wrote :

Hello Ike, or anyone else affected,

Accepted util-linux into yakkety-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/util-linux/2.28.2-1ubuntu1.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in util-linux (Ubuntu Zesty):
status: In Progress → Fix Committed
Revision history for this message
Chris J Arges (arges) wrote :

Hello Ike, or anyone else affected,

Accepted util-linux into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/util-linux/2.29-1ubuntu2.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Ike Panhc (ikepanhc) wrote :

ubuntu@rare-fowl:~$ sudo dpkg -i util-linux_2.27.1-6ubuntu3.2_arm64.deb
...
ubuntu@rare-fowl:~$ sudo lscpu
Segmentation fault (core dumped)
ubuntu@rare-fowl:~$ sudo dpkg -i util-linux_2.27.1-6ubuntu3.3_arm64.deb
...
ubuntu@rare-fowl:~$ sudo lscpu
Architecture: aarch64
Byte Order: Little Endian
CPU(s): 64
On-line CPU(s) list: 0-63
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 16
NUMA node(s): 4
NUMA node0 CPU(s): 0-15
NUMA node1 CPU(s): 16-31
NUMA node2 CPU(s): 32-47
NUMA node3 CPU(s): 48-63

Revision history for this message
Ike Panhc (ikepanhc) wrote :

ubuntu@rare-fowl:~$ sudo dpkg -i --force-depends --auto-deconfigure util-linux_2.28.2-1ubuntu1.1_arm64.deb
...
ubuntu@rare-fowl:~$ sudo lscpu
Segmentation fault (core dumped)
ubuntu@rare-fowl:~$ sudo dpkg -i --force-depends --auto-deconfigure util-linux_2.28.2-1ubuntu1.2_arm64.deb
...
ubuntu@rare-fowl:~$ sudo lscpu
Architecture: aarch64
Byte Order: Little Endian
CPU(s): 64
On-line CPU(s) list: 0-63
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 16
NUMA node(s): 4
NUMA node0 CPU(s): 0-15
NUMA node1 CPU(s): 16-31
NUMA node2 CPU(s): 32-47
NUMA node3 CPU(s): 48-63

Revision history for this message
Ike Panhc (ikepanhc) wrote :

ubuntu@rare-fowl:~$ sudo dpkg -i --force-depends --auto-deconfigure util-linux_2.29-1ubuntu2_arm64.deb
...
ubuntu@rare-fowl:~$ sudo lscpu
Segmentation fault (core dumped)
ubuntu@rare-fowl:~$ sudo dpkg -i --force-depends --auto-deconfigure util-linux_2.29-1ubuntu2.1_arm64.deb
...
ubuntu@rare-fowl:~$ sudo lscpu
Architecture: aarch64
Byte Order: Little Endian
CPU(s): 64
On-line CPU(s) list: 0-63
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 16
NUMA node(s): 4
NUMA node0 CPU(s): 0-15
NUMA node1 CPU(s): 16-31
NUMA node2 CPU(s): 32-47
NUMA node3 CPU(s): 48-63

tags: added: verification-done
Revision history for this message
Ike Panhc (ikepanhc) wrote :

2.27.1-6ubuntu3.3 in Xenial, 2.28.2-1ubuntu1.2 in Yakkety and 2.29-1ubuntu2.1 in Zesty has fix the problem.

tags: added: verification-done-xenial verification-done-yakkety verification-done-zesty
removed: verification-done
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package util-linux - 2.27.1-6ubuntu3.3

---------------
util-linux (2.27.1-6ubuntu3.3) xenial; urgency=medium

  * Cherrypick upstream fix to prevent lscpu crash on arm64 by
    accessing DMI in sysfs instead of /dev/mem. LP: #1674258

 -- Ike Panhc <email address hidden> Thu, 18 May 2017 10:49:34 +0800

Changed in util-linux (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Chris Halse Rogers (raof) wrote : Update Released

The verification of the Stable Release Update for util-linux has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package util-linux - 2.28.2-1ubuntu1.2

---------------
util-linux (2.28.2-1ubuntu1.2) yakkety; urgency=medium

  * Cherrypick upstream fix to prevent lscpu crash on arm64 by
    accessing DMI in sysfs instead of /dev/mem. LP: #1674258

 -- Ike Panhc <email address hidden> Thu, 18 May 2017 10:49:34 +0800

Changed in util-linux (Ubuntu Yakkety):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package util-linux - 2.29-1ubuntu2.1

---------------
util-linux (2.29-1ubuntu2.1) zesty; urgency=medium

  * Cherrypick upstream fix to prevent lscpu crash on arm64 by
    accessing DMI in sysfs instead of /dev/mem. LP: #1674258

 -- Ike Panhc <email address hidden> Thu, 18 May 2017 10:49:34 +0800

Changed in util-linux (Ubuntu Zesty):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.