1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys
Maciej Jurczak 3be2c51c42 nanocoap: Fixed buffer read out of the input packet bounds issue.
If token length in the header was longer than actually provided in the following payload, read out of the input buffer bounds or processing of data beyond the actual input packet bound could happen. In order to remove the risk, the options loop condition was modified to early detect the condition and abort packet processing if a malformed packet is detected.

nanocoap: Added pointer range check after token length parsing.

Added a check to verify if the current packet parsing pointer is still within the packet boundaries after incrementing by the token length declared in the header. If packet is malformed an error code is returned.

nanocoap: Combined packet length checks

Combined packet length checks after reading token length and processing options into a single packet length validation after the options parsing loop. The entry to the options parsing loop is safe as the while loop condition protects against entering the loop if the token length was invalid.
2020-05-25 22:44:39 +02:00
..
analog_util sys/analog_util: Refactor adc_map, fix compilation 2018-04-16 13:53:49 +02:00
app_metadata sys/app_metadata: Add app_metadata module 2019-03-05 16:10:06 +01:00
arduino sys/arduino: fix of compilation error with NDEBUG 2020-02-03 00:22:37 +01:00
auto_init tests: add interactive_sync adapted to shell 2020-03-17 17:23:27 +01:00
base64 sys/base64: Implement Base 64 Encoding with URL Safe Alphabet 2020-03-31 19:01:05 +02:00
benchmark sys/benchmark: incl irq.h and fixed output 2018-09-11 11:29:19 +02:00
bitfield many typo fixes 2019-11-23 22:39:07 +01:00
bloom
can sys/can/conn: Fixup unused code 2020-02-07 13:35:25 +01:00
cb_mux sys/cb_mux/cb_mux.c: fix cpp.check shiftTooManyBitsSigned 2019-11-21 11:58:07 +01:00
checksum sys/checksum: add crc8 implementation 2019-12-13 14:50:32 +01:00
clif sys/clif: use ARRAY_SIZE 2019-11-23 22:39:40 +01:00
color color: Fix -Wdouble-promotion warnings 2018-09-28 09:33:40 +02:00
cpp11-compat sys/cpp11-compat: fix typos 2019-11-23 22:39:37 +01:00
crypto sys/crypto/modes/ccm: accept input_len=0 2020-04-10 10:41:01 +02:00
div sys: fix doxygen grouping 2018-06-11 19:12:02 +02:00
ecc sys/ecc: fix assertion in golay2412 2020-02-20 13:24:14 +01:00
eepreg sys/eepreg: initial EEPROM registration support 2018-10-20 09:30:40 -04:00
embunit sys/embunit: fix typos 2019-11-23 22:39:37 +01:00
event Makefile: remove usage of SUBMODULES_NOFORCE 2020-04-15 12:11:44 +02:00
evtimer sys/evtimer: make use of xtimer_left_usec() 2020-04-21 11:26:56 +02:00
fmt sys/fmt: add fmt_hex_bytes size probing 2020-05-12 17:39:25 +02:00
frac core/shed: remove not needed bitarithm include add missing 2020-02-05 12:45:29 +01:00
fs devfs: add /dev/{urandom,hwrng} with random/hwrng 2019-05-29 15:50:25 +02:00
fuzzing sys/fuzzing: Initialize 2020-04-07 17:48:39 +02:00
hashes sys/hashes: fix typos 2019-11-23 22:39:37 +01:00
include Merge pull request #14016 from benpicco/luid_get_be 2020-05-13 21:14:31 +02:00
iolist add copyrights from IOTPUSH project 2019-05-02 12:09:37 +02:00
irq_handler sys/irq_handler: fix typos 2019-11-23 22:39:38 +01:00
isrpipe isrpipe: change API to be in line with tsrb 2019-06-05 18:13:57 +02:00
libc/include/sys
log sys/log: add colored logging module 2019-09-09 20:27:16 +02:00
luid sys/luid: provide luid_get_lb(), fix documentation 2020-05-13 20:47:53 +02:00
matstat sys/matstat: change ingroup directive 2018-08-24 18:14:03 +02:00
memarray memarray: fix memarray init 2020-03-09 17:56:34 +01:00
mineplex
net nanocoap: Fixed buffer read out of the input packet bounds issue. 2020-05-25 22:44:39 +02:00
newlib_syscalls_default sys/newlib: update heap_stats for multiple heaps 2020-02-29 12:24:39 +01:00
od
oneway-malloc sys/oneway-malloc: fix typos 2019-11-23 22:39:38 +01:00
phydat sys/phydat: add ohm as unit 2020-03-12 08:42:59 +01:00
pipe sys/pipe: always include stdlib.h instead of malloc.h 2019-09-17 20:43:33 +02:00
pm_layered Merge pull request #13978 from maribu/fix_pm_off 2020-05-01 14:09:48 +02:00
posix sys/posix: fix typos 2019-11-23 22:39:38 +01:00
progress_bar sys/progress_bar: add module for configurable progress bars 2019-12-02 16:48:16 +01:00
ps sys/ps: ignore IST_STACKSIZE if it is == 0 (undefined) 2020-03-12 13:08:05 +01:00
puf_sram sys/puf_sram: counter based reseed after soft reset 2020-01-20 14:14:09 +01:00
quad_math cppcheck: add/correct reason for cppcheck-suppress 2018-09-25 12:03:58 +02:00
random sys/random/sha1prng: make random_init use init_by_array 2020-05-11 10:38:44 +02:00
riotboot sys/riotboot: provide riotboot_slot_offset() 2020-02-19 10:04:52 +01:00
saul_reg sys: saul: add missing stddef.h include (for NULL) 2018-09-20 23:54:46 +02:00
schedstatistics sys/schedstatistics: fix typos 2019-11-23 22:39:38 +01:00
sema
seq sys/seq: change ingroup directive 2018-08-24 18:14:03 +02:00
shell sys/shell: commands: Check argc in _pm_handler 2020-05-02 20:55:28 +01:00
ssp sys/ssp: use a random value as the canary 2020-01-20 14:51:26 +01:00
stdio_null sys: stdio_null: add null driver 2019-11-26 21:12:41 +01:00
stdio_rtt stdio/vfs: generalized VFS mapping for STDIO 2018-08-30 11:14:59 +02:00
stdio_uart drivers: sys: replace USE_ETHOS_FOR_STDIO macro by MODULE_STDIO_ETHOS 2019-06-23 22:16:03 +02:00
suit net/coap: Move COAP_MAX_RETRANSMIT to 'CONFIG' namespace 2020-04-24 10:06:43 +02:00
test_utils sys/test_utils/interactive_sync: AVR puts to pgmspace 2019-12-13 10:12:01 +01:00
timex sys/timex: fix incompatible atmega time.h 2018-05-28 13:04:55 -04:00
trickle sys/trickle: remove redundant pid assignment 2020-02-21 13:26:24 +01:00
tsrb tsrb: remove now unnecessary cast 2019-06-05 17:10:26 +02:00
universal_address sys/universal_address: fix typos 2019-11-23 22:39:38 +01:00
uri_parser Merge pull request #13804 from chrysn-pull-requests/uri-test-isabsolute 2020-04-05 13:42:11 +02:00
usb usbus/cdc/ecm: Expose configurations to Kconfig 2020-04-08 16:31:46 +02:00
usb_board_reset sys: add usb_board_reset module 2020-03-18 10:43:05 +01:00
uuid uuid: add uuid_from_string() 2018-10-03 10:44:14 +02:00
vfs stdio/vfs: generalized VFS mapping for STDIO 2018-08-30 11:14:59 +02:00
xtimer sys/xtimer/xtimer.c: new function xtimer_rmutex_lock_timeout() 2020-05-04 17:46:31 +02:00
zptr sys: zptr: initial commit 2020-02-11 13:59:59 +01:00
ztimer sys/ztimer: uncrustify 2020-05-11 16:43:50 +02:00
doc.txt sys/doc: add net_lorawan group 2019-04-12 15:51:15 +02:00
Kconfig Kconfig: Expose USB peripheral configurations 2020-01-14 10:34:53 +01:00
Makefile sys/ztimer: introduce xtimer wrapper 2020-03-04 12:44:02 +01:00
Makefile.dep Merge pull request #13638 from gschorcht/sys/shell/rtt_command 2020-03-19 21:21:12 +01:00
Makefile.include sys: remove exports of UNDEF vars 2020-02-25 09:40:34 +01:00