1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

37279 Commits

Author SHA1 Message Date
Marian Buschsieweke
5e925e1906
Merge pull request #17192 from maribu/sys/fido2
sys/fido2: fix CBOR parsing
2021-11-13 21:43:57 +01:00
Marian Buschsieweke
8a178f49e7
sys/fido2: fix CBOR parsing
The TinyCBOR library takes a `size_t *` length argument in many
functions which at function call contains the length of a buffer, and
at exit the actual size of the data. The FIDO-2 code however uses
`uint8_t` fields in `struct`s to store the data. Previously, a pointer
to that `uint8_t` filed was just casted to `size_t *`, resulting in
three neighboring bytes also being interpreted as being part of the
buffer size - which could result in undetected buffer overflows.
Similar, upon exit of the function not only the `uint8_t` sized length
`struct` member but also three neighboring bytes were written to.

I didn't care to investigate, but this really looks like crafted CBOR
payloads send to the FIDO2 implementation could result in arbitrary
code execution on the device.
2021-11-13 20:32:02 +01:00
benpicco
7da50b05a9
Merge pull request #17190 from benpicco/drivers/dose-padding
drivers/dose: reduce struct padding
2021-11-12 20:45:24 +01:00
Karl Fessel
3d33cee551
Merge pull request #17137 from kfessel/p-ztimer-at30tse75x
driver/at30tse75x: port to ztimer_usec
2021-11-12 17:12:11 +01:00
Benjamin Valentin
b34b67feee drivers/dose: reduce struct padding
By moving all the single byte struct elements to the end, we can reduce
padding inside `dose_t` and ensure that `recv_buf` is always aligned.

This saves some RAM:

master
------
   text	   data	    bss	    dec	    hex	filename
  36384	    136	  12944	  49464	   c138 tests/driver_dose/bin/samr21-xpro/tests_driver_dose.e

this patch
----------
   text	   data	    bss	    dec	    hex	filename
  36484	    136	  12936	  49556	   c194	tests/driver_dose/bin/samr21-xpro/tests_driver_dose.elf
2021-11-12 16:19:20 +01:00
Marian Buschsieweke
c18dc7157d
Merge pull request #17177 from maribu/sys/architecture
sys/architecture: add HAS_ALIGNMENT_OF() helper
2021-11-12 14:12:08 +01:00
benpicco
6f4c354461
Merge pull request #17139 from fjmolinas/pr_static_cocci_remove
dist/tools/coccinelle/force: remove static.cocci
2021-11-12 13:53:37 +01:00
benpicco
1c3ceb2bd6
Merge pull request #17185 from fjmolinas/pr_lora_e5_dev_warning
boards/lora-e5-dev: add warning in doc
2021-11-12 13:42:17 +01:00
benpicco
046ecf221e
Merge pull request #17187 from fjmolinas/pr_i2c_stm32wl_typo
cpu/stm32/include/cpu_conf_stm32_common.h: fix typo in macro
2021-11-12 13:41:58 +01:00
VanL
ee832148b3 cpu/stm32: Add hardening changes to stm32
Initialize STM32 RDP in a glitch-resistant fashion to prevent
debugger use when restrictions are set by the designer.
2021-11-11 15:58:52 -06:00
Francisco Molina
ec0e3d242e cpu/stm32/include/cpu_conf_stm32_common.h: fix typo in macro 2021-11-11 19:58:34 +01:00
Francisco Molina
b247dbca97 examples/lorawan: use ztimer_msec if not rtc 2021-11-11 18:03:04 +01:00
a85853ae30
Merge pull request #17125 from aabadie/pr/cpu/native_rtc_ztimer
cpu/native: migrate periph_rtc to ztimer
2021-11-11 17:26:10 +01:00
Benjamin Valentin
18cdd100a9 cpu/sam0_common: uart: set oversampling based on baud rate
In Asynchronous Fractional baud rate mode, the baud rate can not be
greater than the source frequency divided by the oversampling (8, 16).

Currently we are always using 16x oversampling.
This makes it impossible to e.g. set a 2 MHz UART baud rate on the 16 MHz
`saml10-xpro`.

