commit | 8cf7ff5e2a2e5ae3d27d5edebdbd911ad801815a | [log] [tgz] |
---|---|---|
author | Andy Ross <andrew.j.ross@intel.com> | Mon Nov 13 14:59:13 2017 -0800 |
committer | Andrew Boie <andrewboie@gmail.com> | Tue Nov 14 09:47:19 2017 -0800 |
tree | 039003c7a868d7c2175aa582c9e6248f19daa8de | |
parent | a9f0f445bab575a256a6e21c907c3d3a200c2026 [diff] |
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: Andy Ross <andrew.j.ross@intel.com>