From 273f92a41198252c1fe3cb2924814dded9588cb4 Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Thu, 18 May 2023 01:25:13 +0200 Subject: [PATCH 1/2] sys/net/rpl: fix possible NULL dereference fixes https://github.com/RIOT-OS/RIOT/issues/15006 --- sys/net/gnrc/routing/rpl/gnrc_rpl_control_messages.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/gnrc/routing/rpl/gnrc_rpl_control_messages.c b/sys/net/gnrc/routing/rpl/gnrc_rpl_control_messages.c index 2c30383678..239e8985d0 100644 --- a/sys/net/gnrc/routing/rpl/gnrc_rpl_control_messages.c +++ b/sys/net/gnrc/routing/rpl/gnrc_rpl_control_messages.c @@ -1231,7 +1231,7 @@ void gnrc_rpl_recv_DAO_ACK(gnrc_rpl_dao_ack_t *dao_ack, kernel_pid_t iface, ipv6 #endif if (!IS_ACTIVE(CONFIG_GNRC_RPL_WITHOUT_VALIDATION)) { - if (!gnrc_rpl_validation_DAO_ACK(dao_ack, len, dst)) { + if (!dst || !gnrc_rpl_validation_DAO_ACK(dao_ack, len, dst)) { return; } } From aed175b14b55ca28eb130e9b7cbe30f3a3d16025 Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Sun, 21 May 2023 11:33:28 +0200 Subject: [PATCH 2/2] core/thread: drop unused thread_arch_t No architecture makes use of thread_arch_t anymore, so let's drop it. --- core/include/thread.h | 4 ---- cpu/cortexm_common/include/thread_arch.h | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/core/include/thread.h b/core/include/thread.h index 233f7a07fe..8e0dcca5a7 100644 --- a/core/include/thread.h +++ b/core/include/thread.h @@ -122,7 +122,6 @@ #include "clist.h" #include "cib.h" #include "msg.h" -#include "cpu_conf.h" #include "sched.h" #include "thread_config.h" @@ -207,9 +206,6 @@ struct _thread { #ifdef PICOLIBC_TLS void *tls; /**< thread local storage ptr */ #endif -#ifdef HAVE_THREAD_ARCH_T - thread_arch_t arch; /**< architecture dependent part */ -#endif }; /** diff --git a/cpu/cortexm_common/include/thread_arch.h b/cpu/cortexm_common/include/thread_arch.h index 5a05e82724..84d67da0c4 100644 --- a/cpu/cortexm_common/include/thread_arch.h +++ b/cpu/cortexm_common/include/thread_arch.h @@ -20,6 +20,8 @@ #ifndef THREAD_ARCH_H #define THREAD_ARCH_H +#include "cpu_conf.h" + #ifdef __cplusplus extern "C" { #endif