121 Star 0 Fork 23

src-openEuler/strongswan

 / 详情

【fuzz】bio_reader.c 出现 use-of-uninitialized-value

已完成
缺陷
创建于  
2021-08-30 11:59

【标题描述】bio_reader.c 出现 use-of-uninitialized-value
【环境信息】
硬件信息:
1) x86
软件信息:
1) openEuler 21.09
2) 软件信息
Name: strongswan
Version: 5.7.2
Release: 7
【问题复现步骤】
1、获取源码
rpmbuild -bp strongswan.spec
2、打补丁
3、编译
python3 infra/helper.py build_fuzzers --sanitizer memory strongswan
4、运行
python3 infra/helper.py run_fuzzer strongswan fuzz_pa_tnc

python3 infra/helper.py run_fuzzer strongswan fuzz_pb_tnc
【预期结果】
描述预期结果,可以通过对比新老版本获取
【实际结果】

==8==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x5c37a1 in read_uint24_internal /src/strongswan/src/libstrongswan/bio/bio_reader.c:134:9
    #1 0x5c3354 in read_uint24 /src/strongswan/src/libstrongswan/bio/bio_reader.c:205:9
    #2 0x55c1af in process /src/strongswan/src/libimcv/pa_tnc/pa_tnc_msg.c:213:2
    #3 0x51f84c in LLVMFuzzerTestOneInput /src/strongswan/fuzz/fuzz_pa_tnc.c:43:6
    #4 0x459341 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:556:15
    #5 0x4446a2 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:296:6
    #6 0x44a737 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:776:9
    #7 0x472d82 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:19:10
    #8 0x7f232a5f482f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #9 0x41ecb8 in _start (/out/fuzz_pa_tnc+0x41ecb8)

  Uninitialized value was created by an allocation of 'tmp' in the stack frame of function 'read_uint24_internal'
    #0 0x5c3360 in read_uint24_internal /src/strongswan/src/libstrongswan/bio/bio_reader.c:124

SUMMARY: MemorySanitizer: use-of-uninitialized-value /src/strongswan/src/libstrongswan/bio/bio_reader.c:134:9 in read_uint24_internal

【附件信息】
比如系统message日志/组件日志、dump信息、图片等

附件
fuzz.patch(10.16 KB)下载
jinjin 2021-08-30 11:58

评论 (1)

jinjin 创建了缺陷
jinjin 关联仓库设置为src-openEuler/strongswan
openeuler-ci-bot 添加了
 
sig/Application
标签
展开全部操作日志

Hey yanglijin, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at
https://gitee.com/openeuler/community/blob/master/en/sig-infrastructure/command.md.
If you have any questions, please contact the SIG: Application, and any of the maintainers: @jimmy_hero, @朱春意, @Alex_Chao, @惊奇脆片饼干, @wx897463, @BigSkySea, @small_leek.

jinjin 负责人设置为small_leek
jinjin 里程碑设置为openEuler-21.09-round-2
jinjin 修改了描述
caodongxia 通过src-openeuler/strongswan Pull Request !18任务状态待办的 修改为已完成

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(2)
5329419 openeuler ci bot 1632792936
1
https://gitee.com/src-openeuler/strongswan.git
git@gitee.com:src-openeuler/strongswan.git
src-openeuler
strongswan
strongswan

搜索帮助

Cb406eda 1850385 E526c682 1850385