Comment 2 for bug 1983357

Revision history for this message
Po-Hsu Lin (cypressyew) wrote : Re: test_021_aslr_dapper_libs from ubuntu_qrt_kernel_security failed on K-5.19 AMD64

This test is trying to call a compiled binary "aslr32" and execute:
./aslr32 libs --verbose

If you try to call it from the script, it will fail, however if you run the binary directly it will be good:

ubuntu@harpo:~/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts$ sudo python2 ./ -v KernelSecurityTest.test_021_aslr_dapper_libs
Running test: './' distro: 'Ubuntu 22.10' kernel: '5.19.0-15.15 (Ubuntu 5.19.0-15.15-generic 5.19.0)' arch: 'amd64' uid: 0/0 SUDO_USER: 'ubuntu')
test_021_aslr_dapper_libs (__main__.KernelSecurityTest)
ASLR of libs ... (default libs native) (default libs native rekey) (default libs COMPAT) FAIL

FAIL: test_021_aslr_dapper_libs (__main__.KernelSecurityTest)
ASLR of libs
Traceback (most recent call last):
  File "./", line 1782, in test_021_aslr_dapper_libs
    self._test_aslr('libs', expected)
  File "./", line 1739, in _test_aslr
    self._test_aslr_all(area, expected, "default %s" % area)
  File "./", line 1732, in _test_aslr_all
    self._test_aslr_exec(area, expected, target, name)
  File "./", line 1715, in _test_aslr_exec
    self.assertShellExitEquals(aslr_expected, ["./%s" % (target), area, "--verbose"], msg="%s:\n" % name)
  File "/home/ubuntu/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts/", line 1203, in assertShellExitEquals
    self.assertEqual(expected, rc, msg + result + report)
AssertionError: default libs COMPAT:
Got exit code 1, expected 0
Command: './aslr32', 'libs', '--verbose'
Checking ASLR of libs:
FAIL: ASLR not functional (libs always at 0xf7c81790)

Ran 1 test in 0.589s

FAILED (failures=1)
ubuntu@harpo:~/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts$ sudo ./kernel-security/aslr/aslr libs --verbose
Checking ASLR of libs:
ok: ASLR of libs functional