Re: [PATCH] netfs: Fix a KMSAN uninit-value error in netfs_clear_buffer
From: Chang Yu
Date: Tue Oct 01 2024 - 02:25:47 EST
On Mon, Sep 23, 2024 at 08:12:23AM +0100, David Howells wrote:
> Chang Yu <marcus.yu.56@xxxxxxxxx> wrote:
>
> > Use kzalloc instead of kmalloc in netfs_buffer_append_folio to fix
> > a KMSAN uninit-value error in netfs_clear_buffer
>
> Btw, is this a theoretical error or are you actually seeing an uninitialised
> pointer being dereferenced?
Apologies for the late reply. Yes this bug was reported by syzbot
(https://syzkaller.appspot.com/bug?extid=921873345a95f4dae7e9) and I was
able to reproduce it locally on my machine. I've just tested it with the
latest upstream and confirmed that the bug is still present. I will
send a revised patch shortly, please feel free to take a look.
Chang