Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH luajit 0/2] Fix UBSan warnings
@ 2024-06-25 15:54 Sergey Kaplun via Tarantool-patches
  2024-06-25 15:54 ` [Tarantool-patches] [PATCH luajit 1/2] Prevent sanitizer warning in snap_restoredata() Sergey Kaplun via Tarantool-patches
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Sergey Kaplun via Tarantool-patches @ 2024-06-25 15:54 UTC (permalink / raw)
  To: Maxim Kokryashkin, Sergey Bronnikov; +Cc: tarantool-patches

This patchset removes all UBSan suppressions (except one in
lj_opt_fold.c regarding integer overflow and lj_buf.h regarding NULL ptr
argument) by fixing all known issues.

The first patch fixes out-of-bounds access to the `ex->gpr` structure
during snapshot restore. The second patch fixes all possible negations
of INT*_MIN.

Branch: https://github.com/tarantool/luajit/tree/skaplun/lj-928-1193-sanitizer-fixes
Related issues:
* https://github.com/LuaJIT/LuaJIT/issues/928
* https://github.com/LuaJIT/LuaJIT/issues/1193
* https://github.com/tarantool/tarantool/issues/9924
* https://github.com/tarantool/tarantool/issues/8473

Mike Pall (2):
  Prevent sanitizer warning in snap_restoredata().
  Avoid negation of signed integers in C that may hold INT*_MIN.

 src/lib_base.c                                |   2 +-
 src/lib_bit.c                                 |   3 +-
 src/lj_asm_mips.h                             |   2 +-
 src/lj_carith.c                               |   7 +-
 src/lj_cparse.c                               |   2 +-
 src/lj_crecord.c                              |   3 +-
 src/lj_ctype.c                                |   2 +-
 src/lj_emit_arm.h                             |   2 +-
 src/lj_emit_arm64.h                           |   9 +-
 src/lj_obj.h                                  |   2 +-
 src/lj_opt_fold.c                             |   6 +-
 src/lj_parse.c                                |  17 +--
 src/lj_snap.c                                 |  13 +-
 src/lj_strfmt.c                               |   9 +-
 src/lj_strscan.c                              |  26 ++--
 src/lj_vmmath.c                               |   6 +-
 ...93-out-of-bounds-snap-restoredata.test.lua |  28 ++++
 .../lj-928-int-min-negation.test.lua          | 121 ++++++++++++++++++
 18 files changed, 196 insertions(+), 64 deletions(-)
 create mode 100644 test/tarantool-tests/lj-1193-out-of-bounds-snap-restoredata.test.lua
 create mode 100644 test/tarantool-tests/lj-928-int-min-negation.test.lua

-- 
2.45.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-07-09  8:15 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-25 15:54 [Tarantool-patches] [PATCH luajit 0/2] Fix UBSan warnings Sergey Kaplun via Tarantool-patches
2024-06-25 15:54 ` [Tarantool-patches] [PATCH luajit 1/2] Prevent sanitizer warning in snap_restoredata() Sergey Kaplun via Tarantool-patches
2024-07-01  8:44   ` Maxim Kokryashkin via Tarantool-patches
2024-07-04  7:58   ` Sergey Bronnikov via Tarantool-patches
2024-07-04  8:41     ` Sergey Kaplun via Tarantool-patches
2024-07-04 14:59       ` Sergey Bronnikov via Tarantool-patches
2024-06-25 15:54 ` [Tarantool-patches] [PATCH luajit 2/2] Avoid negation of signed integers in C that may hold INT*_MIN Sergey Kaplun via Tarantool-patches
2024-07-01  9:11   ` Maxim Kokryashkin via Tarantool-patches
2024-07-01 10:12     ` Sergey Kaplun via Tarantool-patches
2024-07-04  8:08   ` Sergey Bronnikov via Tarantool-patches
2024-07-04  8:40     ` Sergey Kaplun via Tarantool-patches
2024-07-04 14:59       ` Sergey Bronnikov via Tarantool-patches
2024-07-09  8:08 ` [Tarantool-patches] [PATCH luajit 0/2] Fix UBSan warnings Sergey Kaplun via Tarantool-patches
2024-07-09  8:15 ` Sergey Kaplun via Tarantool-patches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox