Bug 11805 - [ltp测试]ltp测试cve:cve-2019-8912用例执行fail,调用setsockopt函数失败
Summary: [ltp测试]ltp测试cve:cve-2019-8912用例执行fail,调用setsockopt函数失败
Status: CLOSED INVALID
Alias: None
Product: Antest
Classification: Infrastructures
Component: 测试用例 (show other bugs) 测试用例
Version: unspecified
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: yunmeng365524
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-11 17:45 UTC by Banana
Modified: 2024-11-19 20:01 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Banana alibaba_cloud_group 2024-11-11 17:45:39 UTC
[问题描述]:
ltp测试cve:cve-2019-8912用例执行fail,调用setsockopt函数失败

<<<test_output>>>
tst_test.c:1741: TINFO: LTP version: 20240417
tst_test.c:1625: TINFO: Timeout per run is 0h 00m 30s
tst_buffers.c:57: TINFO: Test is using guarded buffers
accept02.c:131: TINFO: Starting listener on port: 34509
accept02.c:54: TBROK: setsockopt(3, 0, 42, 0xffff80deaf78, 136) failed: ENODEV (19)

HINT: You _MAY_ be missing kernel fixes:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=657831ff

HINT: You _MAY_ be vulnerable to CVE(s):

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8890


部分测试源码:
TEST(setsockopt(clone_server_sockfd, SOL_IP, MCAST_LEAVE_GROUP,
                        mc_group, mc_group_len));

[环境信息]:
物理机

[内核信息]:
6.6.25-2.2_rc1.an23.aarch64

[操作系统信息]:
[root@localhost ~]# cat /etc/os-release
NAME="Anolis OS"
VERSION="23.1"
ID="anolis"
VERSION_ID="23.1"
PLATFORM_ID="platform:an23"
PRETTY_NAME="Anolis OS 23.1"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"
BUG_REPORT_URL="https://bugzilla.openanolis.cn/"

[期望结果]:
执行pass

[实际结果]:
fail

[复现步骤]:
1、安装ltp测试套
2、执行./runltp -f cve -s cve-2014-0196
Comment 1 anolislw alibaba_cloud_group 2024-11-15 15:20:21 UTC
x86环境下cve/cve-2017-8890也存在一样的问题
-------------------------
<<<test_start>>>
tag=cve-2017-8890 stime=1731655093
cmdline="accept02"
contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
tst_tmpdir.c:316: TINFO: Using /tmp/ltp-lOVpRkskpC/LTP_accomJzMz as tmpdir (tmpfs filesystem)
tst_test.c:1890: TINFO: LTP version: 20240930-79-gec4161186
tst_test.c:1894: TINFO: Tested kernel: 6.6.25-2.2_rc1.an23.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Oct 31 21:26:10 CST 2024 x86_64
tst_test.c:1725: TINFO: Timeout per run is 0h 00m 30s
tst_buffers.c:57: TINFO: Test is using guarded buffers
accept02.c:131: TINFO: Starting listener on port: 35851
accept02.c:54: TBROK: setsockopt(3, 0, 42, 0x7f13226d1f78, 136) failed: ENODEV (19)

HINT: You _MAY_ be missing kernel fixes:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=657831ff

HINT: You _MAY_ be vulnerable to CVE(s):

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8890

Summary:
passed   0
failed   0
broken   1
skipped  0
warnings 0
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=2 corefile=no
cutime=0 cstime=0
<<<test_end>>>
INFO: ltp-pan reported some tests FAIL
LTP Version: 20240930-79-gec4161186

       ###############################################################

            Done executing testcases.
            LTP Version:  20240930-79-gec4161186
       ###############################################################

-------------------------------------------
INFO: runltp script is deprecated, try kirk
https://github.com/linux-test-project/kirk
-------------------------------------------
[root@5f9Lab15 ltp]# ./runltp  -f cve -s cve-2017-8890
[root@5f9Lab15 ltp]# uname -r
6.6.25-2.2_rc1.an23.x86_64
Comment 2 lv0322 alibaba_cloud_group 2024-11-18 11:26:19 UTC
添加默认路由之后,用例可以正常通过
Comment 3 yunmeng365524 2024-11-19 20:00:16 UTC
添加路由后可正常执行,问题关闭。