[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <363cf8e8-326b-6547-b780-268ce2e3c1a5@kernel.org>
Date: Sun, 16 Apr 2023 22:47:00 +0800
From: Chao Yu <chao@...nel.org>
To: Jingbo Xu <jefflexu@...ux.alibaba.com>, xiang@...nel.org,
huyue2@...lpad.com, linux-erofs@...ts.ozlabs.org
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] erofs: fix potential overflow calculating xattr_isize
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@...ux.alibaba.com>
Good catch!
Reviewed-by: Chao Yu <chao@...nel.org>
Thanks,
Powered by blists - more mailing lists