Skip to content
Snippets Groups Projects
  1. Feb 27, 2023
  2. Feb 22, 2023
  3. Feb 20, 2023
    • Kirill Yukhin's avatar
      Generate changelog for 2.10.5 · 87d07d15
      Kirill Yukhin authored
      Generate changelog for 2.10.5 release.
      Also, clean changelogs/unreleased folder.
      
      NO_DOC=no code changes
      NO_TEST=no code changes
      NO_CHANGELOG=no code changes
    • Pavel Semyonov's avatar
      doc: proofread 2.10.5 changelogs · f9c33990
      Pavel Semyonov authored
      Proofread changelogs for 2.10.5
      Fix grammar, punctuation, and wording
      
      NO_CHANGELOG=changelog
      NO_DOC=changelog
      NO_TEST=changelog
      f9c33990
    • Igor Munkin's avatar
      luajit: bump new version · 2b592f2c
      Igor Munkin authored
      * ci: add LUAJIT_ENABLE_CHECKHOOK for exotic matrix
      * ci: add ARM64 architecture to exotic testing
      * ci: update action/checkout to v3
      * Fix os.date() for wider libc strftime() compatibility.
      * x86/x64: Fix loop realignment.
      * ci: introduce workflow for exotic builds
      * sysprof: fix interval parsing in dual-number mode
      * test: add test for `string.format('%c', 0)`
      * ci: drop obsolete arguments for LuaJIT integration
      * ci: stop using Ninja for integration testing
      
      Part of #8069
      
      NO_DOC=LuaJIT submodule bump
      NO_TEST=LuaJIT submodule bump
      2b592f2c
  4. Feb 17, 2023
  5. Feb 16, 2023
    • kolsys's avatar
      log: fix syslog facility for Alpine and OpenBSD · 2df10ef1
      kolsys authored
      Fixed a bug with syslog priority for OS with non-standart `LOG_MAKEPRI`
      macro.
      
      Affected all versions for OS: Alpine (including official docker images),
      OpenBSD and maybe others.
      
      Fixes #8269
      
      NO_DOC=bugfix
      NO_TEST=exists
      
      (cherry picked from commit acca6d7a)
      2df10ef1
  6. Feb 15, 2023
    • Nikolay Shirokovskiy's avatar
      test: bump test-run to version w/ updated luatest · 271e6690
      Nikolay Shirokovskiy authored
      Bump test-run to new version with the following improvements:
      
      - Bump luatest to 0.5.7-27-g42d4e24 [1]
      
      [1] tarantool/test-run@ea517ac
      
      NO_DOC=testing stuff
      NO_TEST=testing stuff
      NO_CHANGELOG=testing stuff
      
      (cherry picked from commit ba7b967e)
      271e6690
    • Mergen Imeev's avatar
      box: check tuple_field_by_path first argument type · 0959c847
      Mergen Imeev authored
      This patch adds a type check of the first argument of the
      tuple_field_by_path() function.
      
      Closes tarantool/security#82
      
      NO_DOC=internal
      NO_TEST=internal
      NO_CHANGELOG=internal
      
      (cherry picked from commit 0d9213aa)
      0959c847
    • Nikita Zheleztsov's avatar
      icu: fix NULL dereference in `unum_clone` · 1b422028
      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>
      
      (cherry picked from commit 62bb71cf)
      1b422028
    • Nikita Zheleztsov's avatar
      icu: fix NULL dereference in `enumEitherTrie` · 53d77748
      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>
      
      (cherry picked from commit 73b01ea5)
      53d77748
    • Ilya Verbin's avatar
      core: replace sysconf(_SC_PAGESIZE) with small_getpagesize() · 8f5a6ab5
      Ilya Verbin authored
      Bump the small submodule and use small_getpagesize(), which is a
      wrapper over sysconf(_SC_PAGESIZE) with a proper error checking.
      
      Closes tarantool/security#78
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      
      (cherry picked from commit 7932144d)
      8f5a6ab5
    • Ilya Verbin's avatar
      box: check return value of obuf_alloc() in xlog_tx_write_zstd() · a0f776d6
      Ilya Verbin authored
      obuf_alloc(&log->zbuf, XLOG_FIXHEADER_SIZE) can potentially fail,
      because there is no obuf_reserve() prior to it.
      
      Closes tarantool/security#74
      
      NO_DOC=bugfix
      NO_CHANGELOG=bugfix
      NO_TEST=no test harness for checking OOM
      
      (cherry picked from commit 32dfcb3c)
      a0f776d6
    • Vladimir Davydov's avatar
      lua-yaml: enable aliasing for objects returned by __serialize · cce01025
      Vladimir Davydov authored
      The YAML serializer fails to detect aliases in objects returned by
      the __serialize method:
      
      tarantool> x = {}
      ---
      ...
      
      tarantool> {a = x, b = x}
      ---
      - a: &0 []
        b: *0
      ...
      
      tarantool> setmetatable({}, {
               >     __serialize = function() return {a = x, b = x} end,
               > })
      ---
      - a: []
        b: []
      ...
      
      Fix this by scanning the object returned by the __serialize method
      (called by luaL_checkfield) for references.
      
      Closes #8240
      
      NO_DOC=bug fix
      
      (cherry picked from commit b42302f5)
      cce01025
    • Vladimir Davydov's avatar
      lua-yaml: call __serialize once for all aliases · 5fc0182d
      Vladimir Davydov authored
      The YAML format supports aliasing - if the same object is referenced
      more than once, it will be encoded in one places with other places
      being turned to references:
      
        tarantool> x = {}
        ---
        ...
      
        tarantool> {a = x, b = x}
        ---
        - a: &0 []
          b: *0
        ...
      
      This feature is useful for dumping a space list (e.g. box.space)
      to the console, because each space is referenced by name and id.
      
      However, it doesn't work if the referenced object implements
      the __serialize method:
      
        tarantool> x = setmetatable({}, {
                 >     __serialize = function() return {} end,
                 > })
        ---
        ...
      
        tarantool> {a = x, b = x}
        ---
        - a: []
          b: []
        ...
      
      This happens because we check for aliases in dump_array and dump_table
      (with get_yaml_anchor), after calling the __serialize method via
      luaL_checkfield. Since the __serialize method may (and usually does)
      return a different object on each invocation, aliases aren't detected.
      
      Let's fix it by calling alias detection (get_yaml_anchor) before
      luaL_checkfield and passing the anchor to dump_table/dump_array.
      
      Needed for https://github.com/tarantool/tarantool-ee/issues/221
      Part of #8240
      
      NO_DOC=bug fix
      NO_CHANGELOG=next commit
      
      (cherry picked from commit 310de56f)
      5fc0182d
  7. Feb 14, 2023
    • Alexander Turenko's avatar
      box: eliminate code injection in replication_synchro_quorum · fbc4cbf3
      Alexander Turenko authored
      It was possible to execute arbitrary Lua code outside of the setfenv()
      environment. Example:
      
      NO_WRAP
      ```lua
      tarantool> box.cfg{replication_synchro_quorum = [=[N / 2 + 1]] _G.test = true --[[]=]}
      tarantool> test
      ---
      - true
      ...
      ```
      NO_WRAP
      
      How it works:
      
      ```lua
      local expr = [[%s]]
      ```
      
      Let's assume that `%s` is replaced by `]]<..code..>--[[`. The result is the
      following (newlines are added for readability):
      
      ```lua
      local expr = [[]]
      <..code..>
      --[[]]
      ```
      
      This code is executed outside of the setfenv() protected function.
      
      The fix is to pass the expression as an argument instead of using
      `snprintf()`.
      
      Fixes https://github.com/tarantool/security/issues/20
      Fixes GHSA-74jr-2fq7-vp42
      
      NO_DOC=bugfix
      fbc4cbf3
    • Ilya Verbin's avatar
      box: don't check return values of some cfg_gets() for NULL · c6a9d1db
      Ilya Verbin authored
      Sometimes the return value of cfg_gets() is checked for NULL, and sometimes
      not. Actually this is intended, although a bit confusing. If an option can
      have a nil value, it must be checked for NULL, but if it can't be nil,
      there is no sense in it. The nil value can be assigned only by default, it
      cannot be set via box.cfg{}.
      
      This patch removes the NULL checks for cfg_gets("election_mode") and
      cfg_gets("election_fencing_mode") because they are not nil by default.
      All other non-nil options (e.g. cfg_gets("bootstrap_strategy")) are
      already implemented without the NULL checks.
      
      Follow-up tarantool/security#75
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      
      (cherry picked from commit 5a2dc43c)
      c6a9d1db
  8. Feb 13, 2023
    • Georgiy Lebedev's avatar
      mpstream: fix NULL dereference in `mpstream_encode_double` · 282b90ec
      Georgiy Lebedev authored
      `mpstream_encode_double`, apparently, has a typo: the result of
      `mpstream_reserve` is checked after encoding the double into the result
      buffer — fix it.
      
      Closes tarantool/security#63
      
      NO_DOC=bug fix
      NO_CHANGELOG=see NO_TEST
      NO_TEST=unlikely to happen because malloc shouldn't normally fail, and
      	we don't test other mpstream methods for OOM either
      
      (cherry picked from commit ccf3130c)
      282b90ec
    • Vladimir Davydov's avatar
      mpstream: code cleanup · 36da7658
      Vladimir Davydov authored
       - Use tabs instead of spaces as we usually do.
       - Drop pointless coversion of (void *) to (char *).
       - Add missing comments to struct mpstream members.
       - Cleanup header list.
       - Use short licence.
      
      NO_DOC=code cleanup
      NO_TEST=code cleanup
      NO_CHANGELOG=code cleanup
      
      (cherry picked from commit c2b76592)
      36da7658
    • Georgiy Lebedev's avatar
      recovery: check return value of `fiber_new_system` for watcher fiber · f3fcd26e
      Georgiy Lebedev authored
      `fiber_new_system` can potentially fail — its return value for the watcher
      fiber must be checked and an exception must be raised in case it does fail.
      
      Closes tarantool/security#87
      
      NO_CHANGELOG=<security fix>
      NO_DOC=<security fix>
      NO_TEST=<no test harness for checking OOM>
      
      (cherry picked from commit e9fad4c7)
      f3fcd26e
    • Mergen Imeev's avatar
      sql: properly check result of sql_get_coll_seq() · e37ca29b
      Mergen Imeev authored
      This patch fixes an issue with checking the result of sql_get_coll_seq()
      in sql_expr_coll(). This fix only changes the error if the collation
      combination is invalid because sql_get_coll_seq() sets the is_aborted
      flag and error will be thrown in any case.
      
      Closes tarantool/security#80
      
      NO_DOC=change of returned error in rare case
      NO_CHANGELOG=change of returned error in rare case
      
      (cherry picked from commit e9f1beab)
      e37ca29b
    • Georgiy Lebedev's avatar
      static-build: fix potential NULL dereference in openssl · 20f54f79
      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>
      
      (cherry picked from commit a8c6c27c)
      20f54f79
    • Serge Petrenko's avatar
      core: check event loop creation in fiber_init() · 5cc3d46d
      Serge Petrenko authored
      The main cord's event loop is initialized by fiber_init(), but for some
      reason successful initialization is only checked in main() after other
      initialization code might try to use the event loop already.
      
      For example, some of the loop users are coio_enable(), signal_init(),
      tarantooL_lua_init(), and they are all run before we actually check that
      loop is not NULL.
      
      Closes tarantool/security#28
      
      NO_DOC=code health
      NO_TEST=code health
      NO_CHANGELOG=code health
      
      (cherry picked from commit 579ac6d3)
      5cc3d46d
    • Mergen Imeev's avatar
      box: replace malloc with xmalloc in key_def_dup · 3b793842
      Mergen Imeev authored
      This patch replaces malloc() with xmalloc() in key_def_dup() to avoid
      the possibility of skipping the malloc() return value check.
      
      Closes tarantool/security#81
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      
      (cherry picked from commit 8ca94313)
      3b793842
    • Vladimir Davydov's avatar
      static-build: don't use cat to apply multiple patches · 65f0a828
      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
      
      (cherry picked from commit 9549310d)
      65f0a828
  9. Feb 10, 2023
    • Yaroslav Lobankov's avatar
      ci: add more testing for macOS 12 and 13 · 0d32ad55
      Yaroslav Lobankov authored
      - Drop testing for macOS 11 since macOS 13 is now available
      
      - Add missing testing for macOS 12:
        - debug build (x86_64)
        - debug, release, and static-cmake builds (aarch64)
      
      - Add testing for macOS 13:
        - debug, release, release-lto, and static-cmake builds (x86_64)
        - debug, release, release-lto, and static-cmake builds (aarch64)
      
      Closes #6739
      Closes tarantool/tarantool-qa#301
      
      NO_DOC=ci
      NO_TEST=ci
      NO_CHANGELOG=ci
      
      (cherry picked from commit a13504d8)
      0d32ad55
    • Pavel Balaev's avatar
      static-build: fix potential NULL deref in openssl · f4b96c18
      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
      
      (cherry picked from commit 639ec224)
      f4b96c18
    • Andrey Saranchin's avatar
      memtx: fix potential NULL dereference in memtx_space_ephemeral_delete · 3b416afa
      Andrey Saranchin authored
      Now, delete in ephemeral space is obviously incorrect - if we try to
      delete a tuple, which is not present in index, NULL dereference will
      happen. Fortunately, ephemeral spaces are used for internal purposes
      only, so, most likely, this never happens. Let's fix this part not to
      confuse code analyzers.
      
      Closes https://github.com/tarantool/security/issues/38
      
      NO_TEST=shouldn't normally happen
      NO_CHANGELOG=shouldn't normally happen
      NO_DOC=shouldn't normally happen
      
      (cherry picked from commit a2d5e54e)
      3b416afa
    • psergee's avatar
      icu: fix potential out-of-bounds access · e541027f
      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
      
      (cherry picked from commit 66f2679d)
      e541027f
    • Vladimir Davydov's avatar
      ci: run static-build workflows on 'static-build-ci' label · 14a7ecca
      Vladimir Davydov authored
      Sometimes, we only need to test static-build, e.g. when we apply a patch
      to a third party sub-project. Let's introduce a new label to run the ci
      checks faster in this case.
      
      NO_DOC=ci
      NO_TEST=ci
      NO_CHANGELOG=ci
      
      (cherry picked from commit 09a77cd7)
      14a7ecca
    • Vladimir Davydov's avatar
      static-build: move all patches to patches sub-directory · a54cbfca
      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
      
      (cherry picked from commit b8ec809e)
      a54cbfca
  10. Feb 09, 2023
  11. Feb 08, 2023
    • Ilya Verbin's avatar
      log: fix flight-recording of json log messages · cddb72d4
      Ilya Verbin authored
      When log format is JSON and a Lua table is written to the log, such
      messages are saved by the flight recorder as a "json" string. Fix it.
      
      Part of tarantool/tarantool-ee#325
      
      NO_DOC=bugfix
      NO_TEST=will be added to EE, because there are no flightrec in CE
      NO_CHANGELOG=will be added to EE, because there are no flightrec in CE
      cddb72d4
  12. Feb 07, 2023
    • Georgiy Lebedev's avatar
      bitset: fix index size calculation · f44d7572
      Georgiy Lebedev authored
      Bitset index size calculation uses the cardinality of the 'flag' bitset,
      but when the bitset index is empty, i.e., uninitialized, the
      'flag' bitset is not allocated, hence we should simply return 0.
      
      Closes #5809
      
      NO_DOC=bugfix
      
      (cherry picked from commit d542a01a)
      f44d7572
  13. Feb 06, 2023
    • Oleg Chaplashkin's avatar
      test: fix import and usage luatest module · 2fb285ab
      Oleg Chaplashkin authored
      After adding the autorequiring luatest [1,2], there is no need to use
      the following approach now:
      
      ```
      local t = require('luatest')
      local g = t.group()
      
      server:exec(function()
          local t = require('luatest') -- duplicate
          t.assert(...)
      end)
      ```
      
      Modern approach looks like:
      
      ```
      local t = require('luatest')
      local g = t.group()
      
      -- `t` already available in the remote server
      server:exec(function() t.assert(...) end)
      
      -- also it works with any variable
      local my_custom_t = require('luatest')
      
      server:exec(function()
          my_custom_t.assert(...) -- already available
      end)
      ```
      
      [1] tarantool/luatest#277
      [2] tarantool/luatest#289
      
      Part of tarantool/luatest#233
      
      NO_DOC=test fix
      NO_TEST=test fix
      NO_CHANGELOG=test fix
      
      (cherry picked from commit 98dd8e69)
      2fb285ab
Loading