With this change, the oversampling is automatically reduced to 8x which
allows us to set 16 MHz / 8 -> 2 MHz baud rate.
2021-11-11 17:03:05 +01:00
Francisco Molina
773d576bdc boards/lora-e5-dev: add warning in doc 2021-11-11 16:51:51 +01:00
Daniel Lockau
201e42a497 examples/suit: remove automatic deps 2021-11-11 14:00:31 +01:00
Daniel Lockau
9e1e7be77e sys/suit: adjust dependencies for CoAP transport 2021-11-11 13:58:32 +01:00
1772628483
Merge pull request #16186 from kaspar030/fix_native_notext
cpu/native: add `-no-pie` to LINKFLAGS
2021-11-11 11:50:54 +01:00
Francisco
b609646961
Merge pull request #17138 from fjmolinas/pr_sx126x_fixes
drivers/sx126x: fix sync word and TX PA configuration
2021-11-11 10:59:08 +01:00
Marian Buschsieweke
7b06e665ee
sys/architecture: add HAS_ALIGNMENT_OF() helper 2021-11-11 10:57:26 +01:00
Marian Buschsieweke
673299b1cf
Merge pull request #17176 from maribu/core/declare_constant
core: add WITHOUT_PEDANTIC() and DECLARE_CONSTANT()
2021-11-11 10:56:47 +01:00
326b0c980a
cpu/native: migrate periph_rtc to ztimer 2021-11-11 10:54:30 +01:00
Marian Buschsieweke
7703b37c6f
sys/posix/socket: align struct sockaddr{,_storage}
Align the first member of `struct sockaddr` and
`struct sockaddr_storage` as `uint32_t` to elevate the alignment of the
structure to level of `uint32_t`. This is needed as
`struct sockaddr_in` uses an `uint32_t` to store the IPv4 address,
previously resulting in `struct sockaddr_in` currently having a greater
alignment requirement that `struct sockaddr_storage`.
2021-11-11 09:55:24 +01:00
Marian Buschsieweke
de2bd172f8
pkg/ccn-lite: use -std=c11 instead of -std=c99
RIOT switched to C11, so packages need to follow suit to use RIOT's
headers.
2021-11-11 09:55:24 +01:00
Marian Buschsieweke
4b02d0fbc1
makefiles/arch: use -std=gnu11 also for MIPS
This brings MIPS back in line with the other archs.
2021-11-11 09:55:24 +01:00
Kevin "Tristate Tom" Weiss
da60ba5fff
Merge pull request #17165 from leandrolanzieri/pr/sys/ztimer_kconfig_entry
sys/ztimer: rework Kconfig

To eliminate circular dependencies based in periph_rtc and xtimer_ztimer_compatibility the following changes are applied:
- Change entrypoint of ztimer as a specific backend is always required
- Add a non-module symbol for ztimer_usec that bring in the ztimer and ztimer_usec module which allows the xtimer ztimer compatibility layer to only select the ztimer_usec module preventing circular dependency issues
2021-11-11 09:21:33 +01:00
Martine S. Lenders
3c6e87c18f
lwip: bump to v2.1.3 2021-11-10 22:36:19 +01:00
937a0014c8 tests/backtrace: make test regexp a bit more loose 2021-11-10 20:38:25 +01:00
a78689874a cpu/native: add -no-pie to LINKFLAGS
This fixes the following warning on newer gcc/ld:

