123 Star 0 Fork 13

src-openEuler / opusfile

 / 详情

Unexpect-shift in op_rescale64

已完成
缺陷
创建于  
2021-11-23 17:07
src/opusfile.c:1024:12: runtime error: left shift of negative value -1
    #0 0x4c1084 in op_rescale64 /src/opusfile/src/opusfile.c:1024:12
    #1 0x4b9195 in op_pcm_seek_page /src/opusfile/src/opusfile.c:2408:22
    #2 0x4b833b in op_pcm_seek /src/opusfile/src/opusfile.c:2624:7
    #3 0x4afc1f in LLVMFuzzerTestOneInput /src/opusfile_fuzzer.c:99:11
    #4 0x440ff3 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:599:15
    #5 0x42c762 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:323:6
    #6 0x432406 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:856:9
    #7 0x45b912 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
    #8 0x7fed90b9cb26 in __libc_start_main (/lib64/libc.so.6+0x25b26)
    #9 0x408619 in _start (/root/oss-fuzz/build/out/opusfile/opusfile_fuzzer+0x408619)

评论 (2)

fusiontest 创建了缺陷
fusiontest 上传了附件fusiontest-testcase-opusfile_fuzzer-202111200002-ubsan.rar
openeuler-ci-bot 添加了
 
sig/Others
标签
展开全部操作日志

Hi fusiontest, 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: Others, and any of the maintainers: @jimmy_hero, @small_leek.

tushenmei 负责人设置为small_leek
tushenmei 上传了附件fusiontest-testcase-opusfile_fuzzer-202111200001
tushenmei 删除了附件fusiontest-testcase-opusfile_fuzzer-202111200001

原因分析:左移运算中要求左值类型转换为unsigned int,/src/opusfile.c第1024行参与左移运算的_x值类型为opus_int64,即为long long类型,并非unsigned int类型

修复方案:是在左移前将运算数_x强制类型转换为unsigned long long类型,即opus_uint64,左移运算完再将_x转化为自己本身的类型opus_int64

验证结果:
输入图片说明

caodongxia 通过src-openeuler/opusfile Pull Request !10任务状态待办的 修改为已完成

登录 后才可以发表评论

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

搜索帮助