test_120_smep_works in ubuntu_qrt_kernel_security failed on AWS Bionic

Bug #1758246 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
Fix Released
Undecided
Po-Hsu Lin
linux (Ubuntu)
Invalid
Medium
Unassigned
Bionic
Invalid
Medium
Unassigned

Bug Description

This test was skipped on -release kernel 4.15.0-12:
  test_120_smep_works (__main__.KernelSecurityTest)
  SMEP works ... (skipped: unfinished test) ok

But failed with the 4.15.0-13 proposed kernel:

  FAIL: test_120_smep_works (__main__.KernelSecurityTest)
  SMEP works
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "./test-kernel-security.py", line 1666, in test_120_smep_works
      self.assertShellExitEquals(0, ["insmod", "execuser/execuser.ko"])
    File "/home/ubuntu/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts/testlib.py", line 1134, in assertShellExitEquals
      self.assertEqual(expected, rc, msg + result + report)
  AssertionError: Got exit code 1, expected 0
  Command: 'insmod', 'execuser/execuser.ko'
  Output:
  insmod: ERROR: could not insert module execuser/execuser.ko: Invalid module format

This issue was spotted with manual run for the ubuntu_qrt_kernel_security test. The job executed by the jenkins will have this test skipped like the result in 4.15.0-12

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: linux-image-4.15.0-13-generic 4.15.0-13.14
ProcVersionSignature: User Name 4.15.0-13.14-generic 4.15.10
Uname: Linux 4.15.0-13-generic x86_64
AlsaDevices:
 total 0
 crw-rw---- 1 root audio 116, 1 Mar 23 04:29 seq
 crw-rw---- 1 root audio 116, 33 Mar 23 04:29 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
Date: Fri Mar 23 05:58:55 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'
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-13-generic root=UUID=f06dc295-8830-4ede-8aec-fda10bf30396 ro console=tty1 console=ttyS0 nvme_core.io_timeout=255
RelatedPackageVersions:
 linux-restricted-modules-4.15.0-13-generic N/A
 linux-backports-modules-4.15.0-13-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 :
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Changed in linux (Ubuntu Bionic):
importance: Undecided → Medium
tags: added: kernel-da-key
Changed in linux (Ubuntu Bionic):
status: Confirmed → Triaged
Revision history for this message
Khaled El Mously (kmously) wrote :

I'm unable to reproduce this - probably because my CPU doesn't support SMEP

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

It looks like the cause is the attempt to insert the execuser.ko:
  insmod: ERROR: could not insert module execuser/execuser.ko: Invalid module format

Maybe you can try to insert the module first to see if this error can be reproduced on your side?

Po-Hsu Lin (cypressyew)
Changed in ubuntu-kernel-tests:
assignee: nobody → Po-Hsu Lin (cypressyew)
status: New → In Progress
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

So on Bionic AWS kernel, and Bionic generic kernel on AWS, they both can pass with:

09:01:31 ERROR| [stderr] test_120_smep_works (__main__.KernelSecurityTest)
09:01:33 ERROR| [stderr] SMEP works ... (skipped: unfinished test) ok

However,
Jesse and I noticed that if we're running this test across two different kernels (e.g. first test on B-AWS, and reboot to B-generic and retest), the test will failed as the module won't get rebuild.

Adding a "make clean" can make this become more robust.
I will close this one and open another for qrt.

Changed in linux (Ubuntu Bionic):
status: Triaged → Invalid
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Issue mentioned in comment #5 has been addressed in bug 1793716

Changed in ubuntu-kernel-tests:
status: In Progress → Fix Released
Changed in linux (Ubuntu):
status: Triaged → Invalid
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.