Skip to content
Snippets Groups Projects
  1. Feb 17, 2023
  2. Feb 15, 2023
    • Nikita Zheleztsov's avatar
      icu: fix NULL dereference in `unum_clone` · 62bb71cf
      Nikita Zheleztsov authored
      If `dynamic_cast` fails, then NULL is returned. Even thought
      assertion is set, we cannot rely on it, as we don't use debug
      version of icu. Let's check if `rbnf` variable is not NULL
      explicitly.
      
      If it somehow turned out to be NULL, then memory allocation
      error will be thrown.
      
      Closes tarantool/security#61
      
      NO_CHANGELOG=<security fix>
      NO_DOC=<security fix>
      NO_TEST=<third-party security fix>
      62bb71cf
    • Nikita Zheleztsov's avatar
      icu: fix NULL dereference in `enumEitherTrie` · 73b01ea5
      Nikita Zheleztsov authored
      According to the business logic and assertions `idx` and `data32`
      variables cannot be equal to NULL at the same time. However, we
      cannot rely on assertions.
      
      Let's check that explicitly. If this situation occurs somehow
      the function exits as we cannot recover from this situation: we
      don't have sources, from which values for enumeration can be taken.
      Moreover, continuing of the code execution is such situation may
      lead to accessing NULL if `c<limit`.
      
      Closes tarantool/security#59
      
      NO_CHANGELOG=<security fix>
      NO_DOC=<security fix>
      NO_TEST=<third-party security fix>
      73b01ea5
  3. Feb 13, 2023
    • Georgiy Lebedev's avatar
      static-build: fix potential NULL dereference in openssl · a8c6c27c
      Georgiy Lebedev authored
      `set_client_ciphersuite` can potentially dereference NULL if the session's
      cipher is not set — add a check for this condition.
      
      Closes tarantool/security#27
      
      NO_CHANGELOG=<security fix>
      NO_DOC=<security fix>
      NO_TEST=<third-party security fix>
      a8c6c27c
    • Vladimir Davydov's avatar
      static-build: don't use cat to apply multiple patches · 9549310d
      Vladimir Davydov authored
      The problem is if cat fails, because a patch file doesn't exist
      PATH_COMMAND written like this won't detect it, because the last
      command (patch) will complete successfully (apply existing patches
      found by cat):
      
        cat XXX.patch YYY.patch | patch -p1
      
      The proper way is to use PATCH_COMMAND continuation:
      
        PATCH_COMMAND patch -p1 -i XXX.patch
        COMMAND       patch -p1 -i YYY.patch
      
      NO_DOC=build
      NO_TEST=build
      NO_CHANGELOG=build
      9549310d
  4. Feb 10, 2023
    • Pavel Balaev's avatar
      static-build: fix potential NULL deref in openssl · 639ec224
      Pavel Balaev authored
      tls_construct_ctos_session_ticket() has a potential
      NULL pointer dereference.
      
      Closes tarantool/security#54
      
      NO_DOC=security
      NO_TEST=security
      NO_CHANGELOG=security
      639ec224
    • psergee's avatar
      icu: fix potential out-of-bounds access · 66f2679d
      psergee authored
      Added bounds check after conversion of a string key to int to avoid
      potential out-of-bounds access.
      
      Closes tarantool/security#45
      
      NO_TEST=trivial
      NO_CHANGELOG=internal
      NO_DOC=internal
      66f2679d
    • Vladimir Davydov's avatar
      static-build: move all patches to patches sub-directory · b8ec809e
      Vladimir Davydov authored
      We're going to add a whole bunch of them. Putting them all in
      a sub-directory will help keeping the file tree organized.
      
      Note, we have to update .gitignore so that the patches/ sub-directory
      is ignored only at the top level (it's used by quilt).
      
      NO_DOC=build
      NO_TEST=build
      NO_CHANGELOG=build
      b8ec809e
  5. Jan 18, 2023
    • Vladimir Davydov's avatar
      static-build: disable symbols renaming for libicu · 9362f4a8
      Vladimir Davydov authored
      ICU symbol renaming was disabled in EE build by commit
      https://github.com/tarantool/tarantool-ee/commit/f51346d682e3afd93592023d0dedfb1e45167c7a
      ("static-build: disable symbols renaming for libicu"), because EE build
      exports ICU symbols so that they can be used by Lua modules. It isn't
      necessary in CE build, but since we're planning to reuse the CE cmake
      config in the EE repository, we should do that.
      
      Needed for https://github.com/tarantool/tarantool-ee/issues/185
      
      NO_DOC=no functional changes
      NO_TEST=no functional changes
      NO_CHANGELOG=no functional changes
      9362f4a8
    • Vladimir Davydov's avatar
      static-build: make cmake file reusable · 520884a9
      Vladimir Davydov authored
      Split it so that it can be reused in the EE repository:
      
       - static-build/cmake/AddDependencyProjects.cmake
         Adds the external projects that are required to build tarantool.
         The project names are stored in the TARANTOOL_DEPENDS variable.
      
       - static-build/cmake/AddTarantoolProject.cmake
         Should be called after AddDependencyProjects.cmake, because it
         uses the TARANTOOL_DEPENDS variable. Adds the Tarantool external
         project and sets the TARANTOOL_BINARY to the path to the built
         tarantool binary.
      
       - static-build/cmake/AddTests.cmake
         Should be called after AddTarantoolProject.cmake, because it uses
         the TARANTOOL_BINARY variable. Adds cmake tests for the static
         binary.
      
      Now, static-build/CMakeLists.txt just includes the three helper files.
      The helper files are designed in such a way that they can be included
      from the EE repository's CMakeLists.txt. We split the original config
      into the three helper files, because in the EE repository, we need to
      add extra dependency projects and extra tests.
      
      While we are at it, we also move the cmake tests from
      static-build/test/static-build to static-build/test and
      static-build/test/CheckDependencies.cmake to
      static-build/cmake/CheckDependencies.cmake.
      
      This commit introduces no functional changes - it just moves the code.
      
      Needed for https://github.com/tarantool/tarantool-ee/issues/185
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      520884a9
  6. Nov 07, 2022
  7. Oct 21, 2022
    • Georgiy Lebedev's avatar
      build: use relative paths in diagnostics and debugging information · 256da010
      Georgiy Lebedev authored
      Since our diagnostics use the `__FILE__` macro, they provide absolute
      paths, which is kind of redundant and inconsistent: replace them with
      relative ones.
      
      As for debugging information, replacing absolute paths with relative ones
      also requires an extra command to tell the debugger where to find the
      source files, which is not convenient for developers: provide a new
      `DEV_BUILD` option (turned off by default), which replaces absolute paths
      with relative ones in debugging information if turned off.
      
      Strip the prefix map flags from compiler flags exported to tarantool via
      `src/trvia/config.h`.
      
      Closes #7808
      
      NO_DOC=<verbosity>
      NO_TEST=<verbosity>
      256da010
    • Georgiy Lebedev's avatar
      build: refactor setting hardening compiler flags · dd51a2fa
      Georgiy Lebedev authored
      Setting hardening compiler flags is used in three places: default build,
      static build and enterprise build — refactor it into a separate module.
      
      Follow-up e6abe1c9
      
      NO_CHANGELOG=refactoring
      NO_DOC=refactoring
      NO_TEST=refactoring
      dd51a2fa
  8. Sep 15, 2022
    • Ilya Verbin's avatar
      cmake: add extra security compiler options · e6abe1c9
      Ilya Verbin authored
      Introduce cmake option ENABLE_HARDENING, which is TRUE by default for
      non-debug regular and static builds, excluding AArch64 and FreeBSD.
      It passess compiler flags that harden Tarantool (including the bundled
      libraries) against memory corruption attacks. The following flags are
      passed:
      
      * -Wformat - Check calls to printf and scanf, etc., to make sure that
        the arguments supplied have types appropriate to the format string
        specified.
      
      * -Wformat-security -Werror=format-security - Warn about uses of format
        functions that represent possible security problems. And make the
        warning into an error.
      
      * -fstack-protector-strong - Emit extra code to check for buffer
        overflows, such as stack smashing attacks.
      
      * -fPIC -pie - Generate position-independent code (PIC). It allows to
        take advantage of the Address Space Layout Randomization (ASLR).
      
      * -z relro -z now - Resolve all dynamically linked functions at the
        beginning of the execution, and then make the GOT read-only.
      
      Also do not disable hardening for Debian and RPM-based Linux distros.
      
      Closes #5372
      Closes #7536
      
      NO_DOC=build
      NO_TEST=build
      e6abe1c9
  9. Aug 16, 2022
    • Ilya Verbin's avatar
      cmake: detect changes in source files upon static build · a1f554bd
      Ilya Verbin authored
      Currently `make` in `static-build` doesn't rebuild Tarantool when source
      files are changed. Fix this by setting BUILD_ALWAYS option, which forces
      rescan for changes of the external project [1]:
      
      > This option is not normally needed unless developers are expected to
      > modify something the external project's build depends on in a way that
      > is not detectable via the step target dependencies (e.g. SOURCE_DIR is
      > used without a download method and developers might modify the sources
      > in SOURCE_DIR).
      
      It is available since CMake 3.1, so update cmake_minimum_required, as we
      already require it (fa8d70ca).
      
      [1] https://cmake.org/cmake/help/latest/module/ExternalProject.html
      
      Part of #7536
      
      NO_DOC=build
      NO_TEST=build
      NO_CHANGELOG=minor
      a1f554bd
  10. Aug 03, 2022
    • Vladimir Davydov's avatar
      static-build: update zlib to version 1.2.12 · 5da1f6be
      Vladimir Davydov authored
      NO_DOC=build
      NO_TEST=build
      5da1f6be
    • Alexander Turenko's avatar
      static-build: update libiconv to 1.17 (Mac OS) · 3ca56bc4
      Alexander Turenko authored
      The static build for Linux leans on glibc provided iconv functions. On
      Mac OS it links GNU libiconv statically. This patch updates the libiconv
      version from 1.16 (released in 2019) to 1.17 (released in 2022).
      
      It is just regular maintenance update. No behaviour changes are
      expected. The libiconv 1.17 changelog (see the NEWS file in the archive)
      does not mention anything that may have influence on behavior of
      tarantool's iconv built-in module.
      
      NO_DOC=no user-visible changes
      NO_TEST=no user-visible changes
      NO_CHANGELOG=no user-visible changes
      3ca56bc4
  11. Aug 02, 2022
  12. Jul 15, 2022
  13. Apr 14, 2022
  14. Apr 13, 2022
  15. Mar 29, 2022
  16. Mar 24, 2022
  17. Mar 18, 2022
    • Georgiy Lebedev's avatar
      libunwind: add new submodule · 7dc9fe44
      Georgiy Lebedev authored
      Investigation of GNU libunwind problems on the aarch64-linux-gnu
      platform drive us to the conclusion that libunwind-1.2.1 provided by
      major distribution packages is broken. Not to mention that its test
      suite fails with SEGFAULTs.
      
      Last but not least, some distributions, e.g. CentOS 8 (see #4611) do
      not provide a libunwind package.
      
      Hence, bundle libunwind: bundling is enabled by default on all
      platforms, except for macOS — a system package can be used if its
      version is greater or equal than 1.3.0 (minimal version that does not
      seem to be broken on aarch64-linux-gnu).
      
      * Add new submodule: bump it to current master.
      * Refactor libunwind package search logic out of compiler.cmake.
      * Add CMake script for building bundled libunwind.
      * Add CMake script for extracting version of libunwind.
      * Re-enable backtrace for all RHEL distributions by default.
      * Remove libunwind from static build.
      
      Needed for #4002
      Closes #4611
      
      NO_DOC=build system
      NO_TEST=build system
      7dc9fe44
  18. Jan 31, 2022
    • Andrei Sidorov's avatar
      Fix static build for macOS Bug Sur · a7724d8f
      Andrei Sidorov authored
      Fix static build for macOS 11.5 or higher.
      On macOS SDK ver. 11.5 some `*.dylib` files was replaced with `*.tbd`.
      So we replace `libunwind.dylib` on `libunwind.tbd`.
      Because of macOS 10.15 support being dropped
      conditional is not needed.
      
      Closes #6052
      a7724d8f
  19. Dec 13, 2021
    • Vladimir Davydov's avatar
      Make lookup of statically built binary more robust · 88332b35
      Vladimir Davydov authored
      If the tarantool repository is used as a submodule named <foobar> in
      another repository, then the statically built binary will be placed in
      
        <binary_dir>/<foobar>/src/tarantool
      
      not in
      
        <binary_dir>/src/tarantool
      
      where static-build/CMakeLists.txt currently tries to look it up in order
      to run `ctest` and so we can't use static-build/CMakeLists.txt as is.
      
      Let's instead use
      
        <install_dir>/bin/tarantool
      
      This way `ctest` will work for static-build in both open-source and EE
      repository without requiring any modifications.
      88332b35
  20. Dec 10, 2021
  21. May 20, 2021
  22. Jan 29, 2021
  23. Sep 15, 2020
    • HustonMmmavr's avatar
      build: refactor static build process · 800e5ed6
      HustonMmmavr authored
      
      Refactored static build process to use static-build/CMakeLists.txt
      instead of Dockerfile.staticbuild (this allows to support static
      build on macOS). Following third-party dependencies for static build
      are installed via cmake `ExternalProject_Add`:
        - OpenSSL
        - Zlib
        - Ncurses
        - Readline
        - Unwind
        - ICU
      
      * Added support static build for macOS
      * Fixed `CONFIGURE_COMMAND` while building bundled libcurl for static
        build at file cmake/BuildLibCURL.cmake:
          - disable building shared libcurl libraries (by setting
            `--disable-shared` option)
          - disable hiding libcurl symbols (by setting
            `--disable-symbol-hiding` option)
          - prevent linking libcurl with system libz (by setting
            `--with-zlib=${FOUND_ZLIB_ROOT_DIR}` option)
      * Removed Dockerfile.staticbuild
      * Added new gitlab.ci jobs to test new style static build:
        - static_build_cmake_linux
        - static_build_cmake_osx_15
      * Removed static_docker_build gitlab.ci job
      
      Closes #5095
      
      Co-authored-by: default avatarYaroslav Dynnikov <yaroslav.dynnikov@gmail.com>
      800e5ed6
Loading