Skip to content

Releases: rurban/safeclib

safeclib v05112019 3.5.1 released

05 Nov 11:00
Compare
Choose a tag to compare

Fixed musl compilation by not undefining some _GNU_SOURCE (PR #83, Fabrice Fontaine)

docs: https://rurban.github.io/safeclib/

088729902706b0bb0bf056ee1c626781df6997a29ce5724f97101be9bc5c6452  libsafec-05112019.0-g1f0938.tar.bz2
9c024a59854cfd7ccd88d78c0347c7b331efa7dbd664152fdb1762499675f51a  libsafec-05112019.0-g1f0938.tar.gz
4cf28037fd93a1964dd7d25581ed7baf570e496bb9b27733cce8d3f8a5a7b7de  libsafec-05112019.0-g1f0938.tar.xz

safeclib v29102019 3.5.1 released

29 Oct 13:21
6d168df
Compare
Choose a tag to compare

Fixed musl compilation by adding some _GNU_SOURCE (PR #82, Fabrice Fontaine)

docs: https://rurban.github.io/safeclib/

1ddc53d5fe6498619e28c410e09ec94ed92c5590060477d6fbff88722bf4b734  libsafec-29102019.0-g6d168d.tar.bz2
00ad1b85824fa7090cb901f19f185c4f28bb148397f5cf200b1203e89fbca16a  libsafec-29102019.0-g6d168d.tar.gz
156bd12c24b40676299e793adc28225d9baa1b20b2de696fd843dd414db32a23  libsafec-29102019.0-g6d168d.tar.xz

safeclib v17102019 3.5.1 released

25 Oct 08:22
5d92be8
Compare
Choose a tag to compare
  • Fixed mbsrtowcs_s error message prefix
  • Fixed t_mbsrtowcs_s.exe compilation under newer mingw gcc, mingw BOS needs now stdlib.h
  • Fixed travis valgrind error

docs: https://rurban.github.io/safeclib/

b8824429f4281a1fe8cf74ba020e26f4551005c8907f0b6f1e639fee68326159  libsafec-17102019.0-g5d92be.tar.bz2
ee50cc70ff1e50c7661841c40b36db76ffb92f7dc67722a9d7bee6cc6bde01db  libsafec-17102019.0-g5d92be.tar.gz
40aaf6f5c31f1299e93d9a490a21b6a0acbec540179a3bdfa8537403e2de3dac  libsafec-17102019.0-g5d92be.tar.xz

safeclib v16102019 3.5.1 released

16 Oct 11:51
ce5f1fd
Compare
Choose a tag to compare

Fixed memset_s for the upper 4 bits of 64 bit words (GH #73)

Fixed strncat_s error handling for slen exceeds src.
clear dest, not src (GH #73)

Fixed vswprintf_s by checking for failing malloc (GH #78)

Several minor test improvements

56f48d0ebe3c9db21073a27db512c6975abee6180003d17e425ac26e215997b8  libsafec-16102019.tar.bz2
4a6af1c8b08bbbb3bccef2c205062e371134b8b5c230a3fd4ff602be2aee73e3  libsafec-16102019.tar.gz
95a41ae3e5643bc5159661d06c9bba859c5e5e4dedc73c528a2add3c6d825ecc  libsafec-16102019.tar.xz

safeclib v04062019 3.5 released

04 Jun 08:48
Compare
Choose a tag to compare
  • Updated towctrans case-mappings and normalization to Unicode 12.1
    Even the canon tables on windows need now a special bsearch in an
    exception list, previously only the compat tables.
  • Unversioned and renamed the libsafec.pc pkg-config file (PR #56)
  • Fixed strnlen_s and wcsnlen_s for long enough smax arguments.
    Now you can get the length without knowing the length beforehand. (GH #65)
  • Fixed various C++ regressions (GH #64, GH #58)
  • Fixed a linux kernel module regression from 3.4 (GH #67),
    use the mb() macro.
  • Fixed MEMORY_BARRIER on exotic compilers: replace
    asm("memory_barrier" ::: "memory") with __sync_synchronize()
  • Fixed headers and linkage for the latest msys2-w32api-headers-7
  • Fixed src and tests for the nvidia pgi pgcc compiler (17.4 and 19.4).
    This compiler has such a bad optimizer, that it cannot get the
    object_size of all static vars. It also crashes on some valid code.
  • Added -mcet -fcf-protection=full probe (GH #60)
  • Added the Huawei securec library to the docs
  • Renamed internal build-tools to build-aux
  • Reformat all source code with clang-format, added
    build-aux/clang-format-all.sh

See https://github.com/rurban/safeclib/blob/master/ChangeLog and https://rurban.github.io/safeclib/

bb3680fb15cace9ffb1120352a4d8a149187006f4b7d8daa397530d9541c606c  libsafec-04062019.0-ga99a05.tar.bz2
e6e452de41292db374beda943ab752b04d1587e383406a29d60b4799a3e53cb5  libsafec-04062019.0-ga99a05.tar.gz
fa0b07967793097f73247d0c493ea590f7a393d13c7e37fb29d591596b7b6c12  libsafec-04062019.0-ga99a05.tar.xz

safeclib v30122018 3.4 released

30 Dec 11:45
v30122018
8f68fa3
Compare
Choose a tag to compare
  • Updated towctrans case-mappings to Unicode 11.0 (GH #62)

  • Improved memset_s, memzero_s security by adding a CPU memory barrier,
    not just a compiler barrier. (GH #63)
    Check various memory_barrier insns (mfence, sfence, lwsync, membar,
    lock..., memory_barrier) and use it for the memset primitives
    to reliably sync memory stores with possibly re-ordered loads.
    Note that glibc/BSD explicit_bzero or Microsoft SecureZeroMemory only do
    a simple compiler barrier, which is not Spectre, Meltdown secure.

  • add pic_flag to RETPOLINE cflags and ldflags (GH #55)

  • Add --disable-doc option (GH #54)

clang-5+ is highly recommended over gcc, for detecting errors at compile-time during development, run-time safety via retpoline and vastly better performance.
CC="clang-7 -march=native -fstrict-aliasing" ./configure or even
CC="clang-7 -flto -march=native -fstrict-aliasing" AR=llvm-ar-7 ./configure

See https://github.com/rurban/safeclib/blob/master/ChangeLog and https://rurban.github.io/safeclib/

7ca210d537b9f4d06b27a49166544694d76b587ac5c07137b7d85baacc368b7f  libsafec-30122018.0-g4d1571.tar.bz2
765f1793d9f6dd50430ff7ec60ef629c1d5b84fe46202325b84a6973e5b08134  libsafec-30122018.0-g4d1571.tar.gz
1ded6a403539c9924ae273b0848cbcb31028331a3252cadbbb7b389d59df1b7a  libsafec-30122018.0-g4d1571.tar.xz

safeclib 3.3 v03032018 released

03 Mar 10:32
Compare
Choose a tag to compare
    - Added compile-time and run-time object_size checks (BOS), resulting
      in EOVERFLOW error codes. Compilers only do this reliably with static
      arrays, less so with literal strings. With known static allocation size
      you can bypass RSIZE_MAX_* limits. BOS even knows about malloc sizes
      on some platforms.
      Renamed all functions to _*_chk, with the API as macros. (GH #40)
    - Added run-time libmpx pointer boundary checks if supported. (GH #49)
      gcc-5+ (optional), icc-15+
    - Improved performance of mem_prim_set/mem_prim_move on 64bit machines by factor 2
      by using 64bit ops, not 32bit. With clang-4+ memcpy_s is now as fast as
      memcpy native, with gcc only 77% slower.
      Added more benchmarks and improved the timing.
    - Made the unsafe functions snprintf_s, vsnprintf_s, snwprintf_s, vsnwprintf_s
      safe by guaranteeing null termination. Only tmpnam_s remains unsafe. (GH #52)
    - Added strnatcmp_s, strnatcasecmp_s, wcsnatcmp_s, wcsnaticmp_s
    - Add --disable-constraint-handler option. undef the run-time
      invoke_safe_{str,mem}_constraint_handler function calls
      in safe_config.h to avoid the large errormsg strings. No run-time
      performance improvements, as those calls only happen in the error cases.
    - Added --enable-warn-dmax option to warn when dmax != sizeof(dest),
      and fatalized via --enable-error-dmax.
    - Fixed wrong count max check in memmove32_s
    - Fully tested against other secure libc extensions, the native msvcrt 7.0 (Win8)
      and the msvcrt under wine-2.0.4 and wine-3.0.
    - Fixed --disable-shared for Windows.
    - Optimized null-slack clearing of dest, unrolling the memset loop with
      small dest buffers.
    - truncating funcs {v,}sn{w,}printf_s: clear dest on errors after printing to it
    - Fixed compilation of the linux kernel module (PR #43, Fabrice Fontaine)
    - Fixed c++ strictness when !c99 (e.g. g++ 4.3)
    - Changed retval of sprintf_s/vsprintf_s on all errors from 0 to -1,
      deviating from the standard. The original -1 retval was changed with
      http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1141.pdf by Microsoft
      to keep count += sprintf(buf + count, format_string, args) working,
      where all errors simply returned 0. Later Microsoft and all others
      changed the error return value back to -1, to be consistent with other
      sprintf functions. So do we. (GH #45)
    - Removed errno of sprintf_s/vsprintf_s, return the negative ES error code.
    - sprintf_s/vsprintf_s on Windows use now the native vsnprintf_s function
      to reject illegal format specifiers.
    - More hardening with gcc-7.3/clang-7: Probe for -Wl,-z,textonly and
      -Wl,-z,retpolineplt, currently only with lld-7
    - Fixed wcsnorm_compose_s >RSIZE_MAX_WSTR integer overflow
    - Fixed overlap checks to be C11 conformant, cast to uintptr_t. (GH #51)
    - add strnatcmp_s, add strcmp_s src overflow checks,
      ESUNTERM for src to avoid overflows
    - Reworked C11 compatibility to closer align with the existing Windows+BSD
      sec_api's, esp. with slen=0 cases of the cpy and move functions, while still
      following the spec. (GH #39)
      There's no seperate logic if the library was compiled with a C11 compiler
      anymore. See the testcases for the remaining discrepances.

clang-5+ is highly recommended over gcc, for detecting errors at compile-time during development, run-time safety via retpoline and vastly better performance.
CC="clang-7 -march=native -fstrict-aliasing" ./configure or even
CC="clang-7 -flto -march=native -fstrict-aliasing" AR=llvm-ar-7 ./configure

See https://github.com/rurban/safeclib/blob/master/ChangeLog and https://rurban.github.io/safeclib/

54b25c2b4738a80404a493c7091bf16ecd5de32a  libsafec-03032018.0-g570fa5.tar.bz2
8f6e3fafdfd3599def9c1b6773575ed89018a435  libsafec-03032018.0-g570fa5.tar.gz
0395d52b0929007becfeddfbe58d1cb39762a014  libsafec-03032018.0-g570fa5.tar.xz

safeclib 3.2 v15012018.0 released

15 Jan 09:37
Compare
Choose a tag to compare

See https://github.com/rurban/safeclib/blob/master/ChangeLog and https://rurban.github.io/safeclib/

a688a81a97b053c87e8ff79c7e1316891ded07e8  libsafec-15012018.0-ge0f580.tar.bz2
ab5062a9b7838adcad54e7a6c6c00e841a29ec72  libsafec-15012018.0-ge0f580.tar.gz

safeclib-3.1 v09102017 released

09 Oct 09:06
Compare
Choose a tag to compare

Mostly just docs and windows (sizeof(wchar_t)==2) fixes.
Permit slen=0 for C11
Harden: added WARN_CFLAGS

With a non-C11 compiler not on windows the API didn't change, only docs. So it could be updated without API bump.

See the ChangeLog and documentation at https://rurban.github.io/safeclib/doc/safec-3.1/

b0eba8cb320b2ab4348107cc60f1bba3a3e35cb3  libsafec-09102017.0-g9db9fd.tar.bz2
9aa720f5fba003da50601fde3e3e0dd65f0148f5  libsafec-09102017.0-g9db9fd.tar.gz

safeclib-3.0 v04102017 released

04 Oct 15:46
Compare
Choose a tag to compare

The first fully C11 compliant release.

Many additions, compilation and test fixes.
See the ChangeLog and documentation at https://rurban.github.io/safeclib/doc/safec-3.0/

0ce782070d0aa4e801d5bd4849a6e115c901e4e4  libsafec-04102017.0-gab130d.tar.bz2
c8785f5afa534648e2ddfb1646320a25b8cb40da  libsafec-04102017.0-gab130d.tar.gz