Re: [PATCH v2] fs/ceph/file: fix buffer overflow in __ceph_sync_read()

From: Max Kellermann
Date: Wed Nov 27 2024 - 15:43:58 EST


On Wed, Nov 27, 2024 at 9:40 PM Alex Markuze <amarkuze@xxxxxxxxxx> wrote:
> There is a fix for this proposed by Luis.

On the private security mailing list, I wrote about it:
"This patch is incomplete because it only checks for i_size==0.
Truncation to zero is the most common case, but any situation where
offset is suddenly larger than the new size triggers this bug."

I think my patch is better.