Re: [PATCH] mm/zsmalloc: prevent integer overflow in obj_free

From: Sergey Senozhatsky
Date: Thu Mar 13 2025 - 10:42:21 EST


On (25/03/13 14:51), Anastasia Belova wrote:
> The result of multiplication of class_size and f_objidx
> may not fit unsigned integer. Add explicit casting to
> unsigned long to prevent integer overflow.

I can't see how this can be possible. Neither size_class nor
object idx can take values to cause mul overflow.