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 ./test-kernel-security.py -v KernelSecurityTest.test_021_aslr_dapper_libs Running test: './test-kernel-security.py' 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 "./test-kernel-security.py", line 1782, in test_021_aslr_dapper_libs self._test_aslr('libs', expected) File "./test-kernel-security.py", line 1739, in _test_aslr self._test_aslr_all(area, expected, "default %s" % area) File "./test-kernel-security.py", line 1732, in _test_aslr_all self._test_aslr_exec(area, expected, target, name) File "./test-kernel-security.py", 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/testlib.py", 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' Output: Checking ASLR of libs: 0xf7c81790 0xf7c81790 0xf7c81790 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: 0x007fb495c907c0 0x007f674ea907c0 0x007f0e0fe907c0 ok: ASLR of libs functional
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 ./test- kernel- security. py -v KernelSecurityT est.test_ 021_aslr_ dapper_ libs kernel- security. py' 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') aslr_dapper_ libs (__main_ _.KernelSecurit yTest)
Running test: './test-
test_021_
ASLR of libs ... (default libs native) (default libs native rekey) (default libs COMPAT) FAIL
======= ======= ======= ======= ======= ======= ======= ======= ======= ======= aslr_dapper_ libs (__main_ _.KernelSecurit yTest) ------- ------- ------- ------- ------- ------- ------- ------- ------- kernel- security. py", line 1782, in test_021_ aslr_dapper_ libs _test_aslr( 'libs', expected) kernel- security. py", line 1739, in _test_aslr _test_aslr_ all(area, expected, "default %s" % area) kernel- security. py", line 1732, in _test_aslr_all _test_aslr_ exec(area, expected, target, name) kernel- security. py", line 1715, in _test_aslr_exec assertShellExit Equals( aslr_expected, ["./%s" % (target), area, "--verbose"], msg="%s:\n" % name) ubuntu/ autotest/ client/ tmp/ubuntu_ qrt_kernel_ security/ src/qa- regression- testing/ scripts/ testlib. py", line 1203, in assertShellExit Equals assertEqual( expected, rc, msg + result + report)
FAIL: test_021_
ASLR of libs
-------
Traceback (most recent call last):
File "./test-
self.
File "./test-
self.
File "./test-
self.
File "./test-
self.
File "/home/
self.
AssertionError: default libs COMPAT:
Got exit code 1, expected 0
Command: './aslr32', 'libs', '--verbose'
Output:
Checking ASLR of libs:
0xf7c81790
0xf7c81790
0xf7c81790
FAIL: ASLR not functional (libs always at 0xf7c81790)
------- ------- ------- ------- ------- ------- ------- ------- ------- -------
Ran 1 test in 0.589s
FAILED (failures=1) harpo:~ /autotest/ client/ tmp/ubuntu_ qrt_kernel_ security/ src/qa- regression- testing/ scripts$ sudo ./kernel- security/ aslr/aslr libs --verbose
ubuntu@
Checking ASLR of libs:
0x007fb495c907c0
0x007f674ea907c0
0x007f0e0fe907c0
ok: ASLR of libs functional