```
/usr/bin/ld: examples/hello-world/bin/native/cpu/tramp.o: warning: relocation against `_native_saved_eip' in read-only section `.text'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
```
2021-11-10 20:38:25 +01:00
Francisco
05593911bf
Merge pull request #16955 from haukepetersen/fix_nimble_scannereventtypes
pkg/nimble: fix scan event type define usage
2021-11-10 16:35:17 +01:00
Marian Buschsieweke
f2a53c8fb3
tets/unittests: add test for DECLARE_CONSTANT() 2021-11-10 15:22:48 +01:00
Marian Buschsieweke
58e197098d
core: add WITHOUT_PEDANTIC() and DECLARE_CONSTANT()
`WITHOUT_PEDANTIC(expr)` disables `-Wpedantic` for `expr`, but switches
back to the previous diagnostic settings afterwards. This helps defining
macros that are not strictly ISO compliant without having to drop the
`-Wpedantic` flag entirely.

`DECLARE_CONSTANT(identifier, const_expr)` declares an anonymous `enum`
constant named `identifier` and assigns it the value `const_expr`. Here,
`const_expr` has to be a compile time constant, but is not needed to be
an integer constant expression. It basically is a tool to magically
convert a non-integer constant expression into a integer constant
expression.
2021-11-10 15:22:47 +01:00
e89eebc6bf
Merge pull request #17163 from maribu/pkg/libcoap
pkg/libcoap: remove
2021-11-10 13:42:59 +01:00
Francisco
0838ea392a
Merge pull request #17143 from aabadie/pr/pkg/paho_mqtt_ztimer
pkg/paho-mqtt: migrate to ztimer
2021-11-10 13:14:48 +01:00
benpicco
026d6cfba1
Merge pull request #16768 from benpicco/drivers/dose-timeout_bytes
drivers/dose: calculate timeout based on symbol rate
2021-11-10 12:40:13 +01:00
Erik Ekman
1a73fee720
Merge pull request #17174 from yarrick/arp_build
pkg/lwip: Fix dualstack build when only using 6lowpan
2021-11-10 10:15:58 +01:00
Kevin "Tristate Tom" Weiss
ff8983c155
Merge pull request #17161 from kaspar030/update_pkg_relic
pkg/relic: bump to current master
2021-11-10 09:15:23 +01:00
Francisco
fc4a3d3363
Merge pull request #17171 from kaspar030/uhcp_modules
net/uhcp[cd]: use modules to select client/server code
2021-11-10 08:59:08 +01:00
Francisco
035ee0a595
Merge pull request #17172 from kaspar030/drivers_ds18_missing_stdint.h
drivers/ds18.h: add missing stdint.h include
2021-11-10 08:42:03 +01:00
Francisco
fb4947937f
Merge pull request #17169 from gschorcht/doc/fix_ccs811_doc
drivers/ccs811: fix of documentation
2021-11-10 08:41:26 +01:00
Francisco
24794676ca
Merge pull request #16901 from maribu/tests/thread_float
tests/thread_float: improve and add script
2021-11-10 08:34:55 +01:00
Erik Ekman
02c840af2a pkg/lwip: Fix 6lowpan build when IPv4 is active 2021-11-09 23:16:33 +01:00
Erik Ekman
3aee2dde9d pkg/lwip: Only enable ARP if Ethernet is supported 2021-11-09 23:09:35 +01:00
5d3a4d63d8 drivers/ds18.h: add missing stdint.h include 2021-11-09 21:48:48 +01:00
dba51edc69 net/uhcp[cd]: use modules to select client/server code 2021-11-09 21:42:45 +01:00
Marian Buschsieweke
f62b662b08
tests/thread_float: improve and add test script
- Perform the same computation over and over again. If the results
  differ, context switches have an impact on the calculation (e.g.
  when the FPU internally uses more bits than a float, but that bits
  are not saved / restored on context switch)
- Give the three threads the names "t1", "t2", and "t3" and print them
  on console, instead of the process ID. This makes interpretation of
  the output easier, as the process IDs depend e.g. on whether a given
  platforms requires an idle thread or not.
- Do not use the thread ID in the calculation, but the number at the
  end of the thread name. This will result in the number printed only
  depending on the precision of the (software) FPU and the printf()
  implementation, and not on which threads are created in which order
  (including the idle thread)
- Add a script to support running `make test`

Update tests/thread_float/tests/01-run.py

Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
2021-11-09 19:57:59 +01:00
Gunar Schorcht
8e88906445 drivers/ccs811: fix of documentation 2021-11-09 19:50:07 +01:00
benpicco
12ade5a8b5
Merge pull request #16752 from benpicco/drivers/dose-standby
drivers/dose: enable standby pin
2021-11-09 18:20:17 +01:00
Marian Buschsieweke
f2d914dad9
Merge pull request #17167 from RIOT-OS/gh/enh/del-security-bug
.github/ISSUE_TEMPLATE: remove security_bug.md
2021-11-09 17:57:22 +01:00
Martine Lenders
b4193be4dd
.github/ISSUE_TEMPLATE: remove security_bug.md
We have a [security policy](./SECURITY.md) now, so this template might confuse people more than it helps.
2021-11-09 16:48:42 +01:00