Skip to content
Commit 8cf7ff5e authored by Andy Ross's avatar Andy Ross Committed by Andrew Boie
Browse files

kernel/mem_pool: Correct n_levels computation for small blocks



The new mem pool implementation has a hard minimum block size of 8
bytes, but the macros to statically compute the number of levels
didn't clamp, leading to invalid small allocations being allowed,
which would then corrupt the list pointers of nearby blocks and/or
overflow the buffer entirely and corrupt other memory.

Signed-off-by: default avatarAndy Ross <andrew.j.ross@intel.com>
parent a9f0f445
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment