Wind River Support Network

HomeDefectsLIN1023-562
Fixed

LIN1023-562 : [LTP] af_alg07.c:110: TFAIL: fchownat() failed to fail, kernel may be vulnerable

Created: May 15, 2023    Updated: Mar 27, 2024
Resolved Date: Mar 27, 2024
Found In Version: 10.23.30.1
Severity: Standard
Applicable for: Wind River Linux LTS 23
Component/s: Kernel

Description

Build LTP into the image and boot up.



root@nxp-s32g:~# uname -a
Linux nxp-s32g 6.1.27-rt7-yocto-preempt-rt #1 SMP PREEMPT_RT Wed May 10 20:39:55 UTC 2023 aarch64 GNU/Linux
root@nxp-s32g:~# cat /proc/version
Linux version 6.1.27-rt7-yocto-preempt-rt (oe-user@oe-host) (aarch64-wrs-linux-gcc (GCC) 12.2.0, GNU ld (GNU Binutils) 2.40.20230119) #1 SMP PREEMPT_RT Wed May 10 20:39:55 UTC 2023
root@nxp-s32g:~# cat /proc/cmdline
console=ttyLF0rent_pool=64M root=/dev/mmcblk0p2 rw rootwait ip=128.224.178.115:128.224.178.20:128.224.178.1:255.255.254.0::eth0:off
root@nxp-s32g:~# cat /etc/os-release"
VERSION="10.23.16.0"
VERSION_ID=10.23.16.0
VERSION_CODENAME="${DISTRO_CODENAME}"
PRETTY_NAME="Wind River Linux development 23.16"

<<<test_start>>>
tag=af_alg07 stime=1677849379
cmdline="af_alg07"
contacts=""
analysis=exit
<<<test_output>>>
tst_test.c:1558: [1;34mTINFO: [0mTimeout per run is 0h 03m 00s
/usr/src/debug/ltp/20230127-r0/include/tst_fuzzy_sync.h:484: [1;34mTINFO: [0mMinimum sampling period ended
/usr/src/debug/ltp/20230127-r0/include/tst_fuzzy_sync.h:307: [1;34mTINFO: [0mloop = 1024, delay_bias = 0
/usr/src/debug/ltp/20230127-r0/include/tst_fuzzy_sync.h:295: [1;34mTINFO: [0mstart_a - start_b: { avg =    59ns, avg_dev =    75ns, dev_ratio = 1.25 }
/usr/src/debug/ltp/20230127-r0/include/tst_fuzzy_sync.h:295: [1;34mTINFO: [0mend_a - start_a  : { avg = 14201ns, avg_dev =   307ns, dev_ratio = 0.02 }
/usr/src/debug/ltp/20230127-r0/include/tst_fuzzy_sync.h:295: [1;34mTINFO: [0mend_b - start_b  : { avg = 26382ns, avg_dev =   682ns, dev_ratio = 0.03 }
/usr/src/debug/ltp/20230127-r0/include/tst_fuzzy_sync.h:295: [1;34mTINFO: [0mend_a - end_b    : { avg = -12121ns, avg_dev =   848ns, dev_ratio = 0.07 }
/usr/src/debug/ltp/20230127-r0/include/tst_fuzzy_sync.h:295: [1;34mTINFO: [0mspins            : { avg = 583611  , avg_dev = 228114  , dev_ratio = 0.39 }
/usr/src/debug/ltp/20230127-r0/include/tst_fuzzy_syLTP: starting pcrypt_aead01
nc.h:648: [1;34mTINFO: [0mExceeded execution time, requesting exit
af_alg07.c:110: [1;31mTFAIL: [0mfchownat() failed to fail, kernel may be vulnerable

[1;33mHINT: [0mYou _MAY_ be missing kernel fixes:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ff7b11aa481f
https://git.kernel.org/pub/scm/linux/LTP: starting crypto_user01
kernel/git/torvalds/linux.git/commit/?id=9060cb719e61

[1;33mHINT: [0mYou _MAY_ be vulnerable to CVE(s):

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-8912

Summary:
passed   0
failed   1
broken   0
skipped  0
warnings 0
<<<execution_status>>>
initiation_status="LTP: starting crypto_user02
ok"
duration=150 termination_type=exited termination_id=1 corefile=no
cutime=29739 cstime=30
<<<test_end>>>

Expected results.


<<<test_start>>>
tag=af_alg07 stime=1651176382
cmdline="af_alg07"
contacts=""
analysis=exit
<<<test_output>>>
tst_test.c:1431: TINFO: Timeout per run is 0h 05m 00s
../../../include/tst_fuzzy_sync.h:522: TINFO: Minimum sampling period ended
../../../include/tst_fuzzy_sync.h:345: TINFO: loop = 1024, delay_bias = 0
../../../include/tst_fuzzy_sync.h:333: TINFO: start_a - start_b: { avg =   222ns, avg_dev =   123ns, dev_ratio = 0.56 }
../../../include/tst_fuzzy_sync.h:333: TINFO: end_a - start_a  : { avg = 29495ns, avg_dev =  1124ns, dev_ratio = 0.04 }
../../../include/tst_fuzzy_sync.h:333: TINFO: end_b - start_b  : { avg = 34900ns, avg_dev =  1027ns, dev_ratio = 0.03 }
../../../include/tst_fuzzy_sync.h:333: TINFO: end_a - end_b    : { avg = -5184ns, avg_dev =   911ns, dev_ratio = 0.18 }
../../../include/tst_fuzzy_sync.h:333: TINFO: spins            : { avg =   666  , avg_dev =   119  , dev_ratio = 0.18 }
af_alg07.c:94: TPASS: fchownat() failed successfully: ENOENT (2)

Summary:
passed   1
failed   0
broken   0
skippedLTP: starting pcrypt_aead01
  0
warnings 0

http://pek-lpgtest3.wrs.com/lpg-build/cdc/publiclog/WRLinux1022/WRL-10.22.33.7_RCPL/2023WW11/GIT_20230317/LTP/nxp-s32g_preempt-rt_glibc-std/NXP_S32G399A_RDB3_OE_systemd/ltp_crypto/target_29274.platform_B0E1R0_20230320_064510.log




Steps to Reproduce

INFO: Shared image path: /net/pek-lpgtest7408/buildarea1/SharedImage/LTS23/LTP/nxp-s32g_preempt-rt_glibc-std/20230512_194152

/lpg-build/cdc/fast_prod/WRL10_23/WRL10_23_GIT/wrlinux-10/setup.sh --machines nxp-s32g --templates feature/docker --distro wrlinux --dl-layers=1 --accept-eula=yes
source environment-setup-x86_64-wrlinuxsdk-linux
source oe-init-build-env build
echo 'PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-rt"' >> conf/local.conf

bitbake-layers add-layer /net/128.224.34.180/buildarea1/test_env/wassp-linux/testcases/wrlinux/wr-testing/kts-dev

OR

#####To Clone a whole new testcases layer#####
git clone --depth 1 -b WRLINUX_10_23_HEAD git://lxgit.wrs.com/wrlinux-testing/testcases.git ../layers/testcases/wrlinux/
bitbake-layers add-layer ../layers/testcases/wrlinux/wr-testing/kts-dev
#####End#####

echo 'require templates/feature/ltp/template.conf' >> conf/local.conf

echo 'FIRMWARE_DIR_BASE = "/net/pek-lpgtest7408/buildarea1/SharedImage/wr-bsp-images/nxp-s32g/firmwares"
HSE_LOCAL_FIRMWARE_DIR = "${FIRMWARE_DIR_BASE}/hse"
HSE_FW_VERSION_S32G2 = "0.1.0.9"
HSE_FW_VERSION_S32G3 = "0.2.16.1"
HSE_FW_NAME_S32G2 = "rev2.0_s32g2xx_hse_fw_0.1.0_1.0.9_pb230405.bin.pink"
HSE_FW_NAME_S32G3 = "rev1.0_s32g3xx_hse_fw_0.20.0_2.16.1_pb221011.bin.pink"
LLCE_LOCAL_FIRMWARE_DIR = "${FIRMWARE_DIR_BASE}/llce/1.0.6/s32g2"
LLCE_LOCAL_FIRMWARE_DIR_S32G3 = "${FIRMWARE_DIR_BASE}/llce/1.0.6/s32g3"
IPCF_M7_APP_BIN_DIR = "${FIRMWARE_DIR_BASE}/ipcf"
WRL_RECIPES:wr-nxp-s32g += "llce"
IMAGE_INSTALL:append = " llce ipc-shm"' >> conf/local.conf
bitbake wrlinux-image-std
Live chat
Online