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:
parent
2be22c0473
commit
896e32b414
1 changed files with 0 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue