xenial: 3.4 prints (null), 3.5 crashed, and 3.6 fixed it -> verified
artful: 4.1 in release crashes; 4.2 fixes it -> verified
bionic: 3 in release crashes, 3.1 fixes it -> verified

Sample log from bionic belog:


jak@jak-t480s:~/Downloads$ echo lscpu -s /home/jak/Downloads/segvtest | lxc 
exec b -- bash - 
bash: line 1:   285 Segmentation fault      (core dumped) lscpu -s 
/home/jak/Downloads/segvtest
- 
jak@jak-t480s:~/Downloads$ lxc exec b -- sh -c "echo 'deb 
http://archive.ubuntu.com/ubuntu bionic-proposed main' > /etc/apt/sources.list"
jak@jak-t480s:~/Downloads$ lxc exec b apt update
Get:1 http://archive.ubuntu.com/ubuntu bionic-proposed InRelease [242 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 Packages 
[35.9 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-proposed/main Translation-en 
[14.7 kB]
Fetched 293 kB in 1s (472 kB/s)           
Reading package lists... Done
Building dependency tree       
Reading state information... Done
17 packages can be upgraded. Run 'apt list --upgradable' to see them.
jak@jak-t480s:~/Downloads$ lxc exec b apt install -q util-linux
Error: unknown shorthand flag: 'q' in -q
jak@jak-t480s:~/Downloads$ lxc exec b -- apt install -q util-linux
Reading package lists...
Building dependency tree...
Reading state information...
The following package was automatically installed and is no longer required:
  libfreetype6
Use 'apt autoremove' to remove it.
Suggested packages:
  util-linux-locales
The following packages will be upgraded:
  util-linux
1 upgraded, 0 newly installed, 0 to remove and 16 not upgraded.
Need to get 902 kB of archives.
After this operation, 1024 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 util-linux 
amd64 2.31.1-0.4ubuntu3.1 [902 kB]
Fetched 902 kB in 1s (990 kB/s)
(Reading database ... 28477 files and directories currently installed.)
Preparing to unpack .../util-linux_2.31.1-0.4ubuntu3.1_amd64.deb ...
Unpacking util-linux (2.31.1-0.4ubuntu3.1) over (2.31.1-0.4ubuntu3) ...
Setting up util-linux (2.31.1-0.4ubuntu3.1) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for ureadahead (0.100.0-20) ...
Processing triggers for systemd (237-3ubuntu10) ...
Processing triggers for man-db (2.8.3-2) ...
jak@jak-t480s:~/Downloads$ echo lscpu -s /home/jak/Downloads/segvtest | lxc 
exec b -- bash - 
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              8
On-line CPU(s) list: 0-7
Thread(s) per core:  2
Core(s) per socket:  4
Socket(s):           1
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               142
Model name:          Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
Stepping:            10
CPU max MHz:         3400.0000
CPU min MHz:         400.0000
BogoMIPS:            3600.00
Virtualization:      VT-x
L1d cache:           32K
L1i cache:           32K
L2 cache:            256K
L3 cache:            6144K
NUMA node0 CPU(s):   0-7
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca 
cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx 
pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl 
xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 
monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 
x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 
3dnowprefetch cpuid_fault epb invpcid_single pti tpr_shadow vnmi flexpriority 
ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx 
smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves ibpb ibrs stibp dtherm 
ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp


** Tags added: verification-done-artful verification-done-bionic 
verification-done-xenial

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to util-linux in Ubuntu.
https://bugs.launchpad.net/bugs/1771345

Title:
  lscpu possible crash in min/max frequency

Status in util-linux package in Ubuntu:
  Fix Committed
Status in util-linux source package in Xenial:
  Fix Committed
Status in util-linux source package in Artful:
  Fix Committed
Status in util-linux source package in Bionic:
  Fix Committed

Bug description:
  [Impact]
  lscpu prior to 2.32 does not correctly check for NULL members in min/max CPU 
frequency arrays and can call atof() on them, leading to crashes. It seems 
that's what caused the verification to fail for bug 1732865. The following 
fixes have been committed upstream:

  from 2.30: https://github.com/karelzak/util-
  linux/commit/0145d84a381fc2fcd7d37e0dbf3d9dff69609ecd

  from 2.32: https://github.com/karelzak/util-
  linux/commit/95f09bc63c564c50ec2c393352801cc056faaea2

  I plan to backport them to xenial (both patches); and artful, bionic
  (second patch, they are > 2.30).

  [Regression potential]
  The worst possible regression is that lscpu would fail to correctly report 
min/max frequencies, but it seems unlikely, as we're only adding checks against 
null pointers / move an atof into a loop.

  [Test case]
  Extract attached segvtest.tar.gz and run lscpu -s segvtest and check that it 
does not crash (this removes min mhz file for cpu #0 for testing).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1771345/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to