[PATCH v3 0/2] igb: Proactively round up to kmalloc bucket size

From: Kees Cook
Date: Tue Oct 18 2022 - 05:26:09 EST


Hi,

In preparation for removing the "silently change allocation size"
users of ksize(), explicitly round up all q_vector allocations so that
allocations can be correctly compared to ksize().

Before that, fix a potential Use After Free under memory pressure.

Thanks,

-Kees

v3; split UAF fix from bucket rounding.
v2: https://lore.kernel.org/lkml/20220923202822.2667581-7-keescook@xxxxxxxxxxxx/

Kees Cook (2):
igb: Do not free q_vector unless new one was allocated
igb: Proactively round up to kmalloc bucket size

drivers/net/ethernet/intel/igb/igb_main.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

--
2.34.1