test_095_kernel_symbols_missing in kernel security test failed on AWS Bionic kernel

Bug #1758242 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Triaged
Medium
Unassigned
Bionic
Triaged
Medium
Unassigned

Bug Description

This issue can be reproduced with 4.15.0-12-generic in -released, it will fail with "ValueError: invalid literal for int() with base 16: '(null)'"

  ======================================================================
  ERROR: test_095_kernel_symbols_missing (__main__.KernelSecurityTest)
  kernel addresses in kallsyms and modules are zeroed out
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "./test-kernel-security.py", line 1521, in test_095_kernel_symbols_missing
      self._check_pK_files(expected)
    File "./test-kernel-security.py", line 1440, in _check_pK_files
      expected)
    File "./test-kernel-security.py", line 1401, in _read_twice
      self.assertEqual(expected, 0 == int(address, 16), "%s: user saw %s" % (filename, address))
  ValueError: invalid literal for int() with base 16: '(null)'

  ----------------------------------------------------------------------

With 4.15.0-13 and 4.15.0-1002.2, the error was a bit different, it will fail with: "AssertionError: /proc/self/stack: root saw 0"

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: linux-image-4.15.0-12-generic 4.15.0-12.13
ProcVersionSignature: User Name 4.15.0-12.13-generic 4.15.7
Uname: Linux 4.15.0-12-generic x86_64
AlsaDevices:
 total 0
 crw-rw---- 1 root audio 116, 1 Mar 23 03:56 seq
 crw-rw---- 1 root audio 116, 33 Mar 23 03:56 timer
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay': 'aplay'
ApportVersion: 2.20.8-0ubuntu10
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord': 'arecord'
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CRDA: N/A
CurrentDmesg:

Date: Fri Mar 23 04:14:33 2018
Ec2AMI: ami-266cf15e
Ec2AMIManifest: (unknown)
Ec2AvailabilityZone: us-west-2a
Ec2InstanceType: x1e.xlarge
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig': 'iwconfig'
JournalErrors:
 -- Logs begin at Fri 2018-03-23 03:56:35 UTC, end at Fri 2018-03-23 04:12:28 UTC. --
 Mar 23 03:56:35 username kernel: Cannot get hvm parameter CONSOLE_EVTCHN (18): -22!
 Mar 23 03:56:35 username kernel: Cannot get hvm parameter CONSOLE_EVTCHN (18): -22!
 Mar 23 03:56:56 hostname iscsid[980]: iSCSI daemon with pid=984 started!
Lsusb: Error: command ['lsusb'] failed with exit code 1:
MachineType: Xen HVM domU
PciMultimedia:

ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=C.UTF-8
 SHELL=/bin/bash
ProcFB:

ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.15.0-12-generic root=LABEL=cloudimg-rootfs ro console=tty1 console=ttyS0 nvme_core.io_timeout=255
RelatedPackageVersions:
 linux-restricted-modules-4.15.0-12-generic N/A
 linux-backports-modules-4.15.0-12-generic N/A
 linux-firmware N/A
RfKill: Error: [Errno 2] No such file or directory: 'rfkill': 'rfkill'
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 08/24/2006
dmi.bios.vendor: Xen
dmi.bios.version: 4.2.amazon
dmi.chassis.type: 1
dmi.chassis.vendor: Xen
dmi.modalias: dmi:bvnXen:bvr4.2.amazon:bd08/24/2006:svnXen:pnHVMdomU:pvr4.2.amazon:cvnXen:ct1:cvr:
dmi.product.name: HVM domU
dmi.product.version: 4.2.amazon
dmi.sys.vendor: Xen

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :
summary: - kernel security test failed on AWS Bionic kernel
+ test_095_kernel_symbols_missing in kernel security test failed on AWS
+ Bionic kernel
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1758242

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Changed in linux (Ubuntu Bionic):
status: Incomplete → Triaged
importance: Undecided → Medium
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Affecting X-edge as well (4.15.0-13.14~16.04.1)

Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

This seems to be the same as bug 1751202.

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Nice catch, thanks.

Revision history for this message
Khaled El Mously (kmously) wrote :

This failure appears to be happening because of a change in syntax in /proc/kallsyms between 4.13 and 4.15 for non-root users:

4.13:
0000000000000000 t trace_event_define_fields_block_bio_queue
0000000000000000 t trace_event_define_fields_block_get_rq
0000000000000000 t trace_event_define_fields_block_unplug
0000000000000000 t trace_event_define_fields_block_split
0000000000000000 t trace_event_define_fields_block_bio_remap
0000000000000000 t trace_event_define_fields_block_rq_remap
0000000000000000 T blk_dev_init
0000000000000000 t blk_settings_init
0000000000000000 t blk_ioc_init
0000000000000000 t blk_softirq_init
0000000000000000 t blk_mq_init
0000000000000000 t genhd_device_init
0000000000000000 t proc_genhd_init

4.15:
          (null) t btrfs_space_info_show_total_bytes_pinned [btrfs]
          (null) t space_info_release [btrfs]
          (null) t btrfs_release_fsid_kobj [btrfs]
          (null) t quota_override_store [btrfs]
          (null) t btrfs_label_store [btrfs]
          (null) t btrfs_feature_attr_store [btrfs]
          (null) t addrm_unknown_feature_attrs [btrfs]
          (null) b btrfs_feature_attrs [btrfs]
          (null) r supported_feature_masks [btrfs]
          (null) t __btrfs_sysfs_remove_fsid [btrfs]
          (null) t can_modify_feature.isra.4 [btrfs]
          (null) t btrfs_feature_attr_show [btrfs]
          (null) t btrfs_feature_visible [btrfs]

I think the test may need to be updated.

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.