 |
fail |
kselftests-6.14-alt1.x86_64 |
The test discovered scripts with errors which may be used by a user for damaging important system files. For example if a script uses in its work a temp file which is created in /tmp directory, then every user can create symlinks with the same name (pattern) in this directory in order to destroy or rewrite some system or another user's files. Scripts _must_ _use_ mktemp/tempfile or must use $TMPDIR. mktemp/tempfile is safest. $TMPDIR is safer than /tmp/ because libpam-tmpdir creates a subdirectory of /tmp that is only accessible by that user, and then sets TMPDIR and other variables to that. Hence, it doesn't matter nearly as much if you create a non-random filename, because nobody but you can access it. Found error in /usr/lib/kselftests/net/mptcp/simult_flows.sh: $ grep /tmp/ /usr/lib/kselftests/net/mptcp/simult_flows.sh local cappid_connector=$! sleep 1 fi NSTAT_HISTORY=/tmp/${ns3}.nstat ip netns exec ${ns3} \ nstat NSTAT_HISTORY=/tmp/${ns1}.nstat ip netns exec ${ns1} \ nstat timeout ${timeout_test} \ ip netns exec ${ns3} \ ./mptcp_connect $port $max_time \ sleep 1 kill ${cappid_listener} kill ${cappid_connector} fi NSTAT_HISTORY=/tmp/${ns3}.nstat ip netns exec ${ns3} \ nstat | grep Tcp > /tmp/${ns3}.out NSTAT_HISTORY=/tmp/${ns1}.nstat ip netns exec ${ns1} \ nstat | grep Tcp > /tmp/${ns1}.out cmp $sin $cout > /dev/null 2>&1 local cmps=$? cmp $cin $sout > /dev/null 2>&1 local cmpc=$? -- return 0 fi mptcp_lib_pr_fail "client exit code $retc, server $rets" mptcp_lib_pr_err_stats "${ns3}" "${ns1}" "${port}" \ "/tmp/${ns3}.out" "/tmp/${ns1}.out" ls -l $sin $cout ls -l $cin $sout cat "$capout" return 1 Found error in /usr/lib/kselftests/net/mptcp/mptcp_sockopt.sh: $ grep -A5 -B5 /tmp/ /usr/lib/kselftests/net/mptcp/mptcp_sockopt.sh cmsg="TIMESTAMPNS" if mptcp_lib_kallsyms_has "mptcp_ioctl$"; then cmsg+=",TCPINQ" fi NSTAT_HISTORY=/tmp/${listener_ns}.nstat ip netns exec ${listener_ns} \ nstat -n NSTAT_HISTORY=/tmp/${connector_ns}.nstat ip netns exec ${connector_ns} \ nstat -n timeout ${timeout_test} \ ip netns exec ${listener_ns} \ $mptcp_connect -t ${timeout_poll} -l -M 1 -p $port -s ${srv_proto} -c "${cmsg}" \ -- wait $cpid local retc=$? wait $spid local rets=$? NSTAT_HISTORY=/tmp/${listener_ns}.nstat ip netns exec ${listener_ns} \ nstat | grep Tcp > /tmp/${listener_ns}.out NSTAT_HISTORY=/tmp/${connector_ns}.nstat ip netns exec ${connector_ns} \ nstat | grep Tcp > /tmp/${connector_ns}.out print_title "Transfer ${ip:2}" if [ ${rets} -ne 0 ] || [ ${retc} -ne 0 ]; then mptcp_lib_pr_fail "client exit code $retc, server $rets" mptcp_lib_pr_err_stats "${listener_ns}" "${connector_ns}" "${port}" \ "/tmp/${listener_ns}.out" "/tmp/${connector_ns}.out" mptcp_lib_result_fail "transfer ${ip}" ret=${KSFT_FAIL} return 1 Found error in /usr/lib/kselftests/net/mptcp/mptcp_join.sh: $ grep -A5 -B5 /tmp/ /usr/lib/kselftests/net/mptcp/mptcp_join.sh :> "$cout" :> "$sout" cond_start_capture ${listener_ns} NSTAT_HISTORY=/tmp/${listener_ns}.nstat ip netns exec ${listener_ns} \ nstat -n NSTAT_HISTORY=/tmp/${connector_ns}.nstat ip netns exec ${connector_ns} \ nstat -n local extra_args if [ $speed = "fast" ]; then extra_args="-j" -- wait $spid local rets=$? cond_stop_capture NSTAT_HISTORY=/tmp/${listener_ns}.nstat ip netns exec ${listener_ns} \ nstat | grep Tcp > /tmp/${listener_ns}.out NSTAT_HISTORY=/tmp/${connector_ns}.nstat ip netns exec ${connector_ns} \ nstat | grep Tcp > /tmp/${connector_ns}.out if [ ${rets} -ne 0 ] || [ ${retc} -ne 0 ]; then fail_test "client exit code $retc, server $rets" mptcp_lib_pr_err_stats "${listener_ns}" "${connector_ns}" "${port}" \ "/tmp/${listener_ns}.out" "/tmp/${connector_ns}.out" return 1 fi if [ "$test_linkfail" -gt 1 ];then check_transfer $sinfail $cout "file received by client" $trunc_size Found error in /usr/lib/kselftests/net/mptcp/mptcp_connect.sh: $ grep -A5 -B5 /tmp/ /usr/lib/kselftests/net/mptcp/mptcp_connect.sh local cappid_connector=$! sleep 1 fi NSTAT_HISTORY=/tmp/${listener_ns}.nstat ip netns exec ${listener_ns} \ nstat -n if [ ${listener_ns} != ${connector_ns} ]; then NSTAT_HISTORY=/tmp/${connector_ns}.nstat ip netns exec ${connector_ns} \ nstat -n fi local stat_synrx_last_l local stat_ackrx_last_l -- sleep 1 kill ${cappid_listener} kill ${cappid_connector} fi NSTAT_HISTORY=/tmp/${listener_ns}.nstat ip netns exec ${listener_ns} \ nstat | grep Tcp > /tmp/${listener_ns}.out if [ ${listener_ns} != ${connector_ns} ]; then NSTAT_HISTORY=/tmp/${connector_ns}.nstat ip netns exec ${connector_ns} \ nstat | grep Tcp > /tmp/${connector_ns}.out fi local duration duration=$((stop-start)) printf "(duration %05sms) " "${duration}" if [ ${rets} -ne 0 ] || [ ${retc} -ne 0 ]; then mptcp_lib_pr_fail "client exit code $retc, server $rets" mptcp_lib_pr_err_stats "${listener_ns}" "${connector_ns}" "${port}" \ "/tmp/${listener_ns}.out" "/tmp/${connector_ns}.out" echo cat "$capout" mptcp_lib_result_fail "${TEST_GROUP}: ${tap_title}" return 1 Found error in /usr/lib/kselftests/intel_pstate/run.sh: $ grep -A5 -B5 /tmp/ /usr/lib/kselftests/intel_pstate/run.sh # and the value of MSR 0x199 (MSR_IA32_PERF_CTL) which indicates what # pstate the cpu is in, and the value of # /sys/devices/system/cpu/intel_pstate/max_perf_pct X maximum turbo state # # Notes: In some cases several frequency values may be placed in the # /tmp/result.X files. This is done on purpose in order to catch cases # where the pstate driver may not be working at all. There is the case # where, for example, several "similar" frequencies are in the file: # # #/tmp/result.3100:1:cpu MHz : 2899.980 #/tmp/result.3100:2:cpu MHz : 2900.000 #/tmp/result.3100:3:msr 0x199: 0x1e00 #/tmp/result.3100:4:max_perf_pct 94 # # and the test will error out in those cases. The result.X file can be checked # for consistency and modified to remove the extra MHz values. The result.X # files can be re-evaluated by setting EVALUATE_ONLY to 1 below. -- ./aperf $cpu & done echo "sleeping for 5 seconds" sleep 5 grep MHz /proc/cpuinfo | sort -u > /tmp/result.freqs num_freqs=$(wc -l /tmp/result.freqs | awk ' { print $1 } ') if [ $num_freqs -ge 2 ]; then tail -n 1 /tmp/result.freqs > /tmp/result.$1 else cp /tmp/result.freqs /tmp/result.$1 fi ./msr 0 >> /tmp/result.$1 max_perf_pct=$(cat /sys/devices/system/cpu/intel_pstate/max_perf_pct) echo "max_perf_pct $max_perf_pct" >> /tmp/result.$1 for job in `jobs -p` do echo "waiting for job id $job" wait $job -- echo "The marketing frequency of the cpu is $mkt_freq MHz" echo "The maximum frequency of the cpu is $max_freq MHz" echo "The minimum frequency of the cpu is $min_freq MHz" # make a pretty table echo "Target Actual Difference MSR(0x199) max_perf_pct" | tr " " "\n" > /tmp/result.tab for freq in `seq $max_freq -100 $min_freq` do result_freq=$(cat /tmp/result.${freq} | grep "cpu MHz" | awk ' { print $4 } ' | awk -F "." ' { print $1 } ') msr=$(cat /tmp/result.${freq} | grep "msr" | awk ' { print $3 } ') max_perf_pct=$(cat /tmp/result.${freq} | grep "max_perf_pct" | awk ' { print $2 } ' ) cat >> /tmp/result.tab << EOF $freq $result_freq $((result_freq - freq)) $msr $((max_perf_pct usr max_freq)) EOF done # print the table pr -aTt -5 < /tmp/result.tab exit 0 |