kernel: remove problematic pend() assertion

This assertion, if built in, allows users threads to crash
the kernel in a critical section by passing a negative timeout
value, creating a DoS attack vector.

Remove this assertion, immediately below it there's a check
which just resets it to 0 anyway.

Fixes: #22999

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2020-02-20 17:28:56 -08:00 committed by Andrew Boie
commit 896e32b414

View file

@ -537,9 +537,6 @@ static void pend(struct k_thread *thread, _wait_q_t *wait_q, s32_t timeout)
if (timeout != K_FOREVER) {
s32_t ticks;
__ASSERT(timeout >= 0,
"Only non-negative values are accepted.");
if (timeout < 0) {
timeout = 0;
}