risc-v 5.8 kernel test-kernel-security.py test failures
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QA Regression Testing |
Invalid
|
Undecided
|
Unassigned | ||
ubuntu-kernel-tests |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Running RISC-V in QEMU emulator we hit the following adt test failures:
15:30:56 ERROR| [stderr] =======
15:30:56 ERROR| [stderr] FAIL: test_130_
15:30:56 ERROR| [stderr] CONFIG_
15:30:56 ERROR| [stderr] -------
15:30:56 ERROR| [stderr] Traceback (most recent call last):
15:30:56 ERROR| [stderr] File "./test-
15:30:56 ERROR| [stderr] self.assertKern
15:30:56 ERROR| [stderr] File "./test-
15:30:56 ERROR| [stderr] self.assertKern
15:30:56 ERROR| [stderr] File "./test-
15:30:56 ERROR| [stderr] '%s option was expected to be unset in the kernel config' % name)
15:30:56 ERROR| [stderr] AssertionError: STRICT_KERNEL_RWX option was expected to be unset in the kernel config
15:30:56 ERROR| [stderr]
15:30:56 ERROR| [stderr] =======
15:30:56 ERROR| [stderr] FAIL: test_180_
15:30:56 ERROR| [stderr] CONFIG_
15:30:56 ERROR| [stderr] -------
15:30:56 ERROR| [stderr] Traceback (most recent call last):
15:30:56 ERROR| [stderr] File "./test-
15:30:56 ERROR| [stderr] self.assertKern
15:30:56 ERROR| [stderr] File "./test-
15:30:56 ERROR| [stderr] self.assertKern
15:30:56 ERROR| [stderr] File "./test-
15:30:56 ERROR| [stderr] '%s option was expected to be set in the kernel config' % name)
15:30:56 ERROR| [stderr] AssertionError: STACKPROTECTOR option was expected to be set in the kernel config
15:30:56 ERROR| [stderr] =======
15:30:56 ERROR| [stderr] FAIL: test_180_
15:30:56 ERROR| [stderr] CONFIG_
15:30:56 ERROR| [stderr] -------
15:30:56 ERROR| [stderr] Traceback (most recent call last):
15:30:56 ERROR| [stderr] File "./test-
15:30:56 ERROR| [stderr] self.assertKern
15:30:56 ERROR| [stderr] File "./test-
15:30:56 ERROR| [stderr] self.assertKern
15:30:56 ERROR| [stderr] File "./test-
15:30:56 ERROR| [stderr] '%s option was expected to be set in the kernel config' % name)
15:30:56 ERROR| [stderr] AssertionError: STACKPROTECTOR option was expected to be set in the kernel config
15:30:56 ERROR| [stderr]
15:30:56 ERROR| [stderr] =======
15:30:56 ERROR| [stderr] FAIL: test_185_
15:30:56 ERROR| [stderr] CONFIG_
15:30:56 ERROR| [stderr] -------
15:30:56 ERROR| [stderr] Traceback (most recent call last):
15:30:56 ERROR| [stderr] File "./test-
15:30:56 ERROR| [stderr] self.assertKern
15:30:56 ERROR| [stderr] File "./test-
15:30:56 ERROR| [stderr] self.assertKern
15:30:56 ERROR| [stderr] File "./test-
15:30:56 ERROR| [stderr] '%s option was expected to be set in the kernel config' % name)
15:30:57 ERROR| [stderr] AssertionError: STACKPROTECTOR_
15:30:57 ERROR| [stderr]
15:30:57 ERROR| [stderr] =======
15:30:57 ERROR| [stderr] FAIL: test_190_
15:30:57 ERROR| [stderr] CONFIG_
15:30:57 ERROR| [stderr] -------
15:30:57 ERROR| [stderr] Traceback (most recent call last):
15:30:57 ERROR| [stderr] File "./test-
15:30:57 ERROR| [stderr] self.assertKern
15:30:57 ERROR| [stderr] File "./test-
15:30:57 ERROR| [stderr] self.assertKern
15:30:57 ERROR| [stderr] File "./test-
15:30:57 ERROR| [stderr] '%s option was expected to be set in the kernel config' % name)
15:30:57 ERROR| [stderr] AssertionError: HAVE_STACKPROTECTOR option was expected to be set in the kernel config
15:30:57 ERROR| [stderr]
15:30:57 ERROR| [stderr] =======
15:30:57 ERROR| [stderr] FAIL: test_290_
15:30:57 ERROR| [stderr] Ensure CONFIG_
15:30:57 ERROR| [stderr] -------
15:30:57 ERROR| [stderr] Traceback (most recent call last):
15:30:57 ERROR| [stderr] File "./test-
15:30:57 ERROR| [stderr] self.assertKern
15:30:57 ERROR| [stderr] File "./test-
15:30:57 ERROR| [stderr] '%s option was expected to be unset in the kernel config' % name)
15:30:57 ERROR| [stderr] AssertionError: HARDENED_USERCOPY option was expected to be unset in the kernel config
15:30:57 ERROR| [stderr] =======
15:30:57 ERROR| [stderr] FAIL: test_330_
15:30:57 ERROR| [stderr] Ensure DEBUG_WX is set
15:30:57 ERROR| [stderr] -------
15:30:57 ERROR| [stderr] Traceback (most recent call last):
15:30:57 ERROR| [stderr] File "./test-
15:30:57 ERROR| [stderr] self.assertKern
15:30:57 ERROR| [stderr] File "./test-
15:30:57 ERROR| [stderr] self.assertKern
15:30:57 ERROR| [stderr] File "./test-
15:30:57 ERROR| [stderr] '%s option was expected to be unset in the kernel config' % name)
15:30:57 ERROR| [stderr] AssertionError: DEBUG_WX option was expected to be unset in the kernel config
15:30:57 ERROR| [stderr]
15:30:57 ERROR| [stderr] =======
15:30:57 ERROR| [stderr] FAIL: test_350_
15:30:57 ERROR| [stderr] Ensure THREAD_INFO_IN_TASK is set
15:30:57 ERROR| [stderr] -------
15:30:57 ERROR| [stderr] Traceback (most recent call last):
15:30:57 ERROR| [stderr] File "./test-
15:30:57 ERROR| [stderr] self.assertKern
15:30:57 ERROR| [stderr] File "./test-
15:30:57 ERROR| [stderr] self.assertKern
15:30:57 ERROR| [stderr] File "./test-
15:30:57 ERROR| [stderr] '%s option was expected to be unset in the kernel config' % name)
15:30:57 ERROR| [stderr] AssertionError: THREAD_INFO_IN_TASK option was expected to be unset in the kernel config
15:30:57 ERROR| [stderr]
15:30:57 ERROR| [stderr] =======
15:30:57 ERROR| [stderr] FAIL: test_020_
15:30:57 ERROR| [stderr] ASLR of stack
15:30:57 ERROR| [stderr] -------
15:30:57 ERROR| [stderr] Traceback (most recent call last):
15:30:57 ERROR| [stderr] File "./test-
15:30:57 ERROR| [stderr] self._test_
15:30:57 ERROR| [stderr] File "./test-
15:30:57 ERROR| [stderr] self.assertShel
15:30:57 ERROR| [stderr] File "/home/
15:30:57 ERROR| [stderr] self.assertEqua
15:30:57 ERROR| [stderr] AssertionError: Got exit code 2, expected 0
15:30:57 ERROR| [stderr] Command: 'make'
15:30:57 ERROR| [stderr] Output:
15:30:57 ERROR| [stderr] cc -Wall -Wformat-security -D_FORTIFY_SOURCE=2 -O2 -fPIC -pie -o aslr aslr.c -ldl
15:30:57 ERROR| [stderr] aslr.c: In function ‘area_pointer’:
15:30:57 ERROR| [stderr] aslr.c:144:41: warning: format ‘%p’ expects argument of type ‘void *’, but argument 3 has type ‘uintptr_t’ {aka ‘long unsigned int’} [-Wformat=]
15:30:57 ERROR| [stderr] 144 | fprintf(stderr, "[pie] AREA_MMAP: %p\tAREA_TEXT: %p\n", area_pointer(
15:30:57 ERROR| [stderr] | ~^ ~~~~~~~
15:30:57 ERROR| [stderr] | | |
15:30:58 ERROR| [stderr] | void * uintptr_t {aka long unsigned int}
15:30:58 ERROR| [stderr] | %ld
15:30:58 ERROR| [stderr] aslr.c:144:56: warning: format ‘%p’ expects argument of type ‘void *’, but argument 4 has type ‘uintptr_t’ {aka ‘long unsigned int’} [-Wformat=]
15:30:58 ERROR| [stderr] 144 | fprintf(stderr, "[pie] AREA_MMAP: %p\tAREA_TEXT: %p\n", area_pointer(
15:30:58 ERROR| [stderr] | ~^
15:30:58 ERROR| [stderr] | |
15:30:58 ERROR| [stderr] | void *
15:30:58 ERROR| [stderr] | %ld
15:30:58 ERROR| [stderr] 145 | area_pointer(
15:30:58 ERROR| [stderr] | ~~~~~~~
15:30:58 ERROR| [stderr] | |
15:30:58 ERROR| [stderr] | uintptr_t {aka long unsigned int}
15:30:58 ERROR| [stderr] cc -Wall -Wformat-security -D_FORTIFY_SOURCE=2 -O2 -fPIC -pie -o mmap-growth-
15:30:58 ERROR| [stderr] cc -Wall -Wformat-security -D_FORTIFY_SOURCE=2 -O2 -m32 -fPIC -pie -o aslr32 aslr.c -ldl
15:30:58 ERROR| [stderr] cc: error: unrecognized command-line option ‘-m32’
15:30:58 ERROR| [stderr] make: *** [Makefile:28: aslr32] Error 1
tags: | added: ubuntu-qrt-kernel-security |
10:02:27 ERROR| [stderr] CONFIG_ DEBUG_RODATA/ CONFIG_ STRICT_ KERNEL_ RWX enabled^M ------- ------- ------- ------- ------- ------- ------- ------- ------- ^M kernel- security. py", line 2360, in test_130_ config_ debug_rodata^ M elConfig( option, expected)^M kernel- security. py", line 216, in assertKernelCon fig^M elConfigUnset( name)^M kernel- security. py", line 207, in assertKernelCon figUnset^ M
10:02:27 ERROR| [stderr] -------
10:02:27 ERROR| [stderr] Traceback (most recent call last):^M
10:02:27 ERROR| [stderr] File "./test-
10:02:27 ERROR| [stderr] self.assertKern
10:02:27 ERROR| [stderr] File "./test-
10:02:27 ERROR| [stderr] self.assertKern
10:02:27 ERROR| [stderr] File "./test-
10:02:27 ERROR| [stderr] '%s option was expected to be unset in the kernel config' % name)^M
10:02:27 ERROR| [stderr] AssertionError: STRICT_KERNEL_RWX option was expected to be unset in the kernel config^M
cking@ubuntu:/boot$ uname -a STRICT_ KERNEL_ RWX /boot/config- $(uname -r) STRICT_ KERNEL_ RWX=y
Linux ubuntu 5.8.0-1-generic #1-Ubuntu SMP Thu Aug 27 19:51:38 UTC 2020 riscv64 riscv64 riscv64 GNU/Linux
cking@ubuntu:/boot$ grep CONFIG_
CONFIG_