[PATCH] erofs: fix potential overflow calculating xattr_isize
    Chao Yu 
    chao at kernel.org
       
    Mon Apr 17 00:47:00 AEST 2023
    
    
  
On 2023/4/14 14:18, Jingbo Xu wrote:
> Given on-disk i_xattr_icount is 16 bits and xattr_isize is calculated
> from i_xattr_icount multiplying 4, xattr_isize has a theoretical maximum
> of 256K (64K * 4).
> 
> Thus declare xattr_isize as unsigned int to avoid the potential overflow.
> 
> Fixes: bfb8674dc044 ("staging: erofs: add erofs in-memory stuffs")
> Signed-off-by: Jingbo Xu <jefflexu at linux.alibaba.com>
Good catch!
Reviewed-by: Chao Yu <chao at kernel.org>
Thanks,
    
    
More information about the Linux-erofs
mailing list