Re: [PATCH] buildid: validate page-backed file before parsing build ID
From: Shakeel Butt
Date: Tue Dec 23 2025 - 14:05:57 EST
Hi Jinchao,
On Tue, Dec 23, 2025 at 06:32:07PM +0800, Jinchao Wang wrote:
> __build_id_parse() only works on page-backed storage. Its helper paths
> eventually call mapping->a_ops->read_folio(), so explicitly reject VMAs
> that do not map a regular file or lack valid address_space operations.
>
> Reported-by: syzbot+e008db2ac01e282550ee@xxxxxxxxxxxxxxxxxxxxxxxxx
> Signed-off-by: Jinchao Wang <wangjinchao600@xxxxxxxxx>
Check the previous discussion on this at
https://lore.kernel.org/all/20251114193729.251892-1-ssranevjti@xxxxxxxxx/
The preferred solution was to use kernel_read() call instead of adding
more such checks. Please check and test the patch at
https://lore.kernel.org/20251222205859.3968077-1-shakeel.butt@xxxxxxxxx/