WebKit(jsc)の脆弱性(CVE-2018-4192)の検証を行いたく、Gitでバージョンを遡ってビルドしたいと考えました。
git checkout c7012f37870ddc8867857d7d6854b057f2c208cb
しかしビルド時に以下のようなエラーが出ました。
❯ ./Tools/Scripts/build-webkit --debug --jsc-only ************************************************************* Xcode 7.0 or later is required to build WebKit. You have an earlier version of Xcode, thus the build will most likely fail. The latest Xcode is available from the App Store. ************************************************************* Use of uninitialized value $previousContents in chomp at /Users/appbana/workspace/WebKit.git/Tools/Scripts/webkitdirs.pm line 1969. Use of uninitialized value $previousContents in string ne at /Users/appbana/workspace/WebKit.git/Tools/Scripts/webkitdirs.pm line 1972. + cmake --build /Users/appbana/workspace/WebKit.git/WebKitBuild/Debug --config Debug -- -j4 [ 0%] Generating ../../DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/builtins.py [ 2%] Built target bmalloc [ 2%] Generating ../../DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/builtins_generate_combined_implementation.py [ 2%] Generating ../../DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/builtins_generate_separate_header.py [ 2%] Built target JavaScriptCoreForwardingHeaders [ 24%] Built target WTFForwardingHeaders [ 24%] Generating ../../DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/builtins_generate_separate_implementation.py [ 38%] Generating ../../DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/builtins_generate_wrapper_header.py [ 64%] Built target JavaScriptCorePrivateForwardingHeaders [ 64%] Generating ../../DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/builtins_generate_wrapper_implementation.py [ 64%] Built target sysmalloc [ 64%] Generating ../../DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/builtins_generator.py [ 64%] Generating ../../DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/builtins_templates.py [ 64%] Linking CXX shared library ../../lib/libmbmalloc.dylib [ 64%] Generating ../../DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/generateYarrUnicodePropertyTables.py [ 64%] Generating ../../DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/hasher.py clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk' [-Wmissing-sysroot] [ 66%] Built target stageSharedScripts ld: library not found for -lc++ [ 75%] Built target WTF clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [lib/libmbmalloc.dylib] Error 1 make[1]: *** [Source/bmalloc/CMakeFiles/mbmalloc.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 75%] Built target gtest [ 75%] Building CXX object Source/JavaScriptCore/CMakeFiles/LLIntOffsetsExtractor.dir/llint/LLIntOffsetsExtractor.cpp.o clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk' [-Wmissing-sysroot] In file included from /Users/appbana/workspace/WebKit.git/Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp:26: In file included from /Users/appbana/workspace/WebKit.git/Source/JavaScriptCore/config.h:26: In file included from /Users/appbana/workspace/WebKit.git/Source/JavaScriptCore/runtime/JSExportMacros.h:32: In file included from /Users/appbana/workspace/WebKit.git/WebKitBuild/Debug/DerivedSources/ForwardingHeaders/wtf/ExportMacros.h:32: /Users/appbana/workspace/WebKit.git/WebKitBuild/Debug/DerivedSources/ForwardingHeaders/wtf/Platform.h:341:10: fatal error: 'Availability.h' file not found #include <Availability.h> ^~~~~~~~~~~~~~~~ 1 error generated. make[2]: *** [Source/JavaScriptCore/CMakeFiles/LLIntOffsetsExtractor.dir/llint/LLIntOffsetsExtractor.cpp.o] Error 1 make[1]: *** [Source/JavaScriptCore/CMakeFiles/LLIntOffsetsExtractor.dir/all] Error 2 make: *** [all] Error 2
試しにxcodeからもビルドを行ってみましたが、同様のエラーのためビルドできませんでした。
このエラーを回避してビルドを行う方法、もしくは別の方法でCVE-2018-4192を検証する方法がありましたら教えてください。
あなたの回答
tips
プレビュー