open5gs/tests/core
Sukchan Lee ad7456b758 [CORE] Validate TLV bounds before parsing
Validate the remaining block size before reading TLV headers or
advancing over their values.

Reject truncated headers, values extending beyond the input block,
and zero-length embedded blocks before any out-of-bounds access.
Apply the same validation to descriptor-based and fixed-length TLV
parsing.

Also avoid passing an uninitialized stack buffer to the logger when
hexdumping a zero-length input.

Add tests for truncated headers, trailing octets, over-long values,
fixed-length TV elements, and descriptor-based parsing.
2026-08-12 09:26:37 +09:00
..
abts-main.c Fixed dynamic-stack-buffer-overflow (#2578, #2577) 2023-09-05 21:58:05 +09:00
conv-test.c [tests] fix compiler warnings when used with latest GCC 2025-11-13 06:40:18 +09:00
fsm-test.c Move src/../nf-sm.[ch] to lib/sbi/nf-sm.[ch] 2022-08-12 14:03:53 +09:00
hash-test.c Rename Project to Open5GS 2019-10-27 17:41:14 +09:00
list-test.c refine SGW/UPF selection code 2020-07-09 01:38:09 -04:00
log-test.c Rename Project to Open5GS 2019-10-27 17:41:14 +09:00
memory-test.c [PFCP/GTP] SEID/TEID Randomness (#1303) 2023-04-16 12:30:36 +09:00
meson.build refine SGW/UPF selection code 2020-07-09 01:38:09 -04:00
pkbuf-test.c Rename Project to Open5GS 2019-10-27 17:41:14 +09:00
poll-test.c Fix to avoid port (7777) conflicts on Mac OS X 2022-10-30 13:58:28 +09:00
pool-test.c Rename Project to Open5GS 2019-10-27 17:41:14 +09:00
queue-test.c Rename Project to Open5GS 2019-10-27 17:41:14 +09:00
rbtree-test.c Rename Project to Open5GS 2019-10-27 17:41:14 +09:00
socket-test.c Fix to avoid port (7777) conflicts on Mac OS X 2022-10-30 13:58:28 +09:00
strings-test.c Rename Project to Open5GS 2019-10-27 17:41:14 +09:00
thread-test.c Rename Project to Open5GS 2019-10-27 17:41:14 +09:00
time-test.c refine SGW/UPF selection code 2020-07-09 01:38:09 -04:00
timer-test.c Fix the MacOSX CI (#1454) 2022-03-31 23:06:52 +09:00
tlv-test.c [CORE] Validate TLV bounds before parsing 2026-08-12 09:26:37 +09:00
uuid-test.c Added NRF 2020-05-18 17:00:37 -04